- Sharding >
- Sharded Cluster Tutorials >
- Sharded Cluster Deployment Tutorials >
- Deploy Three Config Servers for Production Deployments
Deploy Three Config Servers for Production DeploymentsΒΆ
This procedure converts a test deployment with only one config server to a production deployment with three config servers.
Tip
Use CNAMEs to identify your config servers to the cluster so that you can rename and renumber your config servers without downtime.
For redundancy, all production sharded clusters should deploy three config servers on three different machines. Use a single config server only for testing deployments, never for production deployments. When you shift to production, upgrade immediately to three config servers.
To convert a test deployment with one config server to a production deployment with three config servers:
Shut down all existing MongoDB processes in the cluster. This includes:
- all mongod instances or replica sets that provide your shards.
- all mongos instances in your cluster.
Copy the entire dbPath file system tree from the existing config server to the two machines that will provide the additional config servers. These commands, issued on the system with the existing Config Database, mongo-config0.example.net may resemble the following:
rsync -az /data/configdb mongo-config1.example.net:/data/configdb rsync -az /data/configdb mongo-config2.example.net:/data/configdb
Start all three config servers, using the same invocation that you used for the single config server.
mongod --configsvr
Thank you for your feedback!
We're sorry! You can Report a Problem to help us improve this page.