Options
All
  • Public
  • Public/Protected
  • All
Menu

the HTTP request params, mainly two parts:

  1. EnvoyContext, telling what the situation is
  2. request params, like timeout, retry, etc.

Hierarchy

Index

Constructors

constructor

Properties

context

context: EnvoyContext

request context read from ingress traffic

customHeaders

customHeaders: HttpHeader

extra customer headers to be set in the request

maxRetries

maxRetries: number

If a retry policy is in place, Envoy will default to retrying one time unless explicitly specified. The number of retries can be explicitly set in the route retry config or by using this header. If a retry policy is not configured and x-envoy-retry-on or x-envoy-retry-grpc-on headers are not specified, Envoy will not retry a failed request.

A few notes on how Envoy does retries:

  • The route timeout (set via x-envoy-upstream-rq-timeout-ms or the route configuration) includes all retries. Thus if the request timeout is set to 3s, and the first request attempt takes 2.7s, the retry (including backoff) has .3s to complete. This is by design to avoid an exponential retry/timeout explosion.

  • Envoy uses a fully jittered exponential backoff algorithm for retries with a base time of 25ms. The first retry will be delayed randomly between 0-24ms, the 2nd between 0-74ms, the 3rd between 0-174ms and so on.

  • If max retries is set both by header as well as in the route configuration, the maximum value is taken when determining the max retries to use for the request.

perTryTimeout

perTryTimeout: number

Setting this will cause Envoy to set a per try timeout on routed requests. This timeout must be <= the global route timeout (see ) or it is ignored. This allows a caller to set a tight per try timeout to allow for retries while maintaining a reasonable overall timeout.

retryOn

retryOn: HttpRetryOn[]

on what condition shall envoy retry

timeout

timeout: number

Setting this header on egress requests will cause Envoy to override the route configuration. The timeout must be specified in millisecond units. Also see

Methods

assembleRequestHeaders

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc