High Performance Django
summary
Built a stack that handles ~15 million pages/day with 12 web servers and Squid doing 2–4k requests/sec while Django servers handle ~200; switching to mod_wsgi shows ~40% memory improvement and ~2x requests/sec in benchmarks. Warns that Django ORM causes hundreds of queries per page if misused, recommends targeted select_related, cProfile and DB query dumps for profiling, and describes painful cache invalidation at scale and an object‑level caching idea that needs tuning.
AI-written summary · about
chapters (15)
- 0:00Intro
- 0:34Curse
- 3:23Tools of the Trade
- 4:59How We Did It
- 6:39Lessons Learned
- 8:29Webserver Software
- 9:22Database (ORM)
- 12:48Handling JOINS
- 13:59Template Rendering
- 16:31Template Engines
- 17:19Caching
- 19:43Cache With a Plan
- 23:09Cache Commonly used Items
- 25:30Profiling Code With CProfile
- 28:47Summary
related talks
47mHigh Performance Django at Ten: Old Tricks & New Picks
39mHigh Performance Django: From Runserver to Reddit Hugs
42mA Nice Problem to Have: Django Under Heavy Load
28mThe life of a web request - techniques for measuring and improving Django application performance
21mHigh-Availability Django
47mReal World Django Q&A
37mPerformant Django
47mBuilding Scalable Web Apps
