From 649442d923e067ce13a580c7bcf80dcc535d8e67 Mon Sep 17 00:00:00 2001 From: Dan Crosta Date: Mon, 11 Jun 2012 10:00:22 -0400 Subject: [PATCH] notes about using sharding with "localhost" --- source/administration/sharding.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/administration/sharding.txt b/source/administration/sharding.txt index 6fdf3d62cb2..7b198867018 100644 --- a/source/administration/sharding.txt +++ b/source/administration/sharding.txt @@ -183,6 +183,19 @@ scratch, use the following procedure as a starting point: If you do not specify a shard key, MongoDB will shard the collection using the ``_id`` field, and this is rarely ideal. +Testing Sharding with "localhost" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because all components of a sharded cluster must be able to reach one +another over the network, there are special restrictions to be aware of +when configuring sharding on a single machine. + +If you use either "localhost" or "127.0.0.1" as the hostname portion of +any host identifier (the ``host`` argument to ``addShard``, or the value +to the ``--configdb`` setting for :program:`mongos`), then you must use +"localhost" or "127.0.0.1" for all such settings. If you do not, you +will receive an error. + Cluster Management ------------------