Question: is connectionPoolSetting for single mongos or whole cluster?

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Connection Management
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I am a server-side developer, working on a project which uses a mongo cluster as persistent database.
      I have a question for https://mongodb.github.io/mongo-java-driver/3.8/javadoc/com/mongodb/connection/ConnectionPoolSettings.html
      It said `to a MongoDB server`
      But what if I have a connectionString like following one

      mongodb://user:pwd@mongos1:port,mongos3:port,mongos3:port,mongos4:port,mongos5:port,mongos6:port/admin?readPreference=secondaryPreferred
      

      A mongodb sharded cluster which has 6 mongos instance.

      Question:
      Is the connectionPoolSetting related to one mongos server? or related to all mongos servers?
      E.g. if we have maxSize = 10 in this setting, does it mean single client has max connection pool = 10 for single mongos server (max pool = 60 for my 6 mongos cluster)? Or max connection pool = 10 for the whole cluster no matter how many mongos server we have?

       
       

            Assignee:
            John Stewart (Inactive)
            Reporter:
            Xiao Tang
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: