Sharded Cluster Maintenance
Parent: Atlas Maintenance Windows · Published reference · snapshot 2026-10-15
↓ Facts as markdownall context files
Depth-first rabbithole dossier for Sharded Cluster Maintenance; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
How it works
- [high] To upgrade a 9.0 sharded cluster, first disable the cluster's balancer and upgrade the Config server replica set first, referring to steps 1-11 from the upgrade major version in the replica set. Sources: https://www.mongodb.com/docs/manual/tutorial/upgrade-revision.md, https://www.percona.com/blog/upgrade-process-of-percona-server-for-mongodb-replica-set-and-shard-cluster/ [source]
- [low] During a 9.0 sharded cluster upgrade, upgrade the Shard replica sets next in parallel using the same rolling manner, and upgrade the last mongos instance in the same rolling manner, noting that if there is only one mongos, the application team must be informed of that specific downtime. Sources: https://www.percona.com/blog/upgrade-process-of-percona-server-for-mongodb-replica-set-and-shard-cluster/ [source]
- [low] All config servers must be running and available when you first initiate a sharded cluster. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] Inconsistencies in sharding metadata, which can result in incorrect query results or data loss, can originate in clusters upgraded from a pre-5.0 release of MongoDB (corrupted data from past DDL operations), in manual interventions, and in maintenance operations such as upgrade or downgrade procedures. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] Clusters upgraded from a pre-5.0 release of MongoDB may have corrupted data from past DDL operations, and maintenance operations such as upgrade or downgrade procedures can reveal these inconsistencies, which can result in incorrect query results or data loss. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] To stop the balancer during maintenance, run the command sh.stopBalancer() in the shell. Sources: https://www.percona.com/blog/upgrade-process-of-percona-server-for-mongodb-replica-set-and-shard-cluster/ [source]
- [high] To re-enable the balancer after maintenance, run the command sh.startBalancer() in the shell. Sources: https://www.mongodb.com/docs/manual/tutorial/upgrade-revision.md, https://www.percona.com/blog/upgrade-process-of-percona-server-for-mongodb-replica-set-and-shard-cluster/ [source]
- [low] Use CNAMEs to identify config servers to the cluster so that config servers can be renamed and renumbered without downtime. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] Running commands using the directShardOperations role can cause the cluster to stop working correctly and may cause data corruption. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
Problems, failure modes and limitations
- [low] The error "could not initialize cursor across all shards because : stale config detected" indicates a stale configuration issue in the sharded cluster. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] If the replica set config server loses its primary and cannot elect a primary, the cluster's metadata becomes read only. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
- [low] If operations can be processed by a single shard, the failure of a single shard renders only some data unavailable, whereas if operations need to access all shards, the failure of a single shard renders the entire cluster unavailable. Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
Facts and statements
- [low] MongoDB Atlas allows the selection of up to 70 shards for a sharded cluster. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/atlas/reference/faq/deployment.md [source]
- [low] You can upgrade the mongos instances in any order during a sharded cluster upgrade. Sources: https://www.mongodb.com/docs/manual/tutorial/upgrade-revision.md [source]
- [low] In a test against a sharded cluster with write concern journaled, MongoDB lost 543 out of 6095 successfully acknowledged writes. (verified as of 2026-10-15) Sources: https://jepsen.io/analyses/mongodb-3-6-4 [source]
- [low] The Atlas admin database user role has the necessary privileges to pre-split chunks in an empty sharded collection. Sources: https://www.mongodb.com/docs/atlas/reference/faq/deployment.md [source]
- [low] Starting in MongoDB 8.0, you can use the directShardOperations role to perform maintenance operations that require executing commands directly on shards. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/tutorial/troubleshoot-sharded-clusters.md [source]
Related concepts
- Cluster — is a part of Sharded Cluster Maintenance
- Sharded — is a part of Sharded Cluster Maintenance
- Maintenance — is a part of Sharded Cluster Maintenance
Children
- No children recorded.