Setting this header on egress requests will cause Envoy to attempt to retry failed requests (number of retries defaults to 1 and can be controlled by x-envoy-max-retries header or the route config retry policy). The value to which the x-envoy-retry-on header is set indicates the retry policy.

## Index

### Enumeration members

- CONNECT_FAILURE
- HTTP_5XX
- REFUSED_STREAM
- RETRIABLE_4XX

## Enumeration members

### CONNECT_FAILURE

CONNECT_FAILURE: = "connect-failure"

- Defined in envoy-http-request-params.ts:38

Envoy will attempt a retry if a request is failed because of a connection failure to the upstream server (connect timeout, etc.). (Included in 5xx)

NOTE: A connection failure/timeout is a the TCP level, not the request level. This does not include upstream request timeouts specified via x-envoy-upstream-rq-timeout-ms or via route configuration.

### HTTP_5XX

HTTP_5XX: = "5xx"

- Defined in envoy-http-request-params.ts:28

Envoy will attempt a retry if the upstream server responds with any 5xx response code, or does not respond at all (disconnect/reset/read timeout). (Includes connect-failure and refused-stream)

NOTE: Envoy will not retry when a request exceeds x-envoy-upstream-rq-timeout-ms (resulting in a 504 error code). Use x-envoy-upstream-rq-per-try-timeout-ms if you want to retry when individual attempts take too long. x-envoy-upstream-rq-timeout-ms is an outer time limit for a request, including any retries that take place.

### REFUSED_STREAM

REFUSED_STREAM: = "refused-stream"

- Defined in envoy-http-request-params.ts:55

Envoy will attempt a retry if the upstream server resets the stream with a REFUSED_STREAM error code. This reset type indicates that a request is safe to retry. (Included in 5xx)

### RETRIABLE_4XX

RETRIABLE_4XX: = "retriable-4xx"

- Defined in envoy-http-request-params.ts:49

Envoy will attempt a retry if the upstream server responds with a retriable 4xx response code. Currently, the only response code in this category is 409.

NOTE: Be careful turning on this retry type. There are certain cases where a 409 can indicate that an optimistic locking revision needs to be updated. Thus, the caller should not retry and needs to read then attempt another write. If a retry happens in this type of case it will always fail with another 409.

Generated using TypeDoc