I have a Django server, that also has a socketio compenent using python-socketio library. I'm trying to produce a relatively simple but production ready deployment for it on an Amazon EC2 Instance. I've successfully configured the NGINX proxy.
I'm curious about the best way to deploy, specifically with regard to WSGI.
I've tried using the raw eventlet WSGI server (eventlet.wsgi.server(eventlet.listen(("", 8000)), application)
). I then start it with python manage.py runserver
.
This has worked okay, but I'm unsure about how scalable it is.
It seems like the standard stack is Django + Gunicorn + NGINX. Based on python-socketio
documentation, this should be possible. I tried django + eventlet + gunicorn, but it seems like gunicorn a) doesn't play nice with eventlet and b) only supports one worker. Gevent + Gunicorn doesn't have this bug, but still only supports one worker. Also, I'm not sure how actively maintained gevent is. So I'm not sure how scalable either Gunicorn + eventlet or Gunicorn + geventlet is as a WSGI server. So I'm not sure if Gunicorn is my best bet, or if it's too limited.
So TL;DR a) what scalable stack have you experienced success with for deploying Django + python-socketio and b) if it is still Django + gunicorn + NGINX, how should I configure my WSGI server to play well with Gunicorn.