links: System Design MOC


What is Horizontal Scaling?

Horizontal scaling is a technique where you use multiple smaller systems as a pool.

What is Vertical Scaling?

Vertical Scaling is where you use a system which has more processing power (basically a more powerful machine than the current one)

Pros and Cons of Horizontal and Vertical Scaling

Horizontal ScalingVertical Scaling
Scales Linearly (as user increases or decreases number of machines can be scaled according to that)Can be scaled upto some extent
Load Balancing RequiredLoad balancing not required
Resilient to failureSingle point of failure
Network calls is slow (RPC) as data communication has to be from one system to anotherInter process communication
Data Inconsistency (example to make ACID for transaction)Consistent

In Real World we use both Horizontal and Vertical Scaling.

Suggested approach would be start with Vertical Scaling and move to Horizontal Scaling.

A Best system design will take best of the both worlds

  1. Resilient (Horizontal Scaling)
  2. Scaling (Horizontal Scaling)
  3. Consistency (Vertical Scaling)
  4. Inter Process Communication (Vertical Scaling)

tags: scaling system-design source: