009 Computing Jargon of the Week

Scaling Horizontally vs Scaling Vertically

Horizontal scaling means that you scale by adding more machines into your pool of resources whereas Vertical scaling means that you scale by adding more power (CPU, RAM) to an existing machine.

Scaling horizontally and vertically for databases – A.Korpal

This blog post by Abhinav is a fantastic explanation of what these terms mean. Similar to his thought process on recalling these terms, I see it as follows:

Horizontal Scaling – basically copy & pasting your current setup. You don’t improve the specifications in any way, you just have more of those instances by adding more machines.

Vertical Scaling – you start with your current set up, but improve on it by adding more features and upgrading the specs.

Scaling Horizontally vs Scaling Vertically

Whilst Abhinav’s post focusses on databases, this terminology is used in many areas. For instance, one technology I hear scaling talked about a lot is with Kubernetes. This post by Mohamed Ahmed is a great overview of how different scaling methods are used with Kubernetes.

Deciding how to scale

The decision to scale horizontally vs vertically depends on a number of factors.

With horizontal scaling you can benefit by keeping your current resources running. A new machine can be brought online independently of the current infrastructure and added to the resource pool when it is ready. This is not the case with vertical scaling as upgrading the current system will need a period of downtime to action these changes.

While vertical scaling can benefit from a smaller physical footprint (which in turn may be more environmentally friendly), solely upgrading specs leads to a ceiling on scalability. In contrast, the limits of adding new machines lies more with cost rather than capacity.

Which is right for you? That depends, but you should take great care when choosing how to scale. In particular, consider the long-term goal and how any decisions in the short-term can affect this plan.

Further Reading

Scaling horizontally and vertically for databases – A.Korpal

Kubernetes Autoscaling 101: Cluster Autoscaler, Horizontal Pod Autoscaler, and Vertical Pod Autoscaler – M.Ahmed

Horizontal vs Vertical Scaling – Which is right for your app? – MissionCloud.com

Understanding The Difference Between Horizontal & Vertical Scaling – S.Singh

If you enjoyed reading this post, consider reading some of my other definition posts:

Denormalize

Normalize

Propagate

If you enjoyed this type of content and would like to see more, feel free to check out my social media accounts:

Twitter: @sdrobertsCode
LinkedIn
GitHub