0
votes

We want to create a MongoDB shard (v. 2.4). The official documentation recommends to have 3 config servers.

However, the policies of our company won't allow us to get 3 extra servers for this purpose. Since we have already 3 application servers (1 web node, 2 process nodes) we are considering to put the configuration servers in the same application servers, with the mongos. Availability is not critical for us.

What do you think about this configuration? Can we face some problem or is it discouraged for some reason?

1

1 Answers

1
votes

Given that Availability is not critical for your use case, I would say it should be fine to place the config servers in the same application servers and mongos.

If one of the process nodes is down, you will lose: 1 x mongos, 1 application server and 1 config server. During this down time, the other two config servers will be read-only , which means there won't be balancing of shards, modification to cluster config etc. Although your other two mongos should still be operational (CRUD wise). If your web-node is down, then you have a bigger problem to deal with.

If two of the nodes are down (2 process nodes, or 1 web server and process node), again, you would have bigger problem to deal with. i.e. Your applications are probably not going to work anyway.

Having said that, please consider the capacity of these nodes to be able to handle a mongos, an application server and a config server. i.e. CPU, RAM, network connections, etc.

I would recommend to test the deployment architecture in a development/staging cluster first under your typical workload and use case.

Also see Sharded Cluster High Availability for more info.

Lastly, I would recommend to check out MongoDB v3.2 which is the current stable release. The config servers in v3.2 are modelled as a replica set, see Sharded Cluster config servers for more info.