Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

90
Vistas
uWSGI equivalent for Django-Channels

I am aware that Django is request/response cycle and Django Channels is different, my question is not about this.

We know that uWSGI/gunicorn creates worker processes and can be configured execute each request in threads. So that it can serve 10 requests "concurrently" (not in parallel) in a single uWSGI worker process with 10 threads.

Now let's assume that each web client wants to create a websocket using Django Channels, from my limited understanding (with vanilla implementation), that it will process each message in a single thread, which means, to process x amount of connections concurrently, you need x amount of channel worker processes. I know someone will suggest to increase the number of processes, I am not here to debate on this.

My question is simply are there any existing libraries that does similar job with uWSGI/gunicorn that execute consumer functions in threads?

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I think you are asking for daphne. It is mentioned in channels document itself.

about 4 years ago · Santiago Trujillo Denunciar

0

Daphne provides an option to scale process using a shared FD. Unfortunately, it is not working as expected.

Rightnow, a better alternative is to use uvicorn. You can run multiple workers with

$ uvicorn project.asgi --workers 4

I have been using this in production and it seems good enough.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda