What is Horizontal Scaling?
Horizontal scaling, also known as scaling out, refers to the process of increasing the capacity or performance of a system by adding more machines or servers to distribute the workload across a larger number of individual units.In this approach, there is no need to change the capacity of the server or replace the server. Also, like vertical scaling, there is no downtime while adding more servers to the network.
Imagine you own a small delivery service company that initially operates with a single delivery van. As your business grows, you start receiving more orders and delivering to a larger area. However, you quickly realize that the single van is not sufficient to handle the increasing demand efficiently.
- To address this issue, you decide to horizontally scale your delivery operation by adding more delivery vehicles to your fleet. Instead of relying on just one van, you purchase several additional vans and hire more drivers.
- By doing so, you’re able to distribute the workload across multiple vehicles, enabling your company to handle a greater volume of packages and serve a larger customer base.
Note: Most organizations choose this approach because it includes increasing I/O concurrency, reducing the load on existing nodes, and increasing disk capacity. This approach is the best solution for projects which have requirements for high availability or failover.
Characteristics of the horizontal scaling
- This approach is also known as the ‘scale-out’ approach.
- Horizontal scalability can be achieved with the help of a distributed file system, clustering, and load–balancing.
- Traffic can be managed effectively.
- Easier to run fault tolerance.
- Easy to upgrade.
- Instant and continuous availability.
- Easy to size and resize according to your needs.
- Implementation cost is less expensive compared to scaling up.
- Google with its Gmail and YouTube, Yahoo, Facebook, eBay, Amazon, etc. are heavily utilizing horizontal scaling.
- Cassandra and MongoDB are good examples of horizontal scaling.
Advantages of horizontal scaling
- Increased capacity: More nodes or instances can handle a larger number of incoming requests.
- Improved performance: Load can be balanced across multiple nodes or instances, reducing the likelihood of any one server becoming overwhelmed.
- Increased fault tolerance: If one node fails, incoming requests can be redirected to another node, reducing the risk of downtime.
Disadvantages of horizontal scaling
- Increased complexity: Managing multiple nodes or instances can be more complex than managing a single node.
- Increased cost: Adding more nodes or instances will typically increase the cost of the system.
Horizontal and Vertical Scaling | System Design
In today’s fast-paced digital world, creating systems that can handle increasing demands is key to success. Picture this: you’re hosting a big party, and more and more guests keep arriving. You need to make sure your setup can handle the crowd without slowing down or crashing.
In this article, we’ll break down the concepts of horizontal and vertical scaling and see why they’re essential for building systems that can handle the ever-growing demands of the digital world.
Horizontal scaling and vertical scaling are two different approaches to scaling a system, both of which can be used to improve the performance and capacity of the system.
Important Topics for the Horizontal and Vertical Scaling
- What is Scalabilty?
- What is Vertical Scaling?
- What is Horizontal Scaling?
- Differences between Horizontal and Vertical Scaling
- Which scaling option is right for an application?