C100DBA · Question #51
Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?
The correct answer is C. nearest. nearest is the correct MongoDB read preference mode because it directs read operations to the replica set member - primary or secondary - that has the lowest measured network latency, making it the literal "closest" node in network terms. Why the distractors are wrong: netLatency
Question
Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?
Options
- AnetLatency
- BsecondaryPreferred
- Cnearest
How the community answered
(55 responses)- A4% (2)
- B9% (5)
- C87% (48)
Explanation
nearest is the correct MongoDB read preference mode because it directs read operations to the replica set member - primary or secondary - that has the lowest measured network latency, making it the literal "closest" node in network terms.
Why the distractors are wrong:
netLatency(A) does not exist as a MongoDB read preference; it's a fabricated option designed to sound plausible.secondaryPreferred(B) routes reads to a secondary when one is available, but it makes no guarantee about latency - you could end up reading from a geographically distant secondary.
Memory tip: Think of nearest the same way you'd use it in everyday language - it picks the node that is nearest to you on the network, measured in milliseconds of round-trip time, regardless of role (primary or secondary).
Topics
Community Discussion
No community discussion yet for this question.