what are the best practises for a SaaS coded in Django?

Sources:

In setting up Django for SaaS applications, it's crucial to focus on the deployment architecture and utilizing up-to-date technologies:

  1. Server Setup: Django can either be embedded in Apache with mod_wsgi or run on a separate server like Unicorn and then proxied through a web server. This setup affects how Django manages HTTP requests and connections. The choice depends on your specific application needs and infrastructure 1 .

  2. HTTP/2 Capabilities: Utilizing HTTP/2 can streamline multiple requests through a single socket, enhancing performance. You can have Nginx handle HTTP/2 capabilities and proxy these to your Django application. However, for advanced features like server push, Django needs native support within the framework because these cannot be achieved through simple proxied HTTP setups 1 .

These practices embrace security, efficiency, and scalability in deploying Django for robust SaaS offerings.

Django Production Setup

Andrew explains running Django in production, mentioning options like embedding in Apache or using a separate server like Unicorn. He discusses the benefits of HTTP/2 and the need for native support in frameworks for advanced features like server push.

The Changelog

Python, Django, and Channels
1
RELATED QUESTIONS