Skip to content

Network filter that caps the number of concurrently active connections on a filter chain.

AttachmentType URL (@type)Per-route overrideBuild feature
Filter chain (filters)type.googleapis.com/envoy.extensions.filters.network.connection_limit.v3.ConnectionLimitNot applicableNone

What it does

The connection limit filter caps how many connections a filter chain serves at the same time. The count lives in one process-wide atomic shared by all worker runtimes, so the cap holds exactly no matter how connections are spread across workers. Excess connections are closed at once, or held open for delay first — a cheap brake on connection-flood clients. It bounds concurrency; to bound the accept rate, use the listener local rate limit.

Minimal configuration

From arion-runtime-connection-limit.yaml; the fragment sits under filter_chains[].filters, before the terminal filter:

- name: connection_limit
  typed_config:
    "@type": type.googleapis.com/envoy.extensions.filters.network.connection_limit.v3.ConnectionLimit
    stat_prefix: cx_limit
    max_connections: 100
    delay: 1s

Fields

FieldTypeRequiredDefaultDescription
stat_prefixstringYes—Prefix for this filter's statistics.
max_connectionsuint64Yes—Maximum active connections on this filter chain.
delaydurationNounsetHold an over-limit connection open this long before closing it. Unset closes immediately.

The Envoy field runtime_enabled is not supported; a configuration that sets it is refused at startup.

Ordering and interactions

At most one connection limit filter per chain, always before the terminal filter. At runtime it is the first per-chain check on a new connection, ahead of the rate limit and RBAC filters. A slot is released the moment its connection closes. Rejections happen at the TCP level, so clients see a reset rather than an HTTP status. Debug logging is available under the connection_limit target (RUST_LOG=connection_limit=debug).

Continue

Start typing to search the site.

↑ ↓ to move Enter to open Esc to close