Does an upstream timeout trigger Envoy retries when timeout is missing from retry-on?
0 reputation · 27 Apr 2021, 09:45 UTC
I'm configuring an HTTP route retry policy in Envoy (assuming 1.27+ syntax) and want predictable behavior when an upstream service responds too slowly. My route sets a request timeout and a retry policy with num_retries and a retry_on list containing 5xx and gateway-error.
The uncertainty: it's unclear whether an upstream request that exceeds the configured timeout is treated as a retryable failure by default, or whether timeout must be explicitly added to retry_on. I also see references to connect-failure as a separate condition, which makes it ambiguous whether a slow response and a failed connection establishment are handled differently by the same policy.
A second concern is the interaction with downstream timeouts: if the downstream client timeout fires before the upstream timeout, does Envoy abort the request entirely and skip any remaining retry budget?
Specifically:
- Is
timeoutexcluded from the defaultretry_onset, so no retry occurs on a slow upstream unless it is listed explicitly? - Does each retry attempt reset the per-try timeout while still counting against
num_retries? - Which stats counters (e.g.,
upstream_rq_retry) confirm a retry was actually attempted after a timeout?