Configure Postgres statement_timeout from within Django

“A close-up of white dials on a music mixer” by Alexey Ruban on UnsplashIn a bid to prepare ourselves for projected growth, we are at the moment trying to figure out what part of our system will break at what scale, and how. One step towards this was to also define strict timeouts for our … Continue reading Configure Postgres statement_timeout from within Django

Two years with Celery in Production: Bug Fix Edition

Photo by Martin Oslic on UnsplashAs mentioned in an earlier post, we rely on Celery for publishing and consuming tasks to/from our RabbitMQ (RMQ) broker. We are very happy with the whole setup and it works reliably for us. But this wasn’t exactly the case up until four weeks back. We were plagued with a … Continue reading Two years with Celery in Production: Bug Fix Edition

Blazingly fast querying on huge tables by avoiding joins

Tl;dr: Avoid joins on large tables and evaluate parts of queries beforehand to get 100–10,000x performance gains! As mentioned in a previous post, because of some of our tables growing in size, our queries started performing poorly which resulted in a performance hit to our most used APIs. It was time we revisit some of … Continue reading Blazingly fast querying on huge tables by avoiding joins

Estimated counts for faster Django Admin change_list

Short story of how we reduced the response time of some of our admin pages by 1000x. The Problem One of our tables grew to over 25 million rows. Which, while not a large number, makes the most frequent queries slow. A direct effect it had was on our Admin panel. The change_list form for … Continue reading Estimated counts for faster Django Admin change_list