Horizontal Scaling In System Design | SDE Interview

Ganesh Prasad
3 min readJan 7, 2023

--

Horizontal scaling, also known as scaling out or scaling horizontally, refers to the practice of adding more components to a system to distribute the load and improve its capacity. This is in contrast to vertical scaling, which involves increasing the capacity of a single component by adding more resources, such as memory or CPU.

Benefits of Horizontal Scaling

One of the main benefits of horizontal scaling is that it allows a system to scale up its capacity almost indefinitely. Adding more components to the system makes it possible to distribute the workload and handle a much larger volume of requests. This can be particularly useful for systems experiencing high traffic levels or processing large amounts of data.

In the above diagram, the workload is distributed across multiple servers in a cluster.

Another benefit of horizontal scaling is that it can be more reliable than vertical scaling. If a component in a horizontally scaled system fails, the load can be distributed to the other components, minimizing the impact on the system as a whole. This helps ensure that the system remains available and up to date, even in the event of a failure.

Disadvantages of Horizontal Scaling

However, horizontal scaling does have some limitations. One of the main drawbacks is that it can be more complex to implement than vertical scaling. Adding more components to a system requires changes to the architecture of the system, which can be time-consuming and require specialized knowledge. It may also be necessary to use specialized hardware or software to facilitate the horizontal scaling process.

Another limitation of horizontal scaling is that it can be more expensive than vertical scaling. Adding more components to a system can quickly become costly, particularly if those components are running specialized hardware or software. In contrast, adding more resources to a single component is often a relatively inexpensive process.

Despite these limitations, horizontal scaling is often the preferred method for scaling up a system experiencing high traffic levels or processing large amounts of data. It allows for almost indefinite scaling and can be more reliable than vertical scaling.

Conclusion

In summary, horizontal scaling involves adding more components to a system to distribute the load and improve its capacity. It allows for almost indefinite scaling and can be more reliable than vertical scaling. However, it can be more complex to implement and more expensive than vertical scaling.

That’s all 👍🏼.

Thanks 🤗.

Want to Hire/Connect? LinkedIn

P.S.: If you like this uninterrupted reading experience on this beautiful platform of Medium.com, consider supporting the writers of this community by signing up for a membership HERE. It only costs $5 per month and helps all the writers.

A clap would be highly appreciated if you liked what you just read. You can be generous in clapping; it shows me how much you enjoyed this story. And if you didn’t like it? Please do comment😋!

--

--

Ganesh Prasad
Ganesh Prasad

Written by Ganesh Prasad

Backend Developer at Appscrip | C++ veteran, 💜 Dart

No responses yet