October 03, 2023
Scalability is the core reason that a lot of companies are moving to cloud hosting. Scalability is the capacity of a system to expand from existing configuration for handling increasing amount of load. You can scale the system either by overhauling the current equipment setup or including additional equipment. When it comes to cloud solutions, the scaling strategies are divided into two major categories. These are Horizontal Scaling and Vertical Scaling. The heart of the difference is the approach to adding computing resources to your infrastructure.
Let's understand how one is different from another with easy examples! In Vertical Scaling, the resources are added to an existing work unit. For example, if your web server starts under performing then there are many ways to improve its scalability via vertical scaling. It can be done either by adding more memory, cache, disk, or processor; or by deploying a new and more powerful server and retiring the smaller server.
Let's consider that you have a business website. As the business grows your website gets more traffic. Due to high traffic generation, the server performance starts degrading. To deal with the heap you have to scale the assets by including CPUs(Processors), RAM, plate limit and so on. So in this case, if you are using vertical scaling strategy then you need to enhance the capabilities of the same server which can handle the load properly.
Vertical scaling means boosting the power of the individual server. Vertical scaling is also known as Scale up. Whereas Horizontal Scaling is achieved by adding multiple resources to an existing work unit. Let's explain this with the above example itself. When your business grows at the same time traffic also grows, so the responsibility of your server gets increased! In order to reduce this responsibility what we can do is, we can add one more server with the same capacity along with the existing server. Now, these two servers can handle the traffic effectively.
This is known as horizontal scaling. Here we didn't change the capacity of an individual server rather we decreased the load by spreading it to another server. Basically, horizontal scaling means enhancing the performance of a server by adding more instances of a server to your pool of servers so that load can spread. Horizontal scaling is also known as scaling out. A good example for horizontal scaling is Cassandra, MongoDB and a good example for vertical scaling is MySQL - Amazon RDS (The cloud version of MySQL).
To enhance performance issues you can use either vertical scaling or horizontal scaling, both are available in the cloud environments. To summarize, I would say that vertical scaling generally refers to purchasing and installing a more capable central control or piece of hardware. Whereas horizontal scaling refers to linking together other machines to collectively do the work of a much more advanced one. Hope, the article was helpful and do share your thoughts about horizontal and vertical scaling in cloud solutions.