Hi, I have a django project that has the following services
django, celery, celery beats, channels, nginx (everything works with docker)
My question is the following, when deploying in production, is it necessary to set up two different servers for django and channels? or can it be done only with uvicorn/daphne and django's ASGI config?
Option 1Deploy only with daphne
In nginx both, django and channels point to the same server
daphne -b 0.0.0.0 -p 8000 config.asgi: application
Option 2
Deploy django and channels separately
In nginx, django and channels have separate servers
- For django
/ usr / local / bin / gunicorn config.asgi: application -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8080 --chdir = / app- For channels
daphne -b 0.0.0.0 -p 8000 config.asgi: applicationPreviously when django use only WSGI, it was necessary to run both services separately. But now I have doubts since django can use ASGI directly.
Also, does anyone have any experience regarding the performance of using daphne, uvicorn or some other server?