Performance & Scalability interview question · Most asked

What is the difference between vertical and horizontal scaling?

Summary

Vertical scaling adds resources (CPU, RAM) to one machine; horizontal scaling adds more machines behind a load balancer. Vertical is simpler but has hard limits and a single point of failure; horizontal scales further and improves availability but requires stateless services and distributed coordination.

Longer Answer

Stateless application servers scale horizontally easily; databases are harder (replicas, sharding). Start vertical where it's cheap, design for horizontal scaling of the stateless tier from the beginning.

Key Points

  • Vertical: bigger machine
  • Horizontal: more machines
  • Stateless services scale out
  • Databases need special strategies

More most-asked Performance & Scalability questions

← All Performance & Scalability questions