-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support sticky sessions for load balancer #322
Comments
@darting thanks for your interest in the project. At the moment Ocelot does not have any specific support for sticky sessions. |
hi @TomPallister, do you have any plan to support it? :) |
@darting I’m not sure, Ocelot has a load balancer abstraction so using some kind of identifier it shouldn’t be too hard. How would you want this to work? |
I think should be same with haproxy |
@darting OK Ill take a look ASAP! |
thanks :) |
hi @TomPallister, I think my scenario a bit complicated. the sticky sessions still not really work well for me. The first I need 100% sure the same http request should forward to same server. The second the Api server domain not same with the Front end, so I can not just use 'Set-Cookie'. Sticky sessions by query string for my case a bit complicated, since the querystring is encrypted. Now I am thinking, is it possible to write a custom load balancer and plugins to Ocelot. I think what I need is just a custom function generate an identifier for every request. Not really familiar with Ocelot, if I want to do myself which part I should start to check first? |
@darting take a look at ILoadBalancer and it’s implementations. Also look at the load balancing middleware. You might be able to do the work here with a new load balancer. All the requests get a guid from asp.net HttpContext.TraceIdentifier already! |
Hi there,
Does Ocelot support sticky session for load balance? And how to configure it?
Thanks
The text was updated successfully, but these errors were encountered: