Skip to main content

Scalability

Scalability is a system's ability to handle more work by adding resources, without a fundamental redesign. A scalable system doesn't have to be fast at every size β€” it has to keep working, at an acceptable cost, as load grows.

That word "cost" matters more than it first appears. Almost any system can handle more load if you're willing to throw unlimited money and engineering time at it. What makes scalability an interesting design problem is that resources are finite and growth is often unpredictable, so the real question an interviewer is asking is: as demand grows 10x or 100x, what breaks first, and how would you address it?

Two axes of scaling​

There are two basic ways to give a system more capacity:

  • Vertical scaling (scaling up) β€” make the existing machine bigger: more CPU, more RAM, faster disks. It's simple (no code or architecture changes) but has a hard ceiling β€” there's a biggest machine you can rent or buy β€” and it usually means downtime to resize, plus it keeps a single point of failure.
  • Horizontal scaling (scaling out) β€” add more machines and spread the load across them. It has effectively no ceiling and lets you tolerate a machine dying, but it requires your system to be designed for it: the workload has to be splittable across nodes, and you need a way to route requests to the right node (load balancing) and keep shared state consistent across them.

Most real systems use both β€” scale up a bit for simplicity, then scale out once you hit the ceiling or need redundancy. (This tradeoff gets a full lesson later: see Vertical vs Horizontal Scaling.)

System Design Lab

What actually limits scalability​

Adding more servers only helps if the thing you're bottlenecked on can actually be parallelized. In practice, the wall is usually one of:

  • A stateful bottleneck, most often a single database. You can add ten web servers behind a load balancer easily because they don't share mutable state β€” but if they all hammer one database, the database becomes the ceiling. This is why so much of system design interview content is about databases: sharding, replication, and caching are all ways of scaling around this bottleneck.
  • Shared mutable state anywhere else β€” a single in-memory cache, a lock, a session store tied to one machine. Anything that can't be trivially duplicated across nodes needs its own scaling strategy.
  • Coordination overhead. Even when work is fully parallelizable, if nodes need to constantly talk to each other to agree on something, that communication cost grows with the number of nodes and can eventually cancel out the benefit of adding more of them. No system scales linearly forever β€” coordination cost curves upward as you add nodes.

Recognizing which of these is the bottleneck in a given design is usually more valuable in an interview than reciting "just add more servers."

Scalability is not the same as performance​

A system can be fast for one user and not scalable (e.g., a script that loads an entire dataset into memory), or comparatively slow per-request but highly scalable (e.g., a queue-based pipeline that adds workers linearly as backlog grows). When you're asked to "design a scalable system," the interviewer usually isn't asking for the lowest possible latency β€” they're asking how the design behaves as N (users, requests, data volume) grows, and where you'd add capacity when it does.

A useful habit for interviews: whenever you propose a component, ask yourself "what happens to this specific piece at 10x the current load?" If the honest answer is "it falls over," that's exactly the tradeoff worth calling out β€” and often exactly what the interviewer wants to hear you reason through.

Horizontal scaling: pros and cons​

Pros

  • No hard ceiling β€” keep adding nodes as demand grows
  • Tolerates a node dying; the rest keep serving traffic
  • Cost scales incrementally with many small/medium nodes instead of one giant one

Cons

  • The workload has to be splittable across nodes in the first place
  • Needs a load balancer and a way to keep shared state consistent
  • Coordination between nodes adds latency and complexity as N grows

Further Reading​

Saved locally in your browser β€” visible in the sidebar as you go.