# Vertical vs Horizontal Scaling

As our application grows, we need to scale our system to handle increasing traffic and load. Two popular strategies to achieve this are **vertical scaling** and **horizontal scaling**.

## Vertical Scaling

* Vertical Scaling is also referred to as `scale up`. In this, we add more resources to the existing machine like adding more RAM, faster CPU, etc.
    
* It's good for simple architecture because there is a limit, we can't add unlimit amount of RAM or CPU to a single machine.
    
* It does not have a failover if it does down our complete application goes down.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729617939570/05347e92-0a1d-438e-84c0-40561eb9a78f.png align="center")

## **Horizontal Scaling**

* Horizontal scaling is also referred to as `scale out`. In this, we add more machines to spread the load across multiple machines.
    
* It's considered effective for large-scale systems.
    
* It does have a failover if a single machine goes down, It will not affect our application much because it can be distributed across other machines.
    
* We will be required to add a load balancer to distribute the load across different machines.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729617961374/6c529f21-5b9c-4162-b524-bdbbe47b332f.png align="center")

Choosing between vertical and horizontal scaling depends on the needs of your application. Vertical scaling is easy but limited, while horizontal scaling offers more flexibility and resilience for large-scale systems.
