In this chapter, I’ll discuss the two types of scalability you need to think about at a startup. The first type is scaling your coding practices to handle more developers, more code, and more complexity. The second type is scaling the performance of your code to handle more users, more traffic, and more data.
Scaling a startup is a bit like shifting gears in a car with a manual transmission. Scaling too early is like shifting into a high gear while the car is moving at a low speed: the gears will grind and you may stall out completely. Scaling too late is like flooring the gas pedal while staying in low gear: you put a lot of stress on the engine, push it into the red, and if you keep it up too long, you’ll overheat without ever hitting top speed. You have to scale and you have to shift gears at the right time to keep things moving smoothly.
The most important thing to understand is that scalability isn’t a boolean property. You can’t say a practice or a system is or isn’t scalable. The most you can say is that, under certain conditions, it’s scalable along certain dimensions, up to a certain point. The scalability practices that work for a 10-person company will not work for a 1,000-person company, and the database that scales to 100 queries per second and gigabytes of data won’t scale to 10,000 queries per second and petabytes of data. To go faster, you need to shift to completely different gears.
Most of this chapter will focus on scaling ...