MongoDB – Adding Arbiter Node on Config-Server

mongodbreplication

I'm using MongoDB and I want to know if I can add an Arbiter node in the same server that I'm hosting my Config-Server. Is it possible?

Let's say that I have 3 sharded clusters with 6 servers (2 per shard), 3 config-servers (each one will have arbiter for each shard) and 1 server as mongos (router). Is this good enough?

Also, what is the suggested specs for those Config-Arbiter servers would be?

Best Answer

Yes. You can add an Arbiter and a Config Server in the same machine.

Generally, you should avoid setting 2 DB process in the same machine because:

  1. Its harder to provision/estimate the machine resources for 2 process running simultaneously
  2. Its usually cheaper to have 2 low-end machines than 1 high-end (horizontal x vertical scaling).
  3. Some resources can't scale in your environment. E.g: network bandwidth.

However, if you want to share resources only with an Arbiter and Config nodes, since they require much less resources then a Primary node, this configuration is quite good.

The following article shows how you could set up your environment with nice images: http://www.kchodorow.com/blog/2010/08/09/sharding-and-replica-sets-illustrated/

Setup: 3 replica sets
mongodb setup

M = Master
S = Slave
A = Arbiter

Configuration: 3 servers
mongodb configuration

C = Config Server
No letter = mongos

Since this configuration mixes things, you can achieve high availability and sharding using just 3 servers.