[SERVER-33371] Don't allocate resources for ingress connection until first byte is received Created: 16/Feb/18 Updated: 06/Dec/22 Resolved: 21/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Do | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Kevin Albertson [ 20/Mar/18 ] |
|
The C driver now implements the Happy Eyeballs RFC ( |