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

make RSM::getHostsOrRefresh return unpreferred hosts last

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Service Arch
    • Service Arch 2019-07-01

      Right now the ReplicaSetMonitor::getHostsOrRefresh only returns the non-preferred option (for PrimaryPreferred and SecondaryPreferred) when the preferred options are completely untargettable.

      But, after SERVER-41133, we'll be able to take advantage of the lists of hosts returned in SERVER-41134, and we can weaken our notion of "preferred" from "is targettable" to "has a connection available"

      I.e. if matchingHosts =

      { secondary1, secondary2, primary }

      (where 50% of the time we swap secondary 1 and secondary 2) we have the technology to select a secondary, falling back to the primary, in the order a connection becomes available. In a system with "enough" connections, that should send all traffic to secondaries, and only route to the primary when we have no connections available. I think this weakening is inline with the rest of the work in PM-856

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: