Skip to content

DOCS-13981 clarify read preference nearest #4793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions source/includes/read-preference-modes-table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@
:ref:`hedged reads <mongos-hedged-reads>` on sharded clusters.

* - :readmode:`nearest`
- Operations read from the member of the :term:`replica set` with
the least network latency, irrespective of whether that member
is a :term:`primary` or :term:`secondary`.
- Operations read from a random eligible :term:`replica set`
member, irrespective of whether that member is a :term:`primary`
or :term:`secondary`, based on a specified latency threshold.
The operation considers the following when calculating latency:

- The :urioption:`localThresholdMS` connection string option
- The :ref:`maxStalenessSeconds
<replica-set-read-preference-max-staleness>` read preference
option
- Any specified :doc:`tag sets
</tutorial/configure-replica-set-tag-sets>`

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