Skip to main content

System Design BASICS: Horizontal vs. Vertical Scaling

·1 min

Scalability is basically the ability of a system to handle more requests. Specifically it is the ability of a system to handle increased load without degrading performance or service quality. It involves designing systems that can accommodate growth, whether in data, traffic, or complexity.

There are two types of scaling, Vertical Scaling and Horizontal Scaling.

1. Vertical Scaling: #

  • With increased load you decide you make your computer bigger.
  • Adding more resources to the existing nodes in a system, like more CPU or memory.

2. Horizontal Scaling: #

  • Here you buy more computers instead.
  • Adding more node to a system, like more servers in a cluster.

Pros vs Cons: #

VerticalHorizontal
Load BalancingRequiredN/A
If Node FailsResilientSingle Point of Failure
CommunicationNetwork calls (RPC)Interprocess
Data ConsistencyInconsistentConsistent
Hardware LimitationScales well as users increaseLimited

So what do companies use in the real world? Both!

We like like Vertical Scaling because it is resilient and is not limited by it’s hardware, so it scales well as users increase. We like Horizontal Scaling because Interprocess communication is fast and the data is consistent.

The major considerations are is it Scalable, is it Resilient and is it Consistent.