Skip to content

legacy hyper-util client: option to not open a new connection when an idle one is about to be free #4134

Description

@aryehklein-rise

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions