Clarification on idle and idleConnection #6612
Labels
kind/question
Categorizes an issue as a user question.
lifecycle/needs-triage
Indicates that an issue needs to be triaged by a project contributor.
What question do you have?:
I am trying to find a clear distinction between the
idle
andidleConnection
configuration? Based on the details in this doc-->https://projectcontour.io/docs/main/config/api/#projectcontour.io/v1.TimeoutPolicy, it seems the
Explanation:
idle: 30s:
This setting means that if a connection between the proxy and the client is idle for 30 seconds during a single request/response cycle, the proxy will consider it idle. For HTTP/1.1, this applies to the time between requests on the same connection. For HTTP/2, it applies to the inactivity of streams.
Example:
idleConnection: 1h:
This setting means that if the connection between the proxy and the upstream service remains idle (no requests) for 1 hour, the proxy will close it.
Example:
Combined Behavior:
During a request/response cycle:
If the idle timeout is reached (30 seconds without new requests on HTTP/1.1 or inactivity in HTTP/2 streams), the connection is considered idle, and the proxy might close it.
Between requests:
The idleConnection timeout (1 hour) ensures that even if the proxy is idle between requests, it won’t close the connection to the upstream service until 1 hour of inactivity has passed.
If the above understanding is correct then for this configuration:
If the connection to the upstream service is closed due to the idleConnection timeout, and the client then tries to send a request, it would indeed result in a failure if the proxy cannot establish a new connection to the upstream service in time.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): v1.28.11/etc/os-release
):The text was updated successfully, but these errors were encountered: