mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-09-30 20:52:31 +07:00
Increase default listen backlog from 5 to 128
The accept queue was limited to 5 pending connections, which overflows easily under connection churn or a burst of simultaneous connects (LB health checks, thundering herd on restart). On overflow the kernel silently drops the ACK rather than failing fast, so clients stall on SYN/ACK retransmission backoff. Benchmark (bombardier -c 10 -d 10s, 3 trials, interleaved with the old binary) shows max latency dropping from 48-89ms to 5.8-11.2ms, while p99 is unchanged - the fix affects only the extreme tail, as expected.
This commit is contained in: