sticky_sessions
Sticky sessions HTTP filter.
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
On this page
Sticky sessions HTTP filter.
Configuration Notes
On request: looks up session store for pinned endpoint, sets ctx.pinned_endpoint_address. On response: injects session cookie or learns session ID from upstream.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
clusters | ClusterSessionConfig[] | yes | Per-cluster session persistence configurations. |
clusters[].name | string | yes | Cluster name this config applies to. |
clusters[].type | cookie | header | learn | yes | Session persistence mode: cookie injects cookies, header reads a request header, learn observes upstream response cookies or headers. |
clusters[].cookie_name | string | one of | Cookie name used to store the session ID. |
clusters[].cookie_attributes | CookieAttributes | one of | Cookie attributes for the Set-Cookie header. |
clusters[].cookie_attributes.domain | string | no | Domain attribute. |
clusters[].cookie_attributes.path | string | no | Path attribute. |
clusters[].cookie_attributes.http_only | bool | no | HttpOnly flag. |
clusters[].cookie_attributes.secure | bool | no | Secure flag. |
clusters[].cookie_attributes.same_site | Strict | Lax | None | no | SameSite attribute. |
clusters[].header_name | string | one of | Header name to read the session key from. |
clusters[].cookie_name | string | one of | Cookie name to observe in upstream responses. |
clusters[].ttl_secs | integer | no | Idle timeout for session entries in seconds (sliding TTL). The binding expires after this many seconds of inactivity. |
clusters[].failover | bool | no | Re-pin to a healthy endpoint when the pinned one is unhealthy. |
clusters[].max_entries | MaxEntries | no | Maximum number of session entries in the store. |
clusters[].eviction | lru | ttl | no | Eviction policy when at capacity. |
Example
filter: sticky_sessions
clusters:
- name: app_backend
type: cookie
cookie_name: "_praxis_route"
ttl_secs: 3600
cookie_attributes:
path: "/"
http_only: true
secure: true
same_site: Lax
failover: true
max_entries: 100000
eviction: lru