Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?
share|improve this question

migrated from Jun 21 '12 at 13:04

This question came from our site for professional and enthusiast programmers.

There's no single "best" answer for any of your items. It all depends on too many factors. – Sergio Tulentsev Jun 19 '12 at 18:46
This same question was asked & answered on the mongodb-user mailing list. – Stennie Jun 20 '12 at 4:33
up vote 3 down vote accepted

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.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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