When a request doesn't find a free pooled connection immediately, the legacy
Client starts opening a new connection right away and races it against
waiting for a pooled one to come back (connection_for in
src/client/legacy/client.rs). If a pooled connection comes back first, the
new connection was opened for nothing. I couldn't find a way to turn this off.
I might be misunderstanding how the pool works, so please correct me if so.
But when turning it off by changing the code my tail latency and error rates went down significantly.
When a request doesn't find a free pooled connection immediately, the legacy
Clientstarts opening a new connection right away and races it againstwaiting for a pooled one to come back (
connection_forinsrc/client/legacy/client.rs). If a pooled connection comes back first, thenew connection was opened for nothing. I couldn't find a way to turn this off.
I might be misunderstanding how the pool works, so please correct me if so.
But when turning it off by changing the code my tail latency and error rates went down significantly.