-
Notifications
You must be signed in to change notification settings - Fork 712
feat: add support to configuring downstream idle timeout #2861
Description
Description:
Add idleTimeout to clientTrafficPolicy.
Currently, the downstream-connection idle timeout is fixed at one hour, unless it is less than the request timeout.
I propose adding an idleTimeout parameter to the clientTrafficPolicy configuration. This parameter would allow users to specify the duration of the downstream-connection idle timeout according to their specific requirements.
Rationale:
-
Prevention of Load Balancer Issues: When running a proxy in an IaaS, the load balancer of that IaaS might have an idle timeout configured (e.g., GCP with an idle timeout of 600 seconds: documentation).
If the idle timeout of the LB is reached, the LB closes the connection silently without notifying the proxy, causing following requests to fail. Having a configurable downstream idle timeout can prevent this issue by ensuring that Envoy's idle timeout aligns with or is shorter than the LB’s idle timeout. -
Saving Resources: Configuring the downstream idle timeout helps save resources by reducing the amount needed to maintain connections.
-
Drain Process Optimization: In cases where Envoy needs to be drained, having a lower idle timeout enables faster termination of idle connections and speeding up the release of resources.