@@ -119,10 +119,8 @@ members of the replica set. Take the configuration outlined in the
119
119
Traffic to and from a MongoDB Config Server
120
120
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
121
122
- Config servers, host the :term:`config database` that stores metadata
123
- for sharded clusters. Each production cluster has three config
124
- servers, initiated using the :option:`mongod --configsvr`
125
- option. [#config-option]_ Config servers listen for connections on port
122
+ Config servers host the :term:`config database` that stores metadata
123
+ for sharded clusters. Config servers listen for connections on port
126
124
``27019``. As a result, add the following ``iptables`` rules to the
127
125
config server to allow incoming and outgoing connection on port
128
126
``27019``, for connection to the other config servers.
@@ -148,18 +146,12 @@ Replace ``<ip-address>`` with the address of the
148
146
:program:`mongos` instances and the shard :program:`mongod`
149
147
instances.
150
148
151
- .. [#config-option] You also can run a config server by using the
152
- ``configsvr`` value for the :setting:`~sharding.clusterRole` setting in a
153
- configuration file.
154
-
155
149
Traffic to and from a MongoDB Shard Server
156
150
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157
151
158
- For shard servers, running as :option:`mongod --shardsvr`
159
- [#shard-option]_ Because the default port number is ``27018`` when running
160
- with the ``shardsvr`` value for the :setting:`~sharding.clusterRole` setting,
161
- you must configure the following ``iptables`` rules to allow traffic to and
162
- from each shard:
152
+ :ref:`Shard servers <sharding-background>` default to port number
153
+ ``27018``. You must configure the following ``iptables`` rules to allow
154
+ traffic to and from each shard:
163
155
164
156
.. code-block:: sh
165
157
@@ -187,11 +179,6 @@ Create a rule that resembles the following, and replace the
187
179
188
180
iptables -A OUTPUT -d <ip-address> -p tcp --source-port 27018 -m state --state ESTABLISHED -j ACCEPT
189
181
190
- .. [#shard-option] You can also specify the shard server option with the
191
- ``shardsvr`` value for the :setting:`~sharding.clusterRole` setting in the
192
- configuration file. Shard members are also often conventional replica sets
193
- using the default port.
194
-
195
182
.. [#migrations] All shards in a cluster need to be able to
196
183
communicate with all other shards to facilitate :term:`chunk` and
197
184
balancing operations.
@@ -204,8 +191,12 @@ Provide Access For Monitoring Systems
204
191
reach all components of a cluster, including the config servers,
205
192
the shard servers, and the :program:`mongos` instances.
206
193
207
- #. If your monitoring system needs access the HTTP interface, insert
208
- the following rule to the chain:
194
+ #. If your monitoring system needs access to the MongoDB HTTP interface,
195
+ you must ensure the HTTP interface's port is open. The HTTP interface
196
+ listens on the :option:`port <--port>` of your :program:`mongod`
197
+ instance plus ``1000``. By default, this is port ``28017``.
198
+
199
+ Insert the following rule to your ``iptables`` chain:
209
200
210
201
.. code-block:: sh
211
202
@@ -218,16 +209,16 @@ Provide Access For Monitoring Systems
218
209
219
210
.. optional::
220
211
221
- For config server :program:`mongod` instances running with
222
- the ``shardsvr`` value for the :setting:`~sharding.clusterRole`
212
+ For shard server :program:`mongod` instances running with
213
+ the ``shardsvr`` value for the :setting:`~sharding.clusterRole`
223
214
setting, the rule would resemble the following:
224
215
225
216
.. code-block:: sh
226
217
227
218
iptables -A INPUT -s <ip-address> -p tcp --destination-port 28018 -m state --state NEW,ESTABLISHED -j ACCEPT
228
219
229
220
For config server :program:`mongod` instances running with
230
- the ``configsvr`` value for the :setting:`~sharding.clusterRole`
221
+ the ``configsvr`` value for the :setting:`~sharding.clusterRole`
231
222
setting, the rule would resemble the following:
232
223
233
224
.. code-block:: sh
0 commit comments