Support sticky sessions for ServiceDiscoveryProviders #1902
Replies: 2 comments 2 replies
-
I'll have to investigate this to find out if it's true, though I'm not sure it's totally appropriate to address if it is true. Sticky sessions are not generally recommended and the reason why is that requests from one client are always directed to the same server, making that client dependent on that server. If you are using Service Discovery and the server drops from the pool, any clients that were sticky to that server will experience a loss of session and have other potential side effects. It doesn't seem like SD + Sticky Sessions would mix very well, especially in an environment where servers change frequently. That being said, we do offer both, so we probably should implement a fix at some point if it doesn't already work. |
Beta Was this translation helpful? Give feedback.
-
It's true that sticky sessions are generally not favorable. But in some cases the underlying technology needs it. (Sadly) If I understand your documentation correctly it's not supported. I might be mistaken though and if i am that would be great. The reason why I would like sticky sessions is that we plan to use SignalR. I have looked into the ServiceFabric implementation and it looks like you're using the ServiceFabric reverse proxy for the load distribution? There is an endpoint in ServiceFabric for retrieving information about each service that's running on the system (Service Discovery Provider) but it doesn't look like you're using it? |
Beta Was this translation helpful? Give feedback.
-
Expected Behavior / New Feature
Support sticky sessions for ServiceDiscoveryProviders
Actual Behavior / Motivation for New Feature
When using websockets with ocelot in a distributed system, problem can arise since ocelot, as far as i know, doesn't support sticky sessions when working with service discovery providers.
The functionality could be great if it could work with both consul and servicefabric.
Feel free to delete this issue if i'm wrong.
Beta Was this translation helpful? Give feedback.
All reactions