I have one mongodb cluster, including 3 config servers, and one shard (3 data servers in this shard). One data server and one config server are on the same machine. Can I shut both of them down to upgrade the cluster without stop the service?
MongoDB Clustering – Shutting Down One Config Server and One Data Server in Shard
clusteringconfigurationmongodbupgrade
Related Question
- MongoDB Config Server – How to Isolate One Config Server
- MongoDB – Config Server with WiredTiger Does Not Authenticate Existing User
- Mongodb – Can we have two primaries for the same shard in mongodb
- MongoDB – Adding Arbiter Node on Config-Server
- MongoDB Sharded Cluster Upgrade from 2.4 to 3.2 version
- Mongodb – what if mongos server goes down in shard cluster setup
- MongoDB Sharding – Multiple Collections with Same Shard Key
Best Answer
The normal rules of replica set elections apply.
If your shard is backed by a 3-node replica set, then you can have any single node down while still being able to maintain a primary. A strict majority of nodes must be available, so 2/3 in the 3-node example.
If the data-bearing server you are planning to restart happens to be a replica set primary, I would shut it down gracefully with
db.shutdownServer()
to minimise down time (and make sure there is an eligible secondary whose oplog data is within 10 seconds of the primary).db.shutdownServer()
runs theshutdown
command against theadmin
database.