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

Choosing sync source across regions doesn't take into account which node is primary

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication
    • Repl 2024-11-11, Repl 2024-11-25

      The topology of sync sources has a large impact on majority write acknowledgement. Since chaining is enabled by default in replica sets, we should make sure that replication automatically trends towards sync source topologies that promote lower majority write acknowledgement latencies.

      After SPM-1409, we try to optimize sync source topologies to make it so that per region, there is only one sync source that comes from a different region. However, when choosing a sync source from a different region, we do not consider if one of the nodes in that region is the primary, we just choose based on ping time. This means that we can get into more linear sync source chains, where nodes further down the chain need to wait for their sync source to replicate operations before being able to start replicating themselves, which results in higher writeConcern:majority acknowledgement latency.

      For example, if we have nodes A(the primary) and B in one region and node C in a separate region. Node C could sync from B and B syncs from A, meaning that node C needs to wait for node B to replicate an operation before it can replicate it. A more ideal topology would be that both C and B sync from A.

            Assignee:
            joy.wang@mongodb.com Joy Wang
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: