Route timeout behavior during retry attempts in Envoy
0 reputation · 05 Feb 2023, 12:53 UTC
Envoy uses the timeout field within the Route configuration to define the maximum duration the proxy waits for an upstream response. When retries are enabled, the interaction between the overall route timeout and the per_try_timeout configuration determines when a request is finally terminated with a 504 Gateway Timeout.
There is uncertainty regarding the precise calculation of the remaining time budget for subsequent retry attempts when a per-try timeout is shorter than the total route timeout. Specifically, it is unclear if a per-try timeout reset extends the total request lifetime or if the global route timeout acts as a hard ceiling regardless of the retry count.
- Does the total route timeout include the time spent on all previous failed retry attempts?
- In what scenario would a request be terminated by the global timeout before the final per-try timeout expires?