@@ -4,27 +4,28 @@ Replication Architectures
4
4
5
5
.. default-domain:: mongodb
6
6
7
- There is no single :term:`replica set` architecture that is ideal for
7
+ There is no single ideal :term:`replica set` architecture for
8
8
every deployment or environment. Indeed the flexibility of replica sets
9
9
might be their greatest strength. This document describes the most
10
10
commonly used deployment patterns for replica sets. The descriptions
11
- are necessarily not mutually exclusive and in some cases can be combined.
11
+ are necessarily not mutually exclusive, and you can combine features
12
+ of each architecture in your own deployment.
12
13
13
14
.. seealso:: :doc:`/administration/replica-sets` and
14
- :doc:`/reference/replica-configuration`
15
+ :doc:`/reference/replica-configuration`.
15
16
16
- Three- Member Sets
17
- ------------------
17
+ Three Member Sets
18
+ -----------------
18
19
19
- The minimum *recommended* architecture for a replica set consists of
20
+ The minimum *recommended* architecture for a replica set consists of:
20
21
21
- - One :term:`primary <primary>`
22
+ - One :term:`primary <primary>` and
22
23
23
24
- Two :term:`secondary <secondary>` members, either of which can become
24
25
the primary at any time.
25
26
26
27
This makes :ref:`failover <replica-set-failover>` possible and ensures
27
- there exists two full, independent copies of the data set at all
28
+ there exists two full and independent copies of the data set at all
28
29
times. If the primary fails, the replica set elects another member as
29
30
primary and continues replication until the primary recovers.
30
31
@@ -58,8 +59,8 @@ conditions are true:
58
59
- Members that cannot function as primaries in a :term:`failover`
59
60
have their :data:`priority <members[n].priority>` values set to ``0``.
60
61
61
- If a member cannot function as a primary, for example because of
62
- resource constraints, a :data:`priority <members[n].priority>` value
62
+ If a member cannot function as a primary because of
63
+ resource or network latency constraints a :data:`priority <members[n].priority>` value
63
64
of ``0`` prevents it from being a primary. Any member with a
64
65
``priority`` value greater than ``0`` is available to be a primary.
65
66
@@ -73,9 +74,7 @@ Geographically Distributed Sets
73
74
-------------------------------
74
75
75
76
A geographically distributed replica set provides data recovery should
76
- the primary data center fail.
77
-
78
- A geographically distributed set includes at least one member in a
77
+ one data center fail. These sets include at least one member in a
79
78
secondary data center. The member has its the :data:`priority
80
79
<members[n].priority>` :ref:`set <replica-set-reconfiguration-usage>` to
81
80
``0`` to prevent the member from ever becoming primary.
@@ -89,10 +88,10 @@ In many circumstances, these deployments consist of the following:
89
88
This member can become the primary member at any time.
90
89
91
90
- One secondary member in a secondary data center. This member is
92
- ineligible to become primary. Its :data:`members[n].priority` value is
93
- set to ``0``.
91
+ ineligible to become primary. Set its :data:`members[n].priority` to
92
+ ``0``.
94
93
95
- If the primary member should fail , the replica set elects a new primary
94
+ If the primary is unavailable , the replica set will elect a new primary
96
95
from the primary data center.
97
96
98
97
If the *connection* between the primary and secondary data centers fails,
@@ -104,8 +103,8 @@ from the secondary data center. With proper :term:`write concern` there
104
103
will be no data loss and downtime can be minimal.
105
104
106
105
When you add a secondary data center, make sure to keep an odd number of
107
- members overall to prevent ties during elections for primary. This can
108
- be done by deploying an :ref:`arbiter <replica-set-arbiters>` in your
106
+ members overall to prevent ties during elections for primary by
107
+ deploying an :ref:`arbiter <replica-set-arbiters>` in your
109
108
primary data center. For example, if you have three members in the
110
109
primary data center and add a member in a secondary center, you create
111
110
an even number. To create an odd number and prevent ties, deploy an
@@ -175,18 +174,19 @@ Delayed Replication
175
174
~~~~~~~~~~~~~~~~~~~
176
175
177
176
:term:`Delayed members <delayed member>` are special :program:`mongod`
178
- instances in a :term:`replica set` that function the same way as
179
- :term:`secondary` members with the following operational differences:
180
- they are not eligible for election to primary and do not receive
181
- secondary queries. Delayed members *do* vote in :term:`elections
182
- <election>` for primary.
183
-
184
- Delayed members apply operations from the :term:`oplog` on a delay to
177
+ instances in a :term:`replica set` that
178
+ apply operations from the :term:`oplog` on a delay to
185
179
provide a running "historical" snapshot of the data set, or a rolling
186
180
backup. Typically these members provide protection against human error,
187
181
such as unintentionally deleted databases and collections or failed
188
182
application upgrades or migrations.
189
183
184
+ Otherwise, delayed member function identically to
185
+ :term:`secondary` members, with the following operational differences:
186
+ they are not eligible for election to primary and do not receive
187
+ secondary queries. Delayed members *do* vote in :term:`elections
188
+ <election>` for primary.
189
+
190
190
See :ref:`Replica Set Delayed Nodes <replica-set-delayed-members>` for
191
191
more information about configuring delayed replica set members.
192
192
@@ -237,8 +237,8 @@ primary *and* a quorum of voting members in the main facility.
237
237
238
238
.. _replica-set-arbiter-nodes:
239
239
240
- Arbiter Nodes
241
- -------------
240
+ Arbiters
241
+ --------
242
242
243
243
Always deploy an :term:`arbiter` to ensure that a replica set will have
244
244
a sufficient number of members to elect a :term:`primary`. While having
@@ -258,6 +258,6 @@ resource requirements and do not require dedicated hardware. Do not add
258
258
an arbiter to a set if you have an odd number of voting members that hold
259
259
data, to prevent tied :term:`elections <election>`.
260
260
261
- .. seealso:: :ref:`Arbiter Nodes <replica-set-arbiters>`,
261
+ .. seealso:: :ref:`Arbiters <replica-set-arbiters>`,
262
262
:setting:`replSet`, :option:`mongod --replSet`, and
263
- :func:`rs.addArb()`.
263
+ :func:`rs.addArb()`.
0 commit comments