Skip to content

Commit 5ced82e

Browse files
author
Sam Kleinman
committed
DOCS-363 reference items for localthreshold settings
1 parent e9fdc75 commit 5ced82e

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

source/reference/configuration-options.txt

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ Settings
464464

465465
Use the :option:`mongod --repair` option to access this
466466
functionality.
467-
468-
.. note::
467+
468+
.. note::
469469

470470
Because :program:`mongod` rewrites all of the database files
471471
during the repair routine, if you do not run :setting:`repair`
@@ -724,3 +724,36 @@ Sharding Cluster Options
724724
later, the new value will have no effect. See the
725725
":ref:`sharding-balancing-modify-chunk-size`" procedure if you
726726
need to change the chunk size on an existing shard cluster.
727+
728+
.. setting:: localThreshold
729+
730+
.. versionadded:: 2.2
731+
732+
:setting:`localThreshold` affects the logic that program:`mongos`
733+
uses when selecting :term:`replica set` members to pass reads
734+
operations to from clients. Specify a value to
735+
:setting:`localThreshold` in milliseconds. The default value is
736+
``15``, which corresponds to the default value in all of the client
737+
:doc:`drivers </applications/drivers>`.
738+
739+
This setting only affects :program:`mongos` processes.
740+
741+
When :program:`mongos` receives a request that permits reads to
742+
:term:`secondary` members, the :program:`mongos` will:
743+
744+
- find the nearest suitable member of the set, in terms of ping time.
745+
746+
- construct a list of replica set members that is within a ping
747+
time of 15 milliseconds of the nearest suitable member of the
748+
set.
749+
750+
If you specify a value for :setting:`localThreshold`,
751+
:program:`mongos` will construct the list of replica members
752+
that are within the latency allowed by this value.
753+
754+
- The :program:`mongos` will select a member to read from at
755+
random from this list.
756+
757+
See the :ref:`replica-set-read-preference-behavior-member-selection`
758+
section of the :ref:`read preference <replica-set-read-preference>`
759+
documentation for more information.

source/reference/mongos.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,34 @@ Options
227227
.. versionadded:: 2.1.2
228228

229229
Disables the HTTP interface.
230+
231+
.. option:: --localThreshold
232+
233+
.. versionadded:: 2.2
234+
235+
:option:`--localThreshold` affects the logic that program:`mongos`
236+
uses when selecting :term:`replica set` members to pass reads
237+
operations to from clients. Specify a value to
238+
:option:`--localThreshold` in milliseconds. The default value is
239+
``15``, which corresponds to the default value in all of the client
240+
:doc:`drivers </applications/drivers>`.
241+
242+
When :program:`mongos` receives a request that permits reads to
243+
:term:`secondary` members, the :program:`mongos` will:
244+
245+
- find the nearest suitable member of the set, in terms of ping time.
246+
247+
- construct a list of replica set members that is within a ping
248+
time of 15 milliseconds of the nearest suitable member of the
249+
set.
250+
251+
If you specify a value for :option:`--localThreshold`,
252+
:program:`mongos` will construct the list of replica members
253+
that are within the latency allowed by this value.
254+
255+
- The :program:`mongos` will select a member to read from at
256+
random from this list.
257+
258+
See the :ref:`replica-set-read-preference-behavior-member-selection`
259+
section of the :ref:`read preference <replica-set-read-preference>`
260+
documentation for more information.

0 commit comments

Comments
 (0)