Will the django itself not serve the REST calls from web server (Nginx). Why is Gunicorn required if django itself could do that.
Asked
Active
Viewed 1,967 times
0
-
1Django is not a server. – Daniel Roseman Mar 01 '18 at 08:39
-
Thanks @DanielRoseman – vinod kumar Mar 02 '18 at 03:23
1 Answers
0
By "django itself" I assume you mean the development server? The basic answer is that the development server is just for development and Gunicorn is a production ready HTTP server that interfaces very nicely with Python/Django.
You could run Gunicorn without Nginx, for example. Nginx is added in addition mostly to serve static files and/or manage incoming requests, relieving the strain on the Gunicorn application server.
See this write up for a very good description of the Gunicorn + Nginx combo: https://www.digitalocean.com/community/tutorials/how-to-deploy-python-wsgi-apps-using-gunicorn-http-server-behind-nginx.