• Type: Icon: Epic Epic
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Done
    • maxConnecting
    • Hide

      Engineer: Daria Pardue
      Summary: Limit # of Concurrent Connection Attempts (maxConnecting)
      04-19-2022: Design is in team review, Daria is on vacation for the next two weeks.


      04-01-2022:  Kicked off Design for Project, Estimates TBD.

      Show
      Engineer: Daria Pardue Summary: Limit # of Concurrent Connection Attempts (maxConnecting) 04-19-2022: Design is in team review, Daria is on vacation for the next two weeks. 04-01-2022:  Kicked off Design for Project, Estimates TBD.

      Epic Summary

      Summary

      Limit # of Concurrent Connection Attempts (maxConnecting)

      When creating a new connection, ensure that only a certain # of connections are also being created against that server. If too many are being created at a given time, wait until this number decreases. This will greatly reduce the driver’s ability to overload a server in a simple and effective way. This was already implemented in mongos (SERVER-29237) with a default value of 2, and the server team has reported that they have not seen any indications of connection storms caused by mongos since then.

      Intuitively, this mitigation seems like it may limit throughput. In practice, it has been observed in mongos that it may actually improve performance in certain scenarios, since connection establishment and handshaking are such expensive operations. Without this mitigation, when facing a burst of operations, the server will perform a high number of concurrent handshakes and then execute each operation on the resultant connections. With maxConnecting, the server performs only a few concurrent handshakes and can quickly perform many operations using the existing connections that were already handshaked.

      Motivation
      The propensity for drivers to inundate a server with new connections during failover events has been identified as a particular pain point for our customers. 

       

      Documentation

      Scope Document

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            esha.bhargava@mongodb.com Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: