@@ -464,8 +464,8 @@ Settings
464
464
465
465
Use the :option:`mongod --repair` option to access this
466
466
functionality.
467
-
468
- .. note::
467
+
468
+ .. note::
469
469
470
470
Because :program:`mongod` rewrites all of the database files
471
471
during the repair routine, if you do not run :setting:`repair`
@@ -724,3 +724,36 @@ Sharding Cluster Options
724
724
later, the new value will have no effect. See the
725
725
":ref:`sharding-balancing-modify-chunk-size`" procedure if you
726
726
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.
0 commit comments