-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
deploy-geographically-distributed-replica-set.txt
114 lines (80 loc) · 3.78 KB
/
deploy-geographically-distributed-replica-set.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
=============================================
Deploy a Geographically Redundant Replica Set
=============================================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Overview
--------
This tutorial outlines the process for deploying a :term:`replica set`
with :doc:`members in multiple locations
</core/replica-set-architecture-geographically-distributed>`. The
tutorial addresses three-member replica sets and five-member replica
sets. If you have an even number of replica set members, add another
data bearing member, if possible, to deploy an odd number of voting
members. [#arbiter-alternative]_
For more information on distributed replica sets, see
:doc:`/core/replica-set-architecture-geographically-distributed`. See
also :doc:`/core/replica-set-architectures` and see :doc:`/replication`.
.. [#arbiter-alternative]
If circumstances prohibit another data bearing member and you have
an even number of voting members, you can add an arbiter instead.
For considerations when using an arbiter, see
:doc:`/core/replica-set-arbiter`.
Considerations
--------------
.. include:: /includes/considerations-deploying-replica-set.rst
Distribution of the Members
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If possible, use an odd number of data centers, and choose a
distribution of members that maximizes the likelihood that even with a
loss of a data center, the remaining replica set members can form a
majority or at minimum, provide a copy of your data.
Voting Members
~~~~~~~~~~~~~~
Never deploy more than seven voting members.
Prerequisites
-------------
For all configurations in this tutorial, deploy each replica set member
on a separate system. Although you may deploy more than one replica set member on a
single system, doing so reduces the redundancy and capacity
of the replica set. Such deployments are typically for testing
purposes.
This tutorial assumes you have installed MongoDB on each system that
will be part of your replica set. If you have not already installed
MongoDB, see the :ref:`installation tutorials <tutorial-installation>`.
Procedures
----------
.. _replica-set-deploy-distributed-three-member:
Deploy a Geographically Redundant Three-Member Replica Set
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. include:: /includes/tip-hostnames.rst
For a geographically redundant three-member replica set deployment, you
must decide how to distribute your system. Some possible distributions
for the three members are:
- Across Three Data Centers: One member to each site.
- Across Two Data Centers: Two members to Site A and one member to Site
B. If one of the members of the replica set is an arbiter
[#arbiter-alternative], distribute the arbiter to Site A with a
data-bearing member.
.. include:: /includes/note-csrs-distribution.rst
.. include:: /includes/steps/deploy-geographically-distributed-replica-set-3member.rst
Deploy a Geographically Redundant Five-Member Replica Set
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. include:: /includes/tip-hostnames.rst
For a geographically redundant five-member replica set deployment, you
must decide how to distribute your system. Some possible distributions
for the five members are:
- Across Three Data Centers: Two members in Site A, two members in Site
B, one member in Site C.
- Across Four Data Centers: Two members in one site, and one member in
the other three sites.
- Across Five Data Centers: One member in each site.
- Across Two Data Centers: Three members in Site A and two members in
Site B. If possible, avoid distributing config server replica set across only
two data centers.
.. include:: /includes/note-csrs-distribution.rst
.. include:: /includes/steps/deploy-geographically-distributed-replica-set-5member.rst