Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79329

Exclude lagged secondaries when selecting hosts for mirrored reads

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

      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 Unassigned
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: