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

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

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.4
    • Sharding
    • None
    • Sharded cluster
      Replica Sets of 3
      primary and one secondary tagged "a"
      other secondary tagged "b"

    Description

      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.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            david.hows David Hows
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: