Stateful Session cookies incompatible between Envoy Processes.
#44.111 geöffnet am 25. März 2026
Repository-Metriken
- Stars
- (27.997 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 7T 21h) (260 gemergte PRs in 30 T)
Beschreibung
Title: Stateful Session cookies incompatible between Envoy Processes.
Description: When using Envoy as an Edge Proxy with multiple instances (an NLB in front) AND using the StatefulSession with cookies doesn't work properly.
The cookie is encoded with the expiry time BUT it uses the monotonic clock:
When HTTP requests are routed to different Envoy processes, they will have different values for their monotonic clock and the cookie can inadvertently expire sooner then its should, which will cause a new backend to get selected.
I believe the appropriate fix is for time_source_.systemTime() to be used so that two envoy processes can validate each other cookies.
cc @cpakulski