DEV Community

geekordian
geekordian

Posted on

Vertical and Horizontal Scaling

Hey devs,
I have started learning about System Design and today I will be posting about one of the fundamental topics - Vertical and Horizontal Scaling.

Image Credit: GeeksForGeeks

Let us start with the definition first:
1. Vertical Scaling: When we enhance the capacity of an existing system.
For example - when we upgrade the RAM, we term this as vertical scaling.
Advantages:
a. Increased performance
b. Easier to maintain
Disadvantages:
a. Hardware limitations - even after upgrading the system, the load may not be managed efficiently.
b. Downtime - scaling up often requires some time to switch the existing hardware, which causes downtime.

2. Horizontal Scaling: When we add new resources to our system.
For example - setting up a new server for the application.
Advantages:
a. No downtime
b. Increased performance
Disadvantages:
a. Complex - needs a load balancer and multiple other resources which need to be set up.
b. Difficult to maintain - because of the many machines involved.

The main beauty of scaling appears when we understand when we should do horizontal scaling and when we should do vertical scaling, since neither scaling approach is perfect as they each carry their own advantages and disadvantages.

Top comments (0)