Horizontal and Vertical Scaling: System Design Basics

Rashmi Bhardwaj | Blog,Hardware, Infrastructure & Design
Google ADs

Scaling is the most crucial requirement for any applications getting developed or deployed. It does not matter what kind of application or website you are developing most of the time we face scenarios like huge numbers of users started using the application but you realize that your system or server can’t handle large numbers of requests and it may impact application performance. So, you need to find a solution to scale your application for a large number of requests. This issue can be solved by adding extra hardware or by upgrading current system configuration is called scalability.

Today we look more in detail about two important Horizontal and Vertical scaling, what is the purpose of each, advantages and disadvantages, use cases etc. 

What is Horizontal Scaling? 

Horizontal scaling is the best approach for projects where requirements for high availability or failover. The performance of the server is enhanced by adding more systems to the network, sharing the processing and memory workload across several devices. We can add more instances of the server to existing farm of servers and distribution of load could be done among the servers. 

Google ADs

There is no need to change the capacity of the server or replace it. There is no downtime to add more servers to the network. This approach includes increasing I/O concurrency, reduction in load on existing nodes and increase in disk capacity. This approach is also known as the ‘Scale out’ approach. Can be achieved with the help of a distributed file system, clustering and load balancing. 

Features of Horizontal Scaling 

  • More effective management of traffic
  • Ease of upgrade
  • Instant and continuous availability
  • Ease of sizing and resizing as per requirement
  • Less expensive implementation cost 

Drawbacks of Horizontal Scaling

  • Architectural design is complicated
  • High license fee
  • High utility costs (Cooling and electricity costs)
  • Extra networking equipment such as routers and switches

What is Vertical Scaling?

Vertical scaling is upgrading the capacity of a system or moving it to a new system. You can add more power to your systems by adding high performance processors, increasing memory etc. it can be easily achieved by switching from small systems to bigger and more powerful systems but it requires downtime. This approach is also referred to as ‘Scale up’ technique.  

Features of Vertical Scaling 

  • No need for partitioning of data and all traffic resides on single node with more capacity
  • Ease of implementation
  • Administrative efforts are lesser as you have to manage single system
  • Ideal for use by small and medium segment organizations

Drawbacks of Vertical Scaling

  • Scaling is limited
  • Limited potential to improve network I/O or disk I/O
  • Downtime required to scale up
  • Risk of outages and hardware failures
  • Expensive implementation 

Comparison: Horizontal and Vertical Scaling

FunctionHorizontal ScalingVertical Scaling
DefinitionAbility to enhance capacity by connecting multiple hardware and software units to make them work as single logical unitAbility to enhance existing capacity by adding more hardware and software resources to existing system
Primarily used on distributed systemPrimarily used on virtualization
Load balancingRequires load balancing to spread the traffic across systemsLoad balancing not required as one system is to handle all load
Data consistencyData is inconsistency in horizontal scaling as different systems handle different requests which may lead to data become out of syncHave just one system where all request are redirected hence inconsistency of data is out of question
ResiliencyIt is more resilient to system failure. If one system fails request can be redirected to another system and there won’t be any downtime for the applicationIt is less resilient in nature as all load in on one single system and if that fails it will impact the availability of the application
ScalingHorizonal scaling works well and had better scope for expansion as load can be distributed and you can keep on adding systemsVertical scaling has limited scope as single system hardware upgrade could be done in limited capacity only
CostsImplementation costs are lower as compared to its counterpartImplementation costs are high and also involves downtime
ExamplesCassandra and MongoDB, Google Gmail, YouTube, Yahoo, Facebook, eBay, Amazon etc.MYSQL and Amazon RDS

Download the comparison table: Horizontal Scaling vs Vertical Scaling

Conclusion

Both approaches have their own pros and cons hence you need to identify your requirements, business goals, and areas where value addition is required. Sometimes the approach is hybrid as one strategy doesn’t work alone. So, a combination of vertical scaling for speed and consistency can be combined with horizontal scaling for resiliency and infinite scalability work for businesses. 

Just simply adding hardware is not enough you need to analyze the application requirements and if requirements can be met initially by increasing capacity or tuning configurations on a single system then you can go for vertical scaling but once the users’ numbers start growing in then you need to replace the system frequently so go for horizontal scaling or a combination of both. 

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart