Exclude lagged secondaries when selecting hosts for mirrored reads

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: