-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Update documentation of usage with Gunicorn + gevent/eventlet #1280
Comments
The doc update for gevent-websocket is being discused in #1272. I'm taking care of that. Disabling long-polling allows you to use multiple workers in Gunicorn correct, but it has some disadvantages. And even without the sticky sessions, you still need to use a message queue for the workers to coordinate. I have been thinking about how to explain this in the documentation without making it even more convoluted than it is and at some point I'm going to reorganize the docs to better convey these options in addition to the more traditional ones. I have an issue for this work as well #1239. |
References to gevent-websocket have been removed. |
@miguelgrinberg sorry I know you're still working on #1239, but I'm wondering if you could briefly elaborate on these disadvantages:
I'm currently exploring ways to get more throughput from my socketio servers, and using gunicorn with multiple gevent workers is something I was considering. Any insight you have would be greatly appreciated! |
@lsapan I think this is less interesting than it sounds because in reality multiple workers have always been supported.
In both cases each instance of Socket.IO must connect to a message queue. |
@miguelgrinberg got it, thanks for clarifying! I just wanted to make sure I wasn't missing some unforeseen issue. Thanks again for such an awesome library! ✨ |
Describe the bug
Currently the documentation still states that for websocket support with Gevent, I need to use gevent-websocket. Same for Gevent + Gunicorn.
simple-websocket
support was added in this commit so now the docs, in my opinion, should mention that nothing is needed for websocket support (batteries included). But maybe it worth mentioning the difference between two packages (I haven't found comparison, but in my opinionsimple-websocket
is just simpler to configure - almost nothing todo).https://python-socketio.readthedocs.io/en/stable/server.html#gevent
Another question is: why doc says that gunicorn has some limitation of workers number if it's not really true? If I don't miss something, I could be true only if the app uses long-polling with sticky sessions, but otherwise I don't see any reason not to use >1 workers in gunicorn. Am I wrong?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The doc shouldn't mention
gevent-websocket
unless it has some advantages as an alternative.Logs
no logs
Thank you for your work! 🤗
The text was updated successfully, but these errors were encountered: