Skip to content

Commit 649442d

Browse files
author
Dan Crosta
committed
notes about using sharding with "localhost"
1 parent 0b50eec commit 649442d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/administration/sharding.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,19 @@ scratch, use the following procedure as a starting point:
183183
If you do not specify a shard key, MongoDB will shard the
184184
collection using the ``_id`` field, and this is rarely ideal.
185185

186+
Testing Sharding with "localhost"
187+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188+
189+
Because all components of a sharded cluster must be able to reach one
190+
another over the network, there are special restrictions to be aware of
191+
when configuring sharding on a single machine.
192+
193+
If you use either "localhost" or "127.0.0.1" as the hostname portion of
194+
any host identifier (the ``host`` argument to ``addShard``, or the value
195+
to the ``--configdb`` setting for :program:`mongos`), then you must use
196+
"localhost" or "127.0.0.1" for all such settings. If you do not, you
197+
will receive an error.
198+
186199
Cluster Management
187200
------------------
188201

0 commit comments

Comments
 (0)