@@ -11,15 +11,15 @@ Config Servers
1111
1212Config servers are special :program:`mongod` instances that store the
1313:doc:`metadata </core/sharded-cluster-metadata>` for a sharded cluster.
14- Config servers use a two-phase commit to ensure immediate consistency
15- and reliability. Config servers *do not* run as replica sets. All
16- config servers must be available to deploy a sharded cluster or to
17- make any changes to cluster metadata.
1814
19- A production sharded cluster has *exactly three* config servers. For
20- testing purposes you may deploy a cluster with a single config server.
21- But to ensure redundancy and safety in production, you should always
22- use three.
15+ A production sharded cluster has *exactly three* config servers. All
16+ config servers must be available to deploy a sharded cluster or to make
17+ any changes to cluster metadata. Config servers *do not* run as replica
18+ sets.
19+
20+ For testing purposes you may deploy a cluster with a single config
21+ server. But to ensure redundancy and safety in production, you should
22+ always use three.
2323
2424.. warning::
2525
@@ -40,34 +40,36 @@ same config servers for different sharded clusters.
4040.. index:: config databases
4141.. index:: database, config
4242
43- Config Database
44- ---------------
45-
46- Config servers store the metadata in the :doc:`config database
47- </reference/config-database>`. The :program:`mongos` instances cache
48- this data and use it to route reads and writes to shards.
49-
5043.. _config-server-read-write-ops:
5144
5245Read and Write Operations on Config Servers
5346-------------------------------------------
5447
55- MongoDB only writes data to the config server in the following cases:
48+ Config servers store the cluster's metadata in the :doc:`config
49+ database </reference/config-database>`. The :program:`mongos` instances
50+ cache this data and use it to route reads and writes to shards.
51+
52+ MongoDB only writes data to the config server when the metadata
53+ changes, such as
54+
55+ - after a :doc:`chunk migration </core/sharding-chunk-migration>`, or
5656
57- - To create splits in existing chunks. For more information, see
58- :doc:`chunk splitting </core/sharding-chunk-splitting>`.
57+ - after a :doc:`chunk split </core/sharding-chunk-splitting>`.
5958
60- - To migrate a chunk between shards. For more information, see
61- :doc:`chunk migration </core/sharding-chunk-migration>`.
59+ When writing to the three config servers, a coordinator dispatches the
60+ same write commands to the three config servers and collects the
61+ results. Differing results indicate an inconsistent writes to the
62+ config servers and may require manual intervention. Once the config
63+ servers become inconsistent, the balancer will not perform any chunk
64+ migration and :program:`mongos` will not perform auto-splits of chunks.
6265
63- MongoDB reads data from the config server data in the following
64- cases:
66+ MongoDB reads data from the config server in the following cases:
6567
6668- A new :program:`mongos` starts for the first time, or an existing
6769 :program:`mongos` restarts.
6870
69- - After a chunk migration, the :program:`mongos` instances update
70- themselves with the new cluster metadata .
71+ - After change in the cluster metadata, such as after a chunk
72+ migration .
7173
7274MongoDB also uses the config server to manage distributed locks.
7375
@@ -85,13 +87,12 @@ after the config servers are accessible again. If you restart the
8587:program:`mongos` instances before the config servers are available,
8688the :program:`mongos` will be unable to route reads and writes.
8789
88- Clusters become inoperable without the cluster metadata. *Always,*
89- ensure that the config servers remain available and intact. As such,
90- backups of config servers are critical. The data on the config server
91- is small compared to the data stored in a cluster. This means the
92- config server has a relatively low activity load, and the config
93- server does not need to be always available to support a sharded
94- cluster. As a result, it is easy to back up the config servers.
90+ Clusters become inoperable without the cluster metadata. To ensure that
91+ the config servers remain available and intact, backups of config
92+ servers are critical. The data on the config server is small compared
93+ to the data stored in a cluster, and the config server has a relatively
94+ low activity load. These properties facilitate finding a window to back
95+ up the config servers.
9596
9697.. include:: /includes/fact-rename-config-servers-requires-cluster-restart.rst
9798
0 commit comments