Add support for session affinity during weighted routing with Istio#1280
Add support for session affinity during weighted routing with Istio#1280aryan9600 merged 3 commits intofluxcd:mainfrom
Conversation
Codecov ReportBase: 54.45% // Head: 54.72% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1280 +/- ##
==========================================
+ Coverage 54.45% 54.72% +0.27%
==========================================
Files 81 81
Lines 9408 9515 +107
==========================================
+ Hits 5123 5207 +84
- Misses 3663 3682 +19
- Partials 622 626 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
stefanprodan
left a comment
There was a problem hiding this comment.
Please document this feature in deployment-strategies.md and in the Istio guides.
Add `.spec.analysis.sessionAffinity` to configure session affinity for weighted routing. Add support for session affinity in the Istio router, using the `Set-Cookie` and `Cookie` headers. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
07299e3 to
8705c8e
Compare
21afb7c to
3f9960e
Compare
3f9960e to
b095713
Compare
stefanprodan
left a comment
There was a problem hiding this comment.
LGTM
Thanks @aryan9600 🏅
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
b095713 to
d16c969
Compare
Add support for session affinity/sticky sessions during weighted routing with Istio, i.e. when a user is routed to the canary deployment, all subsequent requests from that user will hit the canary deployments, even though weighted routing is active.
This feature can be enabled by specifying a
.spec.analysis.sessionAffinty.cookieName. This value combined with a random sequence (<cookie-name>: <random-sequence>) is used as the value of theSet-Cookieheader, and then all requests' headers that match against this value are sent to the canary deployment. Users can also specify.spec.analysis.sessionAffinity.maxAgeto configure the lifetime of the cookie being set.Fixes: #1198, #1232