views:

685

answers:

2

we are currently developing a high traffic rails application with facebooker (facebook game). since amazon simpledb (aws-sdb) is really slow, we are thinking of using a dedicated mongodb server as offered by mongoHQ for example.

questions:

  1. what is the read/writes peak value for a mongodb server running on a amazon ec2 instance?
  2. what would be a recommended setup for a ec2 hosted app with mongodb - a master on amazon EBS and replicas on the ec2 instances? any examples or experiences?
  3. is there a company that offers mongodb hosting in the cloud?

thanks, mz

+1  A: 

1) Your reads/inserts/updates values will vary greatly with the size of the EC2 instance you use. A large EC2 instance can perform about 320,000 operations per second. Here is a breakdown of what "operations" meant in that sense:

IIRC, it was ~20,000 each of writes, deletes, updates, inserts, commands, & get mores and ~200,000 reads. I think that it was a quite large data set, but I'll check with Eliot tomorrow. -- Kristina Chodorow

2) MongoDB is single threaded and most EC2 instances have 2 or more CPUs. So you can run two processes on the same machine. Auto-sharding seems to be working well enough in the current release to use in a production environment, but Replica sets are not (these would handle replication & automatic failover). So feel free to use auto-sharding with manual master-slave configurations then replace master-slave config in July when Replica sets are out of alpha.

3) MongoHQ, MongoMachine both offer hosted MongoDB.

Van Nguyen
thanks for the great answer! so basically not replication means i can run on only one ec2 instance? i was planning to let mongodb run on lots of instances and create a master/slave setup... so now the best way to go would be using one large ec2 instance for mongodb only (with more mongo processes running and sharding) or hosting on mongohq/mongomachine and get the ec2 apps connect remotely? how do mongohq/mongomachine perform?
z3cko
You can shard across multiple mongod processes without any issue. But at the moment, Replica pairs aren't fully fleshed out so you can't have automatic failover with arbitrary numbers of servers. So for now, you must manually setup master/slaves for EACH shard instance you run. But you can shard across as many servers as you want.
Van Nguyen
A: 

MongoDB since 1.4 can very easily saturate a large number of cores. You no longer need to start a mongod per core.

chx
so on a multi core machine with ubuntu 10.04 i can just install mongodb via packages and it runs out of the box perfectly? or do i need to use sharding still?
z3cko
You only need sharding if you run out of RAM and want to use another box. I have no idea about packages though, I am using the tarballs off mongodb.org .
chx