Comments (4)
Daphne is asynchronous code, it doesn't need worker threads like gunicorn. If you want multiple processes (you should have maximum 1 per physical core on the machine), then run them as separate instances and use nginx/haproxy/or similar to loadbalance across them.
from daphne.
@andrewgodwin so to clarify, if one has 5 nodes, it's recommended to setup a single daphne process on each machine and then use an application load balancer across them?
from daphne.
@adihat Typically you'll want to run multiple processes on each instance. (One-per-core will generally work well.) And yes, then use load balancers to distribute between the multiple processes and multiple instances.
from daphne.
@andrewgodwin I am using nginx to load balance between 2 daphne processes and I see sometimes these kind of messages -
[daphne.http_protocol:365] Message on unknown channel u'daphne.response.PBWpKJGGxs!dJnxtfaczV' - discarding
I thought it because a websocket client that has a response channel on one daphne is balanced to the other. Is it possible? and if so, how can I work with more than one daphne on a specific machine with nginx?
Thank you
from daphne.
Related Issues (20)
- Missing support for --nostatic and --insecure options in Daphne's runserver command HOT 2
- how to set websocket send buffersize in daphne
- issuse when i using daphe in my django app with streaminghttpresponse HOT 7
- Can daphne run WSGI apps? HOT 6
- Does daphne have a file for initialization?
- Requests with Transfer-Encoding: chunked have no content HOT 14
- StreamHttpResponse with sync operations break in Daphne HOT 5
- Memory usage: Daphne loading all the file in memory (POST request) HOT 7
- Text streaming buffered issue
- Implement WebSocket Denial Response extension HOT 8
- [feature request] trailing headers HOT 1
- Add support for Python 3.12
- DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 HOT 1
- Daphne with self signed ssl HOT 2
- Daphne allows invalid characters within header names HOT 5
- Unix File Socket Argument HOT 12
- TypeError: object HttpResponse can't be used in 'await' expression HOT 3
- add support for --proxy-headers and friends in runserver HOT 4
- fd_endpoint.py is not properly installed HOT 7
- python manage.py runserver not working HOT 5
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 daphne.