In this article, we will look at the details of horizontal and vertical scaling.
Scalability describes the ability of the system to adapt to changes and demand. We can scale up, down and out accordingly. Application success mostly rely on the handling traffic during peaktime and we underestimate them during early stages which will result in system crash. We need to ensure that our application is scalable so that it withstand the network traffic during peak time.
Let’s look at different type of scalability
- Vertical scalability
- Horizontal scalability
Vertical Scalability:
Vertical scaling (aka scaling up) describes adding additional resources to a system so that it meets demand. It describes adding more power to your current machines. For instance, if your server requires more processing power, vertical scaling would mean upgrading the CPUs & memory, storage or network speed.
Advantages:
- Cost effective as adding new servers are expensive than upgrading
- Less maintenance and operation as single node provide response to services
Disadvantages:
- Downtime is high
- Single point of failure as it operates from single server
- Limitation for upgrade within the system
Horizontal Scalability:
Horizontal scaling (aka scaling out) refers to adding additional nodes or machines to the existing infrastructure to cope with new demands.
Advantages:
- Scaling out is easier from hardware perspective as its just adding new machines without analysing on system specifications
- Downtime is less
- High Fault tolerance
- Increased performance as it delegates load among multiple machines
Disadvantages :
- Increased complexity of maintenance & operation as we need to manage the multiple machines in terms of backup, load balancing and communication
- Increased cost as adding new servers is expensive
Choosing horizontal vs vertical scaling depends on the cost, reliability, performance, limitations /future proofing etc.
Hope this article will be helpful.