-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
docs: please make sticky sessions requirement louder #1099
Comments
There is a section under Deployment that is specifically dedicated to scalability. How can it be louder? https://python-socketio.readthedocs.io/en/latest/server.html#scalability-notes |
When I initially set up my cluster, I focused on the using a message queue section because it had the phrase 'horizontal scaling' in it, and because I expected that I would need to connect to a routing layer I also focused on the ASGI section, but the rest of the deployment section was a list of alternate deployment methods. It didn't occur to me that the last item in that list would be a critical todo item for clustering. Maybe:
|
Sticky sessions are optional. Only required if you want to use the polling transport. It's very common to remove the sticky sessions requirement by configuring clients to connect directly through WebSocket, which is a single request, so no need for session affinity. But the point is well taken, anyway. I will review how to organize the content better. |
non urgent obviously, thanks for the attention |
Is your feature request related to a problem? Please describe.
When run as a cluster, this library requires sticky sessions to be enabled. This wasn't obvious at first and so I deployed a buggy cluster.
Please improve the docs or errors to make this requirement clearer (and I'm happy to submit a docs / error message PR, if helpful).
(Also thank for for providing this library -- I am very happy to be able to run my socketio backend in my existing fastapi stack).
Describe the solution you'd like
In the codebase:
In docs:
In the using a message queue section, can you link to the scalability notes warning (which says to use sticky sessions), and make it clear your cluster will fail if you don't meet the reqs?
Describe alternatives you've considered
The alternative I tried first was having my chat intermittently fail in prod. Because my cluster is small, it usually connected eventually, so for a while I assumed it was an error in the ordering of my authorization logic + socket connection.
Logs
n/a, but let me know if you want me to capture something
Additional context
Did a readthrough of other issues mentioning this:
The text was updated successfully, but these errors were encountered: