How TCP Works: 3-Way Handshake, Congestion Control and HttpClient Socket Exhaustion
TCP opens a connection with a 3-way handshake for a reliable byte stream, starts slowly with slow start and waits in TIME_WAIT on close; that's why new HttpClient per request exhausts ports. 500 TIME_WAITs for 500 requests, 6x slower with TLS, IHttpClientFactory, PooledConnectionLifetime and handler defaults, with real output.
8 Nov 2026
·
10 min
·
7