The Open Bastion
Unbreaking Your Django Application
Your Django application runs wonderfully in test and in beta, and with great fanfare you launch it, and... it falls over and goes boom. The speed of development that frameworks like Django give you can result in some ugly secrets when the application experiences real load for the first time.
In this hands-on workshop, we’ll take a (supplied) Django application and fix it up so that it can survive in the wild. Topics will include caching in all its myriad forms, getting the most out of the ORM, database optimization, and deployment environments. We’ll use PostgreSQL as the underlying database, but the techniques here are applicable to any database and, indeed, nearly any application development environment.
Among the topics we'll cover are:
- Model design for best performance.
- Optimal indexing strategy.
- Effective caching.
- Transaction management and avoiding lock conflicts.
- Efficient use of the ORM.
- When and how to move work into the database.
- External caches, poolers and load balancers for high-volume sites.
- How to debug performance at the database level.