Scaling

The notes

Horizontal scaling

Scaling out: add more machines to the pool and distribute the workload across multiple servers.

Pros

  • Elasticity: easy to add or remove machines as needed
  • Fault tolerance: no single point of failure; if one server fails, others continue
  • Cost-effective at scale: use commodity hardware for massive scale

Cons

  • Complexity: requires load balancing and distributed system management
  • Network overhead: latency and communication costs between nodes

Best for

  • Massive scale, high availability, distributed applications (e.g. web and app servers, NoSQL databases)

Vertical scaling

Scaling up: add more power (CPU, RAM, storage) to an existing machine, making the server bigger and more powerful.

Pros

  • Simplicity: easier to manage, no load balancer needed
  • No network overhead: all communication happens within one machine
  • Lower initial cost: more economical for small-scale operations

Cons

  • Limited scalability: hardware has physical limits and can't scale infinitely
  • Single point of failure: if the server goes down, everything stops
  • Downtime for upgrades: requires a system restart and potential service interruption

Best for

  • Simplicity, initial growth, monolithic applications (e.g. traditional RDBMS, small-to-medium workloads)

Key takeaway. Horizontal: more machines; elastic, complex, distributed; ideal for cloud-native applications requiring high availability. Vertical: a bigger machine; simple, limited, centralized; best for traditional applications with predictable growth. Choose based on scalability requirements, budget constraints, application architecture and team expertise.

System design deck

  1. 1. Fundamentals
  2. 2. Scaling
  3. 3. Frontend vs backend
  4. 4. Client-server architecture
  5. 5. Databases
  6. 6. Load balancer
  7. 7. Caching
  8. 8. Latency vs throughput
  9. 9. Availability and redundancy
  10. 10. CAP theorem

and many more

Watch the lesson

System design, Lesson 1, from 5:35: What is vertical and horizontal scaling?