server – Understanding the importance of Gunicorn and Nginx for Django web development

When author says that Django can’t handle real workloads, they most likely refer specifically to Django’s built-in webserver.

When you run Django in development environment, you can use it to test things out, but a proper webserver is a fairly complex piece of software and requires very specific competences to build. Moreover, there is no real reason for the people behind Django to also spend time making a fully fleshed-out webserver: it is much easier to build an interface for an existing one.

Nginx is a professionally made workhorse of a server. It is feature-rich and is built to handle production workloads. Most apps use a server like that on the front to handle niche responsibilities like caching, redirection, forming headers, compression etc.

So, now, Gunicorn. Gunicorn is a WSGI server. Broadly speaking, it facilitates communication between a variety of webservers and a variety of frameworks through a standardized interface. Plus it handles additional tasks, like load-balancing and maintaining instances of your app alive, so you don’t have to.