blog posts

Horizontal scaling

What is Horizontal Scaling?

When the software production process reaches the Production stage and the application goes to the server, new challenges and risks come for its owners. We are in an age where the use of the Internet has become our way of life. Therefore, after the introduction of the application or website, its users increase rapidly. Of course, in most cases, increasing the number of users of a website promises the growth of a business and its success; But there comes a time when the system can no longer handle the volume of visitors.The scalability process is into two general categories: Vertical Scale or Horizontal Scale or Horizontal Scaling.

In some cases, the amount of data is so large that the system can not store it in its database. In such cases, it is time for the system to be scaled. If you are eager to getting to know Scale and its variants, we have an article on this topic entitled “What is Scaling?” We have prepared.

Companies tend to quickly scale their system vertically for ease of implementation. But in most cases, scaling costs can be significantly reduce for implementing horizontal scalability. In this article, we will introduce horizontal scalability.

What is horizontal scaling?

Horizontal scaling is also an outward scalability. In this type of scalability, instead of increasing the power of a system, we increase the number of systems. These systems must work in parallel so that the user does not notice the multiplicity of them outside the system. In fact, one of the main complications of horizontal scalability is solving this problem! Therefore, adding the number of servers from one to two is much more complicated than converting their number to three, four, and so on. In fact, the challenge lies in the first step!

A set of servers that run on a system at the same time is a cluster. A load distribution server or Load Balancer is responsible for dividing the processing load between these servers. Over time, new servers purchased, and added to the cluster. From now on you have a Horizontal Scale system!

The load balancer server has the task of deciding which server is responsible for responding to the request at the time the user submits the request. This hides the complexity of the process from the user and displays it seamlessly.

Advantages and disadvantages of using horizontal scalability

Although scalability is a necessity compared to a non-scalable system, to choose between horizontal and vertical scalability we need to know its advantages and disadvantages. Here are some of the benefits of using this scalability method:

It is much cheaper than the vertical scalability method

Gives the system less load time and better performance

Reduces the likelihood of the system going down

Gives the system more flexibility

In contrast, using the horizontal scalability method has the following disadvantages:

Join between different tables When large databases are shared on different servers, it is difficult and time consuming between servers.

Some servers may be disrupted in certain situations, making it almost inappropriate to use this method for banking processes or transactions due to their simultaneous nature.

An action cannot be easily assigned to a server. For example, the space required to store images due to their large size may be more than the storage space of a server.

What is scalable software?

It is generally a scalable software or software system that can sustainably serve even on a larger scale. For example, suppose a website has 100 hits per day. This website, if it is scalable, should be able to withstand the number of visits of 10,000 people per day. Of course, this does not mean that we do not need to increase the power of the hardware (such as a server or site servers) when scaling scalable systems. It means the optimal use of servers or hardware. For example, in the example above, with 100 times the number of visits, the system should be able to respond well to the extra volume by increasing the server power 5 times.


In this article, we introduced one of the common methods of scaling or scalability called horizontal scalability. In many companies, the vertical scalability method is used as soon as the system needs scalability. While the horizontal scalability method has valuable advantages over its vertical counterpart, it often prioritizes it for use. Do you have experience working with this type of scalability? What do you think are the risks of using the horizontal scalability method?