Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We set up a MongoDB development server on CentOS 6.3 and were able to separate different projects by using separate config files and rc scripts. Now we're looking at setting up a MongoDB production environment.

I've read that it is not recommended to host multiple instances of MongoDB on the same server in production. Does that mean each project will need its own production MongoDB environment?

These projects are not very "big" and so do not require a lot of resources, so it feels like we're jumping the gun by giving each its own host. Perhaps we just need to get our heads out of the RDBMS world.

We will be monitoring our development server to see how it fares, but I'm looking for some insight and some of your own personal experience to supplement what I've read.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The reason Mongo/10Gen recommends against running multiple instances of Mongo on the same system has to do with resource availability assumptions. The mongod process assumes it's the only major tenant of the system, and running two such side-by-side will lead to overall worse performance than just running one mongod just with two databases.

Mongo is quite capable of running multiple databases under a single mongod process. These are discrete databases, just under a single master process. Each database handles its own authentication, which gives you separation. You'd run multiple mongod processes if you need different mongo versions for your products.

I'm not enough of an RDBMS DBA to know the best-practice arguments behind separating products by discrete database-binary processes, so I can't refute/assuage/talk-down each point. But as I understand it, accepted practice in Mongo environments is to have a separate database per product.

share|improve this answer
    
What about mixing a config server process and an arbiter on a single machine? I'm planning out a setup with 2 replica sets, each with 2 nodes and an arbiter and don't want t separate machine for each arbiter and config server if possible. –  Nicholas Tolley Cottrell Jul 30 '13 at 15:29
    
@NicholasTolleyCottrell The Mongo docs on arbiters says it right there: arbiters have minimal requirements. They can safely run along side a config server. –  sysadmin1138 Jul 30 '13 at 15:36

Your Answer

 
discard

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.