Skip to content

services

Backend pools that routes send traffic to.

Type: list of object

Backend servers. Set this or split.

Type: BackendAddress · Required

host:port, [ipv6]:port or unix:///path.sock.

Type: integer · Default: 1

Relative share of traffic.

services.<name>.health planned for v0.4

Section titled “services.<name>.health ”

Type: object

Active and passive health checks.

Type: object

Periodic probes.

services.<name>.health.active.expected_status

Section titled “services.<name>.health.active.expected_status”

Type: string · Default: 200-399

Accepted status codes, e.g. 200 or 200-399.

Type: integer · Default: 2

Consecutive successes before a backend is healthy.

Type: Duration · Default: 10s

Time between probes.

Type: string · Default: /

Path to request.

Type: integer

Probe this port instead of the backend’s.

Type: Duration · Default: 2s

Probe timeout.

Type: integer · Default: 3

Consecutive failures before a backend is unhealthy.

Type: object

Ejection based on observed failures.

Type: Duration · Default: 30s

How long an ejected backend stays out before it is tried again.

Type: integer · Default: 5

Failures within window that eject a backend.

Type: Duration · Default: 30s

Sliding window for counting failures.

Type: object · Default: {"hash_on":null,"policy":"round_robin"}

How a backend is chosen for each request.

Type: string

Header or cookie name for header_hash and cookie_hash.

Type: round_robin · random · least_conn · least_requests · p2c · ip_hash · header_hash · cookie_hash · Default: round_robin

Selection policy.

  • round_robin: Weighted round-robin.
  • random: Weighted random.
  • least_conn: Fewest open connections.
  • least_requests: Fewest in-flight requests.
  • p2c: Power of two random choices.
  • ip_hash: Consistent hash of the client IP.
  • header_hash: Consistent hash of a request header (hash_on).
  • cookie_hash: Consistent hash of a cookie (hash_on).

Type: boolean · Default: true

Forward the client’s Host header (otherwise the backend address is used).

services.<name>.retries planned for v0.4

Section titled “services.<name>.retries ”

Type: object

Retries of failed requests (transport failures only, see ADR-0010).

Type: integer · Default: 2

Additional attempts after the first.

Type: integer · Default: 20

Maximum share of retries relative to requests, in percent, to avoid retry storms.

Type: list of connect · reset · timeout · Default: ["connect"]

Failures that are retried.

services.<name>.retries.retry_non_idempotent

Section titled “services.<name>.retries.retry_non_idempotent”

Type: boolean · Default: false

Also retry non-idempotent methods such as POST. Only safe if backends are idempotent.

Type: http · https · h2c · Default: http

Protocol spoken to the backends. gRPC uses h2c (cleartext) or https.

  • http: HTTP/1.1 in cleartext.
  • https: HTTP/1.1 or HTTP/2 over TLS.
  • h2c: HTTP/2 in cleartext (gRPC without TLS).

services.<name>.split planned for v0.4

Section titled “services.<name>.split ”

Type: list of object

Weighted traffic split over other services (canary, blue/green). Set this or backends.

Type: string · Required

Another service (name or name@provider).

Type: integer · Required

Relative share of traffic.

services.<name>.sticky planned for v0.4

Section titled “services.<name>.sticky ”

Type: object

Session affinity with a cookie.

Type: object · Required

Affinity cookie.

Type: boolean · Default: true

Hide from JavaScript.

Type: Duration

Lifetime; a session cookie when omitted.

Type: string · Required

Cookie name.

Type: lax · strict · none · Default: lax

SameSite attribute.

  • lax: Lax.
  • strict: Strict.
  • none: None (requires secure).

Type: boolean · Default: true

Send only over HTTPS.

Type: object · Default: {"connect":"5s","idle":"1m30s","read":"1m","write":"1m"}

Upstream timeouts.

Type: Duration · Default: 5s

Establishing a connection.

Type: Duration · Default: 1m30s

Keeping an idle pooled connection.

Type: Duration · Default: 1m

Waiting for response data.

Type: Duration · Default: 1m

Sending request data.

Type: object

TLS to the backends when scheme is https.

Type: string

CA bundle used instead of the system roots.

Type: string

Client certificate for upstream mTLS.

Type: string

Client key for upstream mTLS.

Type: string

SNI and verification name, when it differs from the backend host.

Type: boolean · Default: true

Verify the backend certificate and host name.