Getting started with Django is easy. There are tutorials and books that literally walk you through the process of getting your first site up and running. Taking that code from your laptop to the real world is like opening pandora’s box.
If you’ve asked yourself any of these questions, you’re like most Django developers. Heck, we were asking some of the same questions when we started working with Django 7 years ago. Since then we’ve built, deployed, and maintained a lot of Django sites. Everything from realtime applications to large-scale CMSes with tons of traffic. Quite frankly, we made a lot of mistakes, but we learned a lot too.
High Performance Django is the book we wish we had when we got started. It will give you a repeatable blueprint for building and deploying fast, scalable Django sites.
When I started Lincoln Loop back in 2007, Django was still a pre-1.0 fringe player in the web framework world. It’s come a long way since then and so has its supporting ecosystem. A lot of bad practices have shaken out and we now have a good blueprint for deploying stable, fast, and scalable Django sites.
I was inspired to write this book by the “in the wild” Django projects we came across in our consulting business. Time and again, we would see very bright and talented engineering teams making poor technology decisions. These decisions were not only expensive, but the unknown source of stress and grief. It dawned on me that if experienced teams like these were struggling, what chance did your average developer have?
We’ve spent the last few months pouring our years of learning (often times the hard way) into this book. The goal of this book is to give you our blueprint so you can build and deploy high performance Django sites with confidence. We hope you enjoy it.
-- Peter Baumgartner, co-author
High Performance Django is split up into six sections. Each section will walk you through a different phase in the lifecycle of a Django project.
Before “putting pen to paper” it’s good to have a plan. The first section lays out the guiding philosophy of our process, simplicity. We’ll show you how we apply it to the sites we build, and give a brief introduction to the software you’ll be using to build your site.
How to write Django code that is efficient and using tools like Django Debug Toolbar to find areas for improvement. You’ll learn where the easy wins are, safe and simple caching strategies, and reducing the impact of the two slowest parts of Django site: the templates and the database.
All the different options for deploying Django are overwhelming. We’ll show you our go-to toolkit and which knobs to turn to get the best performance out of each one. This section covers the whole stack: database, cache, background tasks, WSGI server, web accelerator/reverse proxy, and load balancers.
Good preparation is the difference between a launch that is nerve-wracking and one that is calm and collected. You’ll learn how to load test your deployment and see our go-live checklist.
During the launch you want to have an eagle-eye on every part of your stack, watching for potential problems. We’ll show you the tools we use to monitor our servers and services, letting us find and resolve bottlenecks quickly.
A web developer’s work is never done. There are always features to be added and bugs to fix. This section outlines the common issues that arise after the launch and how to mitigate them.
The book has something for everyone. Beginner Django developers will learn the lay of the land and what's missing from their skill-set. Intermediate devs will round-out their knowledge, pushing them to the next level. And experts will pick up a few new tips and tricks they may have missed along the way.
Developers, engineers, and architects have great things to say about High Performance Django
Pete and Yann speak from years of experience scaling Django sites, and their book is full of invaluable advice they learned the hard way so you don't have to.
Really useful information... It was easy to read, lots of useful examples. I had several "of course, that's smart!!" moments.
The way you wrote the book was so interesting and easy to understand and follow I have not come across one like that in a very long time, and I read A LOT.
I've been doing Django stuff for 5 years or so, programming in Python for nearly a decade, previously C/Java/PHP. I read programming-related news from around the net... various blogs, talks and so on. And still, I learned new things from this book.
I read the book in one day and liked it very much. In fact, I like Django even more now, because I know how to start to scale. Many useful tips and experiences shared. Thank you for writing them.
Want a sneak peek inside the book?
Subscribe to our monthly Django Round-up newsletter and a full sample chapter will land in your inbox shortly.