Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load balancing by cookie #368

Closed
samutamm opened this issue Nov 11, 2021 · 0 comments · Fixed by #1132
Closed

Load balancing by cookie #368

samutamm opened this issue Nov 11, 2021 · 0 comments · Fixed by #1132
Assignees
Labels
enhancement New feature or request

Comments

@samutamm
Copy link
Contributor

samutamm commented Nov 11, 2021

Sometimes we might want the same instance to serve all request from a user, during the whole session. This way all user or session specific data is loaded and cached to only one instance.

The reverse Proxy currently supports load balancing using roundRobin, random, weightedRandom, ipHash or headerHash strategies. ipHash and headerHash enables routing clients to specific instances using ip or a header field as hashing key. It would be nice if one could use cookie also to choose the instance, eg. cookieHash load balancing strategy.

While this can already be achieved by using headerHash and specifying Cookie/Set-Cookie header,

loadBalance:
  policy: headerHash
  headerHashKey: Set-Cookie

it would be more convenient to only specify

loadBalance:
  policy: cookieHash

Then later in the future, to go even further with cookieHash, the cookie could be generated and added to response, when user sends the first request.

@samutamm samutamm added the enhancement New feature or request label Nov 11, 2021
@xxx7xxxx xxx7xxxx self-assigned this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants