-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
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