Comments (5)
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.
from python-socketio.
References to gevent-websocket have been removed.
from python-socketio.
@miguelgrinberg sorry I know you're still working on #1239, but I'm wondering if you could briefly elaborate on these disadvantages:
Disabling long-polling allows you to use multiple workers in Gunicorn correct, but it has some 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!
from python-socketio.
@lsapan I think this is less interesting than it sounds because in reality multiple workers have always been supported.
- If you want to use long-polling and websocket both: Run multiple single-worker Gunicorns (each on a different port), and put a load balancer such as nginx in front of them with sticky sessions enabled.
- If you want only websocket: You can run a single Gunicorn process with multiple workers, but clients attempting to connect with long-polling will get errors. This is because the Gunicorn load balancer does not support sticky sessions.
In both cases each instance of Socket.IO must connect to a message queue.
from python-socketio.
@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! ✨
from python-socketio.
Related Issues (20)
- Need help with this reconnecting issue
- Flask-SocketIO does not handle Redis Sentinel failover with KombuManager HOT 2
- Clients never receive room emit - Gunicorn+Uvicorn/FastAPI/Redis with preload_app=True, workers>1 HOT 4
- In Python 3.12, AttributeError: 'called_once_with' is not a valid assertion HOT 3
- May need to remove "pip install aioredis" from the documentation
- 5.10.0: pytest is failing HOT 4
- `max_http_buffer_size` value seem ignored by the server HOT 14
- Implementing `__enter__`/`__exit__` on `Client` like `SimpleClient` HOT 2
- Request: type hints (e.g. for mypy) HOT 3
- sio.disconnect() will connect after a connection drop HOT 21
- Wildcard / catch-all namespace for event handlers HOT 1
- Heroku Problems with Gevent (Request Timeout + Polling Hanging)
- Concurrent broadcasting HOT 2
- All connections stop processing events at the same time
- Session not found when using sio.transport(sid) due to wrong session id HOT 1
- _ping background task not cancelled by async_server.shutdown() HOT 1
- Option to reconnect on initial connection failure
- Value error : Invalid aysnc_mode specified HOT 2
- Python socket ids for client and server dont match. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-socketio.