-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Sticky session doesn't work with websocket #3343
Comments
I have come across the same issue and conclusion. With some guidance, I could help out with a PR. |
I've reproduced the issue. It seems that the problem comes from vulcand/oxy that ignores existing headers in the upgrade. |
Hi @emilevauge, any target release of traefik that will embed vulcand/oxy#137 fix? Thanks! |
@daniellavoie the PR on Traefik will come very soon |
If you need help I can make it an excuse for my first PR on traefik :P |
@daniellavoie with pleasure, if you make it, that would be on branch 1.6 :) |
Oh, sorry guys, didn't see your messages ... |
Closed by #3425. |
I can confirm that since 1.6.3, the sticky cookie is correctly sent in the websocket response. Thanks guys ! |
Do you want to request a feature or report a bug?
Bug
What did you do?
I wanted to load balance a websocket service and have the sticky session enabled. Each user open multiple websocket streams and they need to end up at the same place (not my code, not something we can change right now).
I use docker but I tried to configure manually the load balancing using a file with rules and I had the same result.
I created a simple websocket echo server to easily test the feature. See configuration below.
What did you expect to see?
I expect my websocket connexion to be sticky.
What did you see instead?
The sticky session cookies is not created and the session is not sticky. It works great for non websocket services.
Http request:
Http response:
The dashboard shows the stickiness as enabled:
Output of
traefik version
: (What version of Traefik are you using?)What is your environment & configuration (arguments, toml, provider, platform, ...)?
test websocket echo server
If applicable, please paste the log output in DEBUG level (
--logLevel=DEBUG
switch)This is the log just after I started my container We can see that the sticky session is enabled with the cookie name LB_TRAEFIK:
Sticky session with cookie LB_TRAEFIK
.The text was updated successfully, but these errors were encountered: