istio icon indicating copy to clipboard operation
istio copied to clipboard

Cluster session affinity for multiple services (multi-cluster)

Open DamianFekete opened this issue 2 years ago • 2 comments

Feature request: session-affinity to a cluster based on a cookie in a multi-cluster / multi-network set-up.

Flow:

  1. Request comes in (over the IngressGateway)
  2. If a cookie is set, it is used to determine if the requests remains in the current cluster or goes to another cluster (over an EastWestGateway). The request remains in the current cluster if:
  • the other cluster or the endpoint in the other cluster is not available
  • the cookie is not present or is invalid
  1. (?) If the cookie remains in this cluster, the cookie is overwritten (as needed), so that future requests remain in this cluster
  2. The cookie is automatically created and its value is set to the current cluster when an incoming request without a valid cookie is first seen

Alternatives that I've considered As far as I can see, the current load-balancing settings affect the services (one host) individually, so two different services behind one IngressGateway will not necessarily be served by the same cluster, even if they try to use the same cookie for the ConsistentHash in the DestinationRule.

Affected product area

[ ] Docs [ ] Installation [x] Networking [ ] Performance and Scalability [ ] Extensions and Telemetry [ ] Security [ ] Test and Release [ ] User Experience [ ] Developer Infrastructure

Affected features (please put an X in all that apply)

[x] Multi Cluster [ ] Virtual Machine [ ] Multi Control Plane

Additional context

Related to https://discuss.istio.io/t/istio-session-affinity-for-multiple-hosts-multi-cluster-multi-network/12825

DamianFekete avatar May 10 '22 06:05 DamianFekete

Any comments, suggestions, workarounds?

DamianFekete avatar May 30 '22 11:05 DamianFekete

🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2022-05-10. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

istio-policy-bot avatar Aug 23 '22 07:08 istio-policy-bot