Skip to content

Field reference for route configurations: virtual hosts, route matching, actions, retry policies and header mutations.

A route configuration is written inline under the HTTP connection manager's route_config (or fetched over ADS with rds); the fields below are the Envoy field names Arion accepts, and any other field makes it refuse the configuration.

route_config

FieldTypeRequiredDefaultDescription
namestringyes—Route configuration name.
virtual_hostslistyes—At least one virtual host.
request_headers_to_addlistno[]Header mutations applied to every request.
request_headers_to_removelistno[]Header names removed from every request.
response_headers_to_addlistno[]Header mutations applied to every response.
response_headers_to_removelistno[]Header names removed from every response.
most_specific_header_mutations_winsboolnofalseApply route-level mutations after virtual-host and global ones instead of before.

Virtual hosts

FieldTypeRequiredDefaultDescription
namestringyes—Virtual host name.
domainslistyes—Host names to match: exact (api.example.com), suffix (*.example.com), prefix (example.*) or *. One wildcard, only at the start or end. Exact beats suffix, suffix beats prefix, * matches last; longer matches win within a kind.
routeslistno[]Routes, evaluated in order; the first match wins.
retry_policyobjectno—Default retry policy for routes in this host.
request_headers_to_add / request_headers_to_removelistno[]Request header mutations for this host.
response_headers_to_add / response_headers_to_removelistno[]Response header mutations for this host.

Routes

Each route has a match and exactly one action: route, redirect or direct_response.

FieldTypeRequiredDefaultDescription
namestringno""Route name; rendered by the %ROUTE_NAME% access-log operator.
matchobjectyes—Match criteria.
routeobjectone of—Forward to a cluster (route action).
redirectobjectone of—Return an HTTP redirect.
direct_responseobjectone of—Return a fixed response.
typed_per_filter_configmapno{}Per-route filter overrides, keyed by filter name.
request_headers_to_add / request_headers_to_removelistno[]Request header mutations for this route.
response_headers_to_add / response_headers_to_removelistno[]Response header mutations for this route.

Route match

FieldTypeRequiredDefaultDescription
prefixstringone of—Path prefix match.
pathstringone of—Exact path match.
safe_regexobjectone of—{regex: "..."}; must match the full path.
path_separated_prefixstringone of—Matches /api, /api/ and /api/... but not /apiv2. Must not end in / or contain ?.
case_sensitiveboolnotrueCase sensitivity for prefix, path and path_separated_prefix (not regex).
headerslistno[]Header matchers; all must match.
query_parameterslistno[]Query parameter matchers; all must match.

If no path specifier is given, the route matches every path.

routes:
  - match:
      prefix: "/api"
      headers:
        - name: ":method"
          string_match: { exact: "GET" }
      query_parameters:
        - name: version
          string_match: { exact: "v1" }
    route:
      cluster: api

Header matchers

name may be a regular header or one of the pseudo-headers :method, :path, :scheme.

FieldTypeRequiredDefaultDescription
namestringyes—Header (or pseudo-header) to inspect.
string_matchobjectone of—One of exact, prefix, suffix, contains or safe_regex, plus optional ignore_case (bool).
exact_match / prefix_match / suffix_match / contains_matchstringone of—Shorthand forms (case sensitive).
safe_regex_matchobjectone of—{regex: "..."}.
present_matchboolone of—Match when the header exists (any value). Combine with invert_match for "absent".
invert_matchboolnofalseInvert the result. A missing header only inverts for present_match.
treat_missing_header_as_emptyboolnofalseEvaluate a missing header as "". Ignored for present_match.

range_match is not supported.

Query parameter matchers

FieldTypeRequiredDefaultDescription
namestringyes—Query parameter name (case sensitive; first occurrence wins).
string_matchobjectno—Same shape as the header string_match.
present_matchboolnotrueMatch on presence or absence. Used when string_match is not set.

Route action

FieldTypeRequiredDefaultDescription
clusterstringone of—Name of the target cluster.
weighted_clustersobjectone of—Weighted split (below).
cluster_headerstringone of—Take the cluster name from this request header.
timeoutdurationno15sWhole-request upstream timeout, including retries. 0s disables it.
cluster_not_found_response_codeenumnoSERVICE_UNAVAILABLEAlso NOT_FOUND or INTERNAL_SERVER_ERROR.
prefix_rewritestringno—Replace the matched prefix before forwarding. Mutually exclusive with regex_rewrite.
regex_rewriteobjectno—{pattern: {regex: "..."}, substitution: "..."} applied to the path.
retry_policyobjectno—Route-level retry policy; overrides the virtual host's.
priorityenumnoDEFAULTRouting priority (DEFAULT or HIGH); selects the matching circuit-breaker thresholds.
hash_policylistno[]Hash policies for RING_HASH / MAGLEV clusters.
upgrade_configslistno[]{upgrade_type, enabled} entries. Only websocket can be enabled; connect is accepted only with enabled: false.

