Git Product home page Git Product logo

Comments (4)

andrewgodwin avatar andrewgodwin commented on May 21, 2024 5

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.

adihat avatar adihat commented on May 21, 2024

@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.

tomchristie avatar tomchristie commented on May 21, 2024

@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.

udipercepto avatar udipercepto commented on May 21, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.