I had a few questions around deployment best practices and how folks are using mongodb today. Feel free to add any other comments you can think off.

  1. No of databases per mongod instance. Is the recommendation to create multiple databases in a single mongod instance or to run many mongod's on the same box for the different DBs. Also how are folks running doing this for dev and prod envs?
  2. Ideal number of shards per cluster. How does one decide the ideal number?
  3. Recommended replicaset. 3 or more and how does one decide?
  4. Best way to backup and restore. Is it to use mongodump or is something else? Also do you usually do it on the cluster/instance level vs database level?
  5. Cloning of databases or clusters. Does anyone actively clone and do you clone a db or the whole cluster/instance?

1 Answer 1


In order :

  1. There is one reason to have multiple mongod instances in one machine (other than machine efficient repset setups) and that one reason is the process wide write lock. If you run into a situation where you're bottlenecked by the write lock rather than any hardware resource bottleneck you can go for multiple mongod instances. In all other situations it's usually more practical to have one mongod process, especially given it's memory mapped based storage engine.
  2. There's no ideal number. Adding shards (almost) linearly scales up write and read performance for sharded collections. It's a basic horizontal scaling solution and follows the rules for that sort of scaling.
  3. Replica sets always consist of at least 3 members although 1 of them can be an arbiter (votes but does not replicate). If you add more you gain read performance if your application uses slaveOk flagged queries. Again, ideal number depends on your use case.
  4. Depends. Most people use a hot backup scheme of some sort. There's no difference between MySQL backup conventions and MongoDB here.
  5. Depends on whether or not you want to clone a single database or the entire cluster? Both are well documented.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.