Where Should Config Servers Run?

52 views
Skip to first unread message

Flash Gorman

unread,
May 3, 2016, 3:58:17 PM5/3/16
to mongodb-user
Suppose I have three shards and each shard is a replica set consisting of three mongod instances.  Suppose furthermore that I run each instance on its own machine - so I have a total of six servers:
  • Shard 1
    • mongod-1
    • mongod-2
    • mongod-3
  • Shard 2
    • mongod-4
    • mongod-5
    • mongod-6
I know I need to have at least three config servers but it is not clear to me where they should run.  Should I run the three config servers on the three servers I am using for Shard 1?  Or split them across the two shards (run one or two of them on Shard 1 servers and run one or two of them on Shard 2 servers)?  Or should I have another dedicated set of machines just for the config servers?

Rhys Campbell

unread,
May 4, 2016, 5:53:03 AM5/4/16
to mongodb-user
I'd prefer to add in another three servers. I tend to host the config server and mongos instances on the same host.

Chris Cunningham

unread,
May 9, 2016, 8:42:08 PM5/9/16
to mongodb-user

Hello,


There should be very careful consideration of Config Servers deployment to ensure smooth operation of your sharded cluster. It is highly recommended to deploy each Config Server is on its own separate machine.


Config Servers are vital to the operation of your sharded cluster and in the event that they become corrupt or inconsistent, it can be very difficult to resolve successfully. Without clean, working Config Servers, the cluster may not be able to determine where data in a sharded collection is stored, severely disrupting the operation of the cluster. So ensuring they are running without any problems is essential to your operations.


Currently, there are two possible ConfigServer deployment in MongoDB:

  • Pre-3.2: Sync Cluster Connection Config (SCCC) mode. This is the legacy config server mode that uses three mirrored, separate servers, and do not form a replica set.


There are many advantages to running the Config Servers as a replica set (and thus on separate machines), namely: better fault tolerance and improved consistency. 


Please see Replica Set Config Servers for more information regarding this subject.


In a pre-CSRS implementation, if any config server goes down, no cluster operation that modifies the metadata can take place (e.g. balancing, chunk splitting). This is detailed in the documentation for Sharded Cluster, HA.


Regards,


Chris

Reply all
Reply to author
Forward
0 new messages