Skip to content

Extend the functionality of max_connection_duration + drain_timeout #35391

@Winbobob

Description

@Winbobob

Title: Extend the functionality of max_connection_duration and drain_timeout by introducing drain_timeout_jitter and drain_percentage.

Description:
We are looking into ways to balance long-lived HTTP downstream connections. max_connection_duration + drain_timeout can be used for this purpose. However, we think its functionality could be extended and be more flexible. Assume this scenario: one client establishes many connections almost at the same time, once the connection duration limit reaches and there are no active streams, all connections will be drained in a short period, which may cause high latency for later requests since establishing connections need some time.

Proposal:

  • Introduce drain_timeout_jitter, default to 0. If it is set to > 0, not all connections will be drained at the same time and if the jitter is long enough new connections have already been established and the impact of client could be minimal.

  • Introduce drain_percentage, default to 1. If it is set to (0,1), only a certain percentage of connections will be drained this time. For other connections, the connection duration will be reset and wait for the next round of drain.

Relevant Links:
#15283

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/drainenhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions