2012/06/17 RailsでMongoDBの使用を検討する際に気になったこと 最終更新日:2012/6/27 これまでRails+MySQLでWebアプリを開発してきたのですが、MongoDBについて調べ始めたところ、なかなか良さそうに思えてきました。 そこで、実際に使用できるかどうか検討してみましたが、その際に気になった点を挙げておきます。 メリットは何か? システムを停止しなくてもスキーマ変更が可能。 シャーディングの設定が簡単なので、容易にスケールアウトできる。 (オマケ的なメリットですが)idがデフォルト12バイト。 Rails ActiveRecordでは4バイトなので、もしかするとあふれる可能性があるかもしれないというのが頭に引っかかっていました。 MongoDBのObject IDでは、タイムスタンプ(4バイト)+マシンID(3バイト)+プロセスID(2バイト)+カウン