The System Design Academy Logo
Published on

What is Scalability?

Authors

Imagine you run a little pizza shop in Bengaluru. On a regular weekend, you handle ~20 customers with one oven and two staff members. One day, a local Instagram food vlogger posted a video about your pizza and it blew up. Suddenly 200 people showed up.

This is exactly the challenge software systems face, and it's called "Scalability".

Scalability is your system's ability to handle increased workload gracefully. Note, It's not just about surviving the load. It's about maintaining good performance while serving more traffic.

Flavours of Scaling

Vertical Scaling (Scaling up), think of it as upgrading your pizza oven. You replaced your small oven with a massive commercial own that bakes 10 pizza at once. In system design terms, this means adding more resources to your machine - like more CPU, more RAM, more storage.

Instagram scaled vertically for years by upgrading their database server with more powerful hardware.

Horizontal Scaling (Scaling out), this is like opening multiple pizza shop across the city. Instead of one big oven, you have many regular ovens working together. In system design terms, this means adding more servers to handle the load.

Netflix does horizontal scaling with thousands of servers to stream content to millions of users world wide.

Why scalability matters?

Without proper scalability -

  • Your website crashes during a sale
  • Your mobile app stops working when it goes viral
  • Your databases struggles to serve data when you get a traffic spike

With good scalability -

  • WhatsApp servers 2B+ users with a small engineering team
  • Twitter handles like 500M+ tweet daily

Scalability vs Performance

Take a note, here's where many people get confused. Scalability and performance are not twin brothers, they are cousins (omg, such a banger line).

Performance is how fast your system responds to a request. Like, how quickly you can make a pizza in your shop.

Scalability is maintaining that performance on high demand. It's like asking "Can you still make pizza quickly when there is a line of 50 people?".

Both need to work together for a smoother user experience as system grows.

In real world, start with clean, simple code that scales reasonably well. Start optimizing for performance, only when you have REAL performance problems. But always design with scalability in mind from day one.