diff --git a/source/faq/sharding.txt b/source/faq/sharding.txt index 3e4b8afcae2..1a89a9db42b 100644 --- a/source/faq/sharding.txt +++ b/source/faq/sharding.txt @@ -193,23 +193,23 @@ behavior. How many connections does each ``mongos`` need? ----------------------------------------------- -Typically, each client maintains as connection to -:program:`mongos`. :program:`mongos` maintains a connection pool to -support a single outgoing connection to each shard for. For incoming -connections that direct read operations to secondaries, the -:program:`mongos` will also need to maintain connects to each member -of the replica set that provides the shard. - -Why does ``mongos`` hold connections? -------------------------------------- +Each client maintains a connection to a :program:`mongos` instance. +Each :program:`mongos` instance maintains a pool of connections to +the members of a replica set supporting the sharded cluster. +Connections between :program:`mongos` and :program:`mongod` instances +are used by one client at a time (requests are not multiplexed or +pipelined) and then returned to the connection pool. + +Why does ``mongos`` hold connections open? +------------------------------------------ :program:`mongos` uses a set of connection pools to communicate with each :term:`shard`. These pools do not shrink when the number of clients decreases. -This can lead to an unused :program:`mongos` with a large number open -of connections. If the :program:`mongos` is no longer in use, you're -safe restarting the process to close existing connections. +This can lead to an unused :program:`mongos` with a large number +of open connections. If the :program:`mongos` is no longer in use, +it is safe to restart the process to close existing connections. Where does MongoDB report on connections used by ``mongos``? ------------------------------------------------------------ diff --git a/source/reference/mongos.txt b/source/reference/mongos.txt index 2944df5ed5c..44cd47604ab 100644 --- a/source/reference/mongos.txt +++ b/source/reference/mongos.txt @@ -1,10 +1,10 @@ +.. default-domain:: mongodb .. _mongos: ========== ``mongos`` ========== -.. default-domain:: mongodb Synopsis -------- @@ -17,23 +17,20 @@ From the perspective of the application, a :program:`mongos` instance behaves identically to any other MongoDB instance. -.. seealso:: - - See the ":wiki:`Sharding`" wiki page for more information regarding - MongoDB's sharding functionality. - -.. STUB ":doc:`/core/sharding`" - .. note:: .. versionchanged:: 2.1 - Some aggregation operations using the :dbcommand:`aggregate` will cause :program:`mongos` instances to require more CPU resources than in previous versions. This modified performance profile may - dictate alternate architecture decisions if you make use the + dictate alternate architecture decisions if you use the :term:`aggregation framework` extensively in a sharded environment. +.. seealso:: + + * :doc:`/sharding` + * :doc:`/core/sharding` + Options ------- @@ -252,8 +249,8 @@ Options .. versionadded:: 2.2 - :option:`--localThreshold` affects the logic that program:`mongos` - uses when selecting :term:`replica set` members to pass reads + :option:`--localThreshold` affects the logic that :program:`mongos` + uses when selecting :term:`replica set` members to pass read operations to from clients. Specify a value to :option:`--localThreshold` in milliseconds. The default value is ``15``, which corresponds to the default value in all of the client diff --git a/source/sharding.txt b/source/sharding.txt index 12ef7a07884..26d61c438c3 100644 --- a/source/sharding.txt +++ b/source/sharding.txt @@ -73,6 +73,7 @@ Reference The following reference section describes sharding commands: - :ref:`sharding-commands` +- :ref:`faq/sharding.txt` .. STUB tutorial/replace-one-configuration-server-in-a-shard-cluster .. STUB tutorial/replace-all-configuration-servers-in-a-shard-cluster