What to replace gunicorn when using websocket


We have a sanic server behind gunicorn which are Ok. The problem is if we wanted to accept connections through websocket, we couldnt use gunicorn, so we considered daphne but it seems sanic dosent work with daphne, (dose it?), if so any clue how to get them working together, if not what could we use as a server interface beside sanic while using websocket?


We are still working on the shift to ASGI support, so uvicorn, daphne, and hypercorn are still a ways off. You could use nginx or something else to route directly to your app for the websocket, but you would lose the functionality of running behind a WSGI server. Alternately (I haven’t tried it) uWSGI may be able to do what you need.


My suggestion would be to redirect directly from nginx to Sanic. This is what I have done in production and have helped others setup. It works well.

In the future when ASGI is supported you will have your choice (Daphne hypercorn, uvicorn, etc).