Lets see:
Django is WSGI compatible. WSGI is Web Server Gateway Interface
Now, Nginx is a server. So we should be able to communicate with Django. So then why do we need uWSGI in between??
All say that uWSGI is a server which speaks wsgi protocol.
Then what is uwsgi protocol. How does it differ from WSGI (which is a protocol/specification)
And again, why do we find the combination Django + uWSGI + Nginx ??
Cant I speak WSGI between nginx & django?? Coz WSGI itself means to be an specification between WebServer (nginx) and Web Applications (django)
WSGI is specifically a Python interface, whereas Nginx is a general webserver. So at a minimum you need something between Nginx and Django that translates the standard http request into a WSGI one.
uWSGI is just one of several popular WSGI servers. Others include gunicorn and mod_wsgi (an Apache module which necessitates having Apache installed too). uWSGI happens to be my preferred one and nginx now has native support for its protocol, so you won't go to far wrong by using it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With