Skip to content
This repository was archived by the owner on Aug 20, 2019. It is now read-only.

Commit 52905dd

Browse files
committed
DOCS-5289 fix config server write descriptions
1 parent fb72aeb commit 52905dd

File tree

2 files changed

+50
-42
lines changed

2 files changed

+50
-42
lines changed

source/core/sharded-cluster-config-servers.txt

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Config Servers
1111

1212
Config 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

5245
Read 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

7274
MongoDB 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,
8688
the :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

source/core/sharded-cluster-high-availability.txt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,24 @@ other shards. However, your application must be able to deal with
4747
partial results, and you should investigate the cause of the
4848
interruption and attempt to recover the shard as soon as possible.
4949

50-
One or Two Config Databases Become Unavailable
51-
----------------------------------------------
52-
53-
Three distinct :program:`mongod` instances provide the :term:`config
54-
database` using a special two-phase commits to maintain consistent state
55-
between these :program:`mongod` instances. Cluster operation will
56-
continue as normal but :ref:`chunk migration <sharding-balancing>` and
57-
the cluster can create no new :doc:`chunk splits
58-
</tutorial/split-chunks-in-sharded-cluster>`. Replace the config server as soon as
59-
possible. If all config databases become unavailable, the
60-
cluster can become inoperable.
50+
One or Two Config Servers Become Unavailable
51+
--------------------------------------------
52+
53+
Three distinct :program:`mongod` instances provide the :doc:`config
54+
servers </core/sharded-cluster-config-servers>`.
55+
56+
If one or two config servers become unavailable, the cluster's metadata
57+
becomes *read only*. You can still read and write data from the shards,
58+
but no :ref:`chunk migration <sharding-balancing>` or :doc:`chunk
59+
splits </tutorial/split-chunks-in-sharded-cluster>` will occur until
60+
all three servers are available. Replace the config server as soon as
61+
possible. If all config databases become unavailable, the cluster can
62+
become inoperable.
63+
64+
If the config servers are inconsistent, the balancer will not perform
65+
any :ref:`chunk migration <sharding-balancing>` nor will the
66+
:program:`mongos` perform :doc:`auto-chunk splits
67+
</tutorial/split-chunks-in-sharded-cluster>`.
6168

6269
.. include:: /includes/note-config-server-startup.rst
6370

0 commit comments

Comments
 (0)