weighted_clusters

Traffic is split in proportion to the weights.

FieldTypeRequiredDefaultDescription
clusterslistyes—One entry per target.
clusters[].namestringyes—Cluster name.
clusters[].weightuint32yes—Relative weight, at least 1.
route:
  weighted_clusters:
    clusters:
      - name: backend-v1
        weight: 90
      - name: backend-v2
        weight: 10

hash_policy

Policies are applied in order and their hashes combined; a matching terminal policy stops the list, and if nothing matches a random hash is used.

FieldTypeRequiredDefaultDescription
headerobjectone of—{header_name: "..."} — hash that header's value.
query_parameterobjectone of—{name: "..."} — hash that query parameter's value.
connection_propertiesobjectone of—{source_ip: true} — hash the source address.
terminalboolnofalseStop evaluating further policies when this one applies.

Retry policy

Available on virtual hosts and route actions.

FieldTypeRequiredDefaultDescription
retry_onstringyes—Comma-separated conditions: 5xx, gateway-error, reset, connect-failure, envoy-ratelimited, retriable-4xx, refused-stream, retriable-status-codes, retriable-headers, http3-post-connect-failure.
num_retriesuint32no1Maximum retry attempts.
per_try_timeoutdurationnononeTimeout per attempt. Unset means attempts are bounded only by the route timeout.
retriable_status_codeslistno[]Status codes for retriable-status-codes.
retry_back_offobjectno25ms/250ms{base_interval, max_interval} for exponential backoff. base_interval is rounded up to at least 1ms; max_interval defaults to 10x the base and must not be smaller than it.
retriable_headerslistno[]Header matchers against the response, for retriable-headers.
retriable_request_headerslistno[]Request headers that must be present for retries to be attempted.
route:
  cluster: api
  timeout: 10s
  retry_policy:
    retry_on: "5xx,reset"
    num_retries: 3
    per_try_timeout: 2s
    retry_back_off:
      base_interval: 0.05s
      max_interval: 0.5s

Redirect

FieldTypeRequiredDefaultDescription
response_codeenumnoMOVED_PERMANENTLYAlso FOUND, SEE_OTHER, TEMPORARY_REDIRECT, PERMANENT_REDIRECT.
host_redirectstringno—Replace the host.
port_redirectuint16no—Replace the port. Combined with host_redirect they must form a valid authority.
scheme_redirectstringone of—Replace the scheme (for example https).
https_redirectboolone of—Shorthand for redirecting to https.
path_redirectstringone of—Replace the whole path.
prefix_rewritestringone of—Replace the matched prefix in the redirect target.
regex_rewriteobjectone of—{pattern: {regex}, substitution} applied to the path.
strip_queryboolnofalseDrop the query string from the redirect target.

Direct response

FieldTypeRequiredDefaultDescription
statusuint32yes—HTTP status code to return.
bodyobjectnoemptyA data source (inline_string, inline_bytes, filename or environment_variable), read once at configuration load.
routes:
  - match:
      prefix: "/healthz"
    direct_response:
      status: 200
      body:
        inline_string: "ok"

Header mutations

*_headers_to_add entries wrap a header and an append behavior; *_headers_to_remove entries are plain header names.

FieldTypeRequiredDefaultDescription
header.keystringyes—Header name.
header.valuestringone of—Header value. Supports access-log command operators such as %REQ(:PATH)% or %DOWNSTREAM_REMOTE_ADDRESS%.
header.raw_valuebytesone of—Raw value alternative to value; setting both is an error.
append_actionenumnoAPPEND_IF_EXISTS_OR_ADDAlso ADD_IF_ABSENT, OVERWRITE_IF_EXISTS_OR_ADD, OVERWRITE_IF_EXISTS.
keep_empty_valueboolnofalseKeep the header when its rendered value is empty.
request_headers_to_add:
  - header:
      key: x-original-path
      value: "%REQ(:PATH)%"
    append_action: OVERWRITE_IF_EXISTS_OR_ADD
request_headers_to_remove:
  - x-internal-debug

typed_per_filter_config

A map from the name of a filter in http_filters to an override; the named filter must exist and the override type must match its type.

@type (under type.googleapis.com/)OverridesDescription
envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimitlocal rate limitReplaces the filter's settings on this route.
envoy.extensions.filters.http.rbac.v3.RBACPerRouteHTTP RBAC{rbac: ...}; an empty override disables RBAC for the route.
envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRouteexternal processingDisables or overrides ext_proc on this route.
envoy.config.route.v3.FilterConfigany of the aboveWrapper with disabled: true to switch a filter off for the route, or config carrying one of the overrides. is_optional is not supported.

Continue

Start typing to search the site.

↑ ↓ to move Enter to open Esc to close