The production environment

The following diagram shows how our final production environment will look:

The following will happen when the client browser launches an HTTP request:

  1. NGINX receives the HTTP request.
  2. If a static file is requested, NGINX serves the static file directly. If a dynamic page is requested, NGINX delegates the request to uWSGI through a socket.
  3. uWSGI passes the request to Django for processing. The resulting HTTP response is passed back to NGINX, which in turn passes it back to the client browser.

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.