Horizontal v/s Vertical Scaling

InterviewReady
2 min readJul 26, 2022

--

By — Avash Mitra

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

Vertical Scaling

  • In this method, we improve the capacity of the existing machines to improve performance
  • Since we have a single machine, we don’t need a load balancer
  • There is only one machine. If it fails our entire system goes down. So it is a Single Point of Failure
  • Here we have Inter-Process Communication which is faster
  • There is only one system where data resides so data is always consistent.
  • It is easier to implement and maintain since there is only one system
  • There is a hardware limitation. i.e., we can increase the system’s capacity up to a certain extent

Horizontal Scaling

  • It this method we add more machines to improve performance
  • We need to balance all requests between all the machines, so we need a load balancer
  • If one machine fails we can redirect the requests to other machines so there is no Single Point of Failure. It is Resilient
  • Communication between the servers will happen over the network. So the communication is Slow
  • If we want a transaction to be atomic we have to lock all other servers, which is impractical. So we have a loose transactional guarantee. Therefore Data Consistency can be an issue
  • It is difficult to implement and maintain.
  • There 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.

--

--

InterviewReady

Simplifying interview preparation for software engineers