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

Don't allocate resources for ingress connection until first byte is received

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Service Arch
    • Fully Compatible

      This is to reduce the cost of drivers that implement the Happy Eyeballs RFC to enable ipv6. That RFC calls for connecting over both ipv4 and ipv6 in parallel, using whichever connects first, and immediately closing the other connection.

      Currently the server allocates a thread and allocates many objects as soon as it accepts an ingress connection. We should defer that work until there is data ready to be read from the socket. This will avoid allocating resources (other than the FD) for the doomed connections that the drivers will be closing.

      This plan assumes that drivers won't send any data over the doomed TCP socket, even to initiate a TLS handshake.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: