Components of a stack

A production Django web stack is built using several kinds of application (or layers, depending on your terminology). While constructing your web stack, some of the choices you might need to make are as follows:

  • Which OS and distribution? For example, Debian, Red Hat, or OpenBSD.
  • Which WSGI server? For example, Gunicorn or uWSGI.
  • Which web server? For example, Apache or Nginx.
  • Which database? For example, PostgreSQL, MySQL, or Redis.
  • Which caching system? For example, Memcached or Redis.
  • Which process control and monitoring system? For example, Upstart, Systemd, or Supervisord.
  • How to store static media? For example, Amazon S3 or CloudFront

There could be several more, and these choices are not mutually exclusive either. Some use several of these applications in tandem. For example, username availability might be looked up on Redis, while the primary database might be PostgreSQL.

There is no one size fits all answer when it comes to selecting your stack. Different components have different strengths and weaknesses. Choose them only after careful consideration and testing. For instance, you might have heard that Nginx is a popular choice for a web server, but you might actually need Apache's rich ecosystem of modules or options.

Sometimes, the selection of the stack is based on various non-technical reasons. Your organization might have standardized on a particular operating system, say, Debian for all its servers, or your cloud hosting provider might support only a limited set of stacks.

Hence, how you choose to host your Django application is one of the key factors in determining your production setup.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.243.184