Skip to content

Commit a172d09

Browse files
committed
DOCS-13981 clarify read preference nearest
1 parent 31ea525 commit a172d09

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

source/includes/read-preference-modes-table.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@
3434
:ref:`hedged reads <mongos-hedged-reads>` on sharded clusters.
3535

3636
* - :readmode:`nearest`
37-
- Operations read from the member of the :term:`replica set` with
38-
the least network latency, irrespective of whether that member
39-
is a :term:`primary` or :term:`secondary`.
37+
- Operations read from a random eligible :term:`replica set`
38+
member, irrespective of whether that member is a :term:`primary`
39+
or :term:`secondary`, based on a specified latency threshold.
40+
The operation considers the following when calculating latency:
41+
42+
- The :urioption:`localThresholdMS` connection string option
43+
- The :ref:`maxStalenessSeconds
44+
<replica-set-read-preference-max-staleness>` read preference
45+
option
46+
- Any specified :doc:`tag sets
47+
</tutorial/configure-replica-set-tag-sets>`
4048

4149
Starting in version 4.4, :readmode:`nearest` supports
4250
:ref:`hedged reads <mongos-hedged-reads>` on sharded clusters

0 commit comments

Comments
 (0)