[SERVER-79329] Exclude lagged secondaries when selecting hosts for mirrored reads Created: 25/Jul/23  Updated: 01/Aug/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-70510 Avoid considering recovering nodes as... Backlog
Assigned Teams:
Service Arch
Participants:

 Description   

The host selection mechanism of mirrored read (which selects all electable secondaries) can be improved to exclude secondaries that are lagged behind for certain amount of time. This is because

  1. Lagged secondaries are pretty unlikely to be elected as primary.
  2. Due to locality, queries on primary are more likely targeting latest writes, and since lagged secondaries may not have the latest inserted documents, the mirrored reads may end up reading nothing, and is simply wasted. And I guess even if it finds the document, it may result in churns in the cache.
  3. It can help void extra load as lagged secondaries trying to catch up.

Generated at Thu Feb 08 06:40:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.