-
Notifications
You must be signed in to change notification settings - Fork 17
Sticky session support #90
Description
Hey,
I'd like to add sticky session support to yggdrasil. The idea is pretty straightforward , some workloads need a client to keep hitting the same upstream cluster for the duration of a session (think in-memory state, websockets, that kind of thing).
The plan would be to leverage Envoy's stateful session filter with cookie-based affinity, and expose it through ingress annotations like we already do for retries, timeouts, etc. Something like yggdrasil.uswitch.com/sticky-session: "true". Cookie-based feels like the right default since it's transparent and doesn't require anything on the client side.
Affinity would be at the cluster endpoint level, so a client gets pinned to a specific backend cluster.
A few things I'd like feedback on before starting:
- Cookie-based only or should we also consider header/source IP hashing?
- How should this behave when the pinned upstream goes unhealthy? Silent failover + re-pin?
Happy to hear thoughts on the approach before diving into implementation.