@@ -119,7 +119,7 @@ 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
122
+ Config servers host the :term:`config database` that stores metadata
123
123
for sharded clusters. Each production cluster has three config
124
124
servers, initiated using the :option:`mongod --configsvr`
125
125
option. [#config-option]_ Config servers listen for connections on port
@@ -155,11 +155,9 @@ instances.
155
155
Traffic to and from a MongoDB Shard Server
156
156
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157
157
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:
158
+ :ref:`Shard servers <sharding-background>` default to port number
159
+ ``27018``. You must configure the following ``iptables`` rules to allow
160
+ traffic to and from each shard:
163
161
164
162
.. code-block:: sh
165
163
@@ -187,11 +185,6 @@ Create a rule that resembles the following, and replace the
187
185
188
186
iptables -A OUTPUT -d <ip-address> -p tcp --source-port 27018 -m state --state ESTABLISHED -j ACCEPT
189
187
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
188
.. [#migrations] All shards in a cluster need to be able to
196
189
communicate with all other shards to facilitate :term:`chunk` and
197
190
balancing operations.
@@ -204,8 +197,12 @@ Provide Access For Monitoring Systems
204
197
reach all components of a cluster, including the config servers,
205
198
the shard servers, and the :program:`mongos` instances.
206
199
207
- #. If your monitoring system needs access the HTTP interface, insert
208
- the following rule to the chain:
200
+ #. If your monitoring system needs access to the MongoDB HTTP interface,
201
+ you must ensure the HTTP interface's port is open. The HTTP interface
202
+ listens on the :option:`port <--port>` of your :program:`mongod`
203
+ instance plus ``1000``. By default, this is port ``28017``.
204
+
205
+ Insert the following rule to your ``iptables`` chain:
209
206
210
207
.. code-block:: sh
211
208
@@ -219,15 +216,15 @@ Provide Access For Monitoring Systems
219
216
.. optional::
220
217
221
218
For config server :program:`mongod` instances running with
222
- the ``shardsvr`` value for the :setting:`~sharding.clusterRole`
219
+ the ``shardsvr`` value for the :setting:`~sharding.clusterRole`
223
220
setting, the rule would resemble the following:
224
221
225
222
.. code-block:: sh
226
223
227
224
iptables -A INPUT -s <ip-address> -p tcp --destination-port 28018 -m state --state NEW,ESTABLISHED -j ACCEPT
228
225
229
226
For config server :program:`mongod` instances running with
230
- the ``configsvr`` value for the :setting:`~sharding.clusterRole`
227
+ the ``configsvr`` value for the :setting:`~sharding.clusterRole`
231
228
setting, the rule would resemble the following:
232
229
233
230
.. code-block:: sh
0 commit comments