envoyproxy / envoyproxy/envoy

Support stateful session affinity for weighted clusters to support use-cases like canary deployment

Open
#24,741 8 comments 0 reactions 1 assignee Claimed by @adisuissa View on GitHub
area/http_filter enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
428

Description

*Title*: Support stateful session affinity for weighted clusters to support use-cases like canary deployment

*Description*:
Currently cookie based stateful session affinity is implemented (see https://github.com/envoyproxy/envoy/pull/18207) but it only works within a cluster. When multiple clusters are used for a service and the user would like to maintain session affinity across clusters then it doesn't work.

e.g. client sends a request R1 and Envoy routes it to cluster C1 host C1H1. Envoy inserts a cookie in the response to maintain session affinity to H1. Client copies the cookie value in the next request R2 and because weighted-clusters (canary deployment) is in use, Envoy picks cluster C2 for R2 but the cookie is meaningless for C2 so Envoy picks a new host C2H2 and session affinity is broken. What we want is that Envoy should pick cluster C1 for R2 (because the cookie also has the cluster name encoded in it) and within C1 it should route R2 to C1H1.

[optional *Relevant Links*:]
https://github.com/istio/api/pull/2469#issuecomment-1245067340
https://github.com/istio/api/pull/2469#issuecomment-1246231933
https://github.com/istio/api/pull/2469#issuecomment-1247587910
https://github.com/istio/api/pull/2469#issuecomment-1248422947

CC @wbpcode

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.