Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

89
Visualizações
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 Respostas
Responde à pergunta

0

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

about 4 years ago · Santiago Trujillo Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda