5

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.

1 Answer 1

6

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.

3
  • 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. Jul 30, 2013 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, 2013 at 15:36
  • in my case , i had to run 3 instances on a single server , because it's recommended to have a replica set with at least 3 members , 2 real and 1 voter . So that's how we rolled for months before new servers were available to us . Aug 24, 2016 at 12:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .