Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3628

Question: is connectionPoolSetting for single mongos or whole cluster?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Connection Management
    • None

    Description

      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?

       
       

      Attachments

        Activity

          People

            john.stewart@mongodb.com John Stewart (Inactive)
            tangxiao.dalian@gmail.com Xiao Tang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: