In production, what next?

I’ve had my Django web app running for 1.5 yrs. It runs fine. I use sentry to track errors. Deployment is through a paas that runs similarly to Heroku. I have daily backups of the site files and the db.

I have some interest from a couple of organizations about them using my app. I’m a little nervous about what my next steps should be and these relate to two topics.

How do I learn about or prepare for scaling? My app could go from 50 core users to 2000.

What do I need to know about and prepare for in terms of db? I just listened to the Django Chat podcast episode on PostgreSQL. I don’t know much about db other than what a person learns when setting up an app. It could be that I have very basic db queries. Or maybe all projects deserves db management in one form or another.

I realize that people can’t comment specifically to my requirements because they won’t know my code or usage data, so I’m just seeing if there are recommended things for me to read about? Website stats to analyze? Anything that moves me to the next step.


This is actually a bit much to try and answer in detail here. There are as many ways to approach this as there are ways to install and configure the various software components.

Since you probably have relatively limited ability to configure the individual core components, you might want to start to see what the system will act like under load.

First, you could gather as many access logs as you can to try and understand the distribution of activity of your site. It makes a big difference if your users’ activity is spread across the day or if the activity is clustered in the morning. It’ll also help if you can judge how the increase in usage may affect that.

Then, you could use something like requests, curl, selenium, jmeter, etc to create scripts to test your system under load. If you have the ability to set up parallel environments, so much the better. It doesn’t need to be a precise recreation of how someone uses your site, but you should hit the common views and forms.

Configuring the database is an art in itself. However, what you need to do there does depend in part on the needs of your application and how much data is involved along with the rate of growth. (I’ve posted elsewhere on here that one of the best things we did with our primary application was to increase the memory allocations for the buffers to ensure that the entire database with indexes could reside entirely in memory - 4GBish. Side note: This application supports 5000 users with a spike of activity from Thursday morning through Friday noon. Aside from the database configuration, we haven’t really had to do anything to the system to handle this.)

1 Like