Horizontal v/s Vertical Scaling

How do we scale systems to handle a large number of requests? Different methods of scaling and their advantages and disadvantages.

What is Scaling?

It is the process of expanding the existing computers/server's capacity to handle a large number of requests.

This can be done by improving each system's capacity by adding more processing power or RAM (Vertical Scaling). Or by using multiple systems to handle the requests (Horizontal Scaling).

Each method has its advantages and disadvantages. So let's discuss these two methods in detail

Comparing Horizontal and Vertical Scaling


Vertical ScalingHorizontal Scaling
Vertical scalingHorizontal scaling
In this method we improve the capacity of existing machine to improve performanceIt this method we add more machines to improve performance
Since we have a single machine,we don't need a load balancerWe need to balance all requests between all the machines, so we need a load balancer
There is only one machine. If it fails our entire system goes down. So it is a Single Point of FailureIf one machine fails we can redirect the requests to other machines so there is no Single Point of Failure. It is Resilient
Here we have Inter-Process Communication which is fasterCommunication between the servers will happen over the network. So the communication is Slow
There is only one system where data resides so data is always consistent.If we want a transaction to be atomic we have to lock all other servers, which is impractical. So we have losse transactional guarantee. Therefore Data Consistency can be an issue
It is easier to implement and maintain since there is only one systemIt is difficult to implement and maintain.
There is an hardware limitation. i.e., we can increase the system's capacity upto a certain extentThere is no hardware limitation. We can keep adding servers depending upon the use case

That's it for now!

You can check out more designs on our video course at InterviewReady.

Start Preparing for your Dream Job today!

The most comprehensive Interview prep platform ever built

Try for Free