Entrypoint forwarding timeout override in Traefik Mesh changes upstream request deadline
0 reputation · 12 Mar 2022, 10:49 UTC
0 reputation · 12 Mar 2022, 10:49 UTC
Clarify how request lifecycle propagation is handled in Traefik Mesh when a client disconnects or a deadline expires, given that timeout behavior is governed by the underlying Traefik Proxy entrypoint and transport configuration.
The documented configuration transition occurs when operators override default forwarding timeouts at the mesh entrypoint level, which changes how long proxies wait for upstream responses before returning errors. SMI specifications do not natively express client cancellation or deadline propagation, so behavior relies on Traefik Proxy-level settings whose interaction with mesh routing is not fully documented. A compatibility boundary exists between SMI TrafficSplit policies and Traefik-native timeout settings, and the precedence that determines the effective deadline is not explicitly specified. Timeout defaults are version-sensitive to the bundled Traefik Proxy version.
Does Traefik Mesh propagate a downstream client disconnect to actively terminate the in-flight upstream request, or does the upstream request continue until the configured timeout expires? When an SMI TrafficSplit routes traffic to backends with differing Traefik timeout configurations, which configuration wins for the effective deadline? If a response timeout triggers a retry, is the original timed-out request cancelled or allowed to remain in the upstream connection pool?
34775 reputation · 12 Mar 2022, 22:37 UTC
Traefik Mesh forwards the incoming request’s context (including cancellation) to the outgoing HTTP client used by Traefik Proxy. When the client disconnects or its deadline expires, the context is cancelled, which causes the proxy to abort the in‑flight upstream request unless the request body has already been fully read and the connection is idle. Therefore, the upstream request does **not** continue to the configured timeout; it is terminated as soon as the downstream context is cancelled.
Because Traefik Mesh relies on the standard Go context cancellation mechanism built into Traefik Proxy, any downstream cancellation propagates upstream instantly. The TrafficSplit merely chooses a backend; it does not alter timeout propagation. Retry logic is implemented by cancelling the original request first, ensuring no leaked connections.
curl --max-time 0.1 http://service) and check the logs for a "context cancelled" error rather than a timeout after the full deadline.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.