1.

How is Horizontal scaling different from Vertical scaling?

Answer»
  • Horizontal scaling refers to the addition of more COMPUTING machines to the network that shares the processing and MEMORY workload across a distributed network of devices. In simple words, more INSTANCES of servers are added to the existing pool and the traffic load is distributed across these devices in an efficient manner.
  • Vertical scaling refers to the concept of upgrading the resource capacity such as increasing RAM, adding efficient processors etc of a single machine or switching to a new machine with more capacity. The capability of the server can be enhanced without the need for code manipulation.

This has been demonstrated in the image below:

Horizontal scaling vs. Vertical scaling:

Category Horizontal ScalingVertical Scaling
Load BALANCINGRequires load balancing for distributing request traffic across multiple machines.Since there is just one single machine, the load balancer is not required.
Failure ResilienceThis is more resistant to application failure because if one server fails, traffic is routed to other servers.This is more prone to failure as there is only one machine and failure of this results in failure of the entire application.
Machine CommunicationSince there are multiple machines being involved, it is very much necessary to have network communication.Vertical scaling makes use of inter-process communication within the machine which makes it quite fast.
Data ConsistencyThere exist possibilities of data inconsistencies here because there are different machines for handling different requests which might result in data being out of sync.As there is only one machine, there is no issue of data inconsistency.
LimitationsSince this scaling requires multiple servers, there might be concerns on budget and space but the scaling of the application can be done as much as needed based on the BUSINESS needs.Vertical scaling has a limit on the capacity of the resources that are achievable. If the resources are scaled up above this limit, then the application might crash and result in downtime.


Discussion

No Comment Found