@@ -119,10 +119,8 @@ members of the replica set. Take the configuration outlined in the
119119Traffic to and from a MongoDB Config Server
120120~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121121
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
126124``27019``. As a result, add the following ``iptables`` rules to the
127125config server to allow incoming and outgoing connection on port
128126``27019``, for connection to the other config servers.
@@ -148,18 +146,12 @@ Replace ``<ip-address>`` with the address of the
148146:program:`mongos` instances and the shard :program:`mongod`
149147instances.
150148
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-
155149Traffic to and from a MongoDB Shard Server
156150~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157151
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:
163155
164156.. code-block:: sh
165157
@@ -187,11 +179,6 @@ Create a rule that resembles the following, and replace the
187179
188180 iptables -A OUTPUT -d <ip-address> -p tcp --source-port 27018 -m state --state ESTABLISHED -j ACCEPT
189181
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-
195182.. [#migrations] All shards in a cluster need to be able to
196183 communicate with all other shards to facilitate :term:`chunk` and
197184 balancing operations.
@@ -204,8 +191,12 @@ Provide Access For Monitoring Systems
204191 reach all components of a cluster, including the config servers,
205192 the shard servers, and the :program:`mongos` instances.
206193
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:
209200
210201 .. code-block:: sh
211202
@@ -218,16 +209,16 @@ Provide Access For Monitoring Systems
218209
219210 .. optional::
220211
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`
223214 setting, the rule would resemble the following:
224215
225216 .. code-block:: sh
226217
227218 iptables -A INPUT -s <ip-address> -p tcp --destination-port 28018 -m state --state NEW,ESTABLISHED -j ACCEPT
228219
229220 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`
231222 setting, the rule would resemble the following:
232223
233224 .. code-block:: sh
0 commit comments