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

Need to prepare initial connection between mongos and mongod

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Won't Do
    • Affects Version/s: 3.2.10
    • Fix Version/s: None
    • Component/s: Networking
    • Labels:
      None
    • Case:

      Description

      After looking source code and some testing,
      I have recognized that mongos does not prepare connection to mongod even though mongo client connector established connections(between client drivers and mongos).

      But this is a little bit risky at service starting time.
      Usually service starting time, huge user requests are transmitted to mongod via mongos. But this time, there's no connections are established between mongos and mongod. To make things worse, mongos need to open connections for all mongod shards and need to authenticate for user.

      These overheads cause connection spike at service starting time. (Look at the attached mongod connections metric graphs). In this test, there's only 14 mongos, But some service need to run 150 mongos.

      If there's 150 mongos, connections of each mongod shard is spike to 30000. In this case, mongod server can't processing user request because mongod is too busy to open and close connection. Eventually mongod servers are hang.

      So I think there's some preparation of connections between mongos and mongod. In current version, there's no way to control connections before running query.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-servicearch Backlog - Service Architecture
              Reporter:
              matt.lee Matt SeongUck Lee
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: