Why do clients keep a pool of connections, and what is the risk of getting its size wrong?
Sketch your own answer first, then compare it with the one below.
A strong answer
A pool lets requests reuse open connections, so most requests skip the handshake. It also bounds how many connections a client holds.
Too small and requests wait for a free connection, which shows up as queueing and high tail latency. Too large and it wastes memory and file descriptors on both ends, and the sum across many clients can overload a server or a database behind it.
Size it from the request rate and how long a connection is busy, and add headroom for bursts.
Sources
- Martin Thomson, Cory Benfield (2022). RFC 9113: HTTP/2.