Hi - I’m working on an application which is already deployed via AWS’ Elastic Container Service (ECS). We have a Celery worker and a Gunicorn web server running.
We’d like to add websockets to the application, have it working locally, and I’m now trying to figure out the best way to deploy it. I’ve read this gist about setting things up with Elastic Beanstalk, however that won’t be a 1 for 1 mapping with ECS. In particular, if we create a 2nd target group for the Daphne server and use a load balancer to route traffic at /ws to it, I’m not sure how we’d handle health checks for that target group (AWS target groups require an http endpoint which returns a 200).
I’m also considering switching all traffic to being served by Daphne rather than splitting it up between Gunicorn for wsgi and Daphne for asgi however I’m a little cautious about that based on other forum posts about splitting that up. Perhaps Daphne is more mature now and this isn’t as much of a concern?
Has anyone setup websockets with Gunicorn and Daphne on AWS ECS? Or, would anyone advise to completely switch over to Daphne (or Uvicorn) for all traffic?