Can Shard and Config be installed/deployed on the same node/VM?

Thank you for contacting MongoDB Support. My name is Manuel and I am glad to help you with this issue.
Starting in MongoDB 3.2, config servers for sharded clusters can be deployed as a replica set (CSRS) instead of three mirrored config servers (SCCC). Using a replica set for the config servers improves consistency across the config servers, since MongoDB can take advantage of the standard replica set read and write protocols for the config data. In addition, using a replica set for config servers allows a sharded cluster to have more than 3 config servers since a replica set can have up to 50 members. To deploy config servers as a replica set, the config servers must run the WiredTiger storage engine.
Please read our online documentation for further detail config servers.
Responding to your questions:
Can Shard and Config be installed/deployed on the same node/VM?
There is no limitation that prevents doing so, but it is NOT recommended for production deployments.
What are the consequences or limits?
Multiple instances of mongodb running on the same node would compete for resources. You would need to make sure your node has enough resources to prevent resource contention, and also that your MongoDB instances were containerized using cgroups or the like. The limits depend on your particular workload (connections, data, write/read operations, ...).

Comments