MongoS spawns new connections to secondaries after each change of readPreference tags

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.4
    • Component/s: Sharding
    • None
    • Environment:
      Sharded cluster
      Replica Sets of 3
      primary and one secondary tagged "a"
      other secondary tagged "b"
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Issue is thus:
      Client creates a single connection to MongoS
      Client issues a query with read preference "Secondary" and read preference tag of "a"
      MongoS creates a new connection to secondaries tagged "a" and issues queries
      Client issues a query with read preference "Secondary" and read preference tag of "b"
      MongoS dropps connection to secondaries tagged "a" and opens connections to secondaries tagged "b" then issues queries
      Client issues a query with read preference "Secondary" and read preference tag of "a"
      MongoS dropps connection to secondaries tagged "b" and opens connections to secondaries tagged "a" then issues queries

      If the client continues to change read preference tags then connections will be opened and closed following each query issued on that connection with a new tag. This can lead to large amounts of connection churn.

            Assignee:
            Randolph Tan
            Reporter:
            David Hows (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: