DEV Community

Ankur Yadav
Ankur Yadav

Posted on

Vertical Scaling vs Horizontal Scaling

What is Scaling?
Scalability is the ability of a system to handle an increasing amount of workload without sacrificing the latency.

Suppose, an application take X seconds to respond to a user request, it should take the same X seconds to respond to millions of concurrent user request.

The backend infrastructure of the app should not collapse under a load of a million concurrent requests. It should scale when subjected to a heavy traffic load & maintain the latency of the system.

Vertical Scaling
Vertical scaling means adding more power to the server. Suppose your app is hosted by a server with 32 GB of RAM. To handle the increased load you increase the RAM to 64 GB. Now the server is vertically scaled. This is also called scaling up.

Vertical Scaling

This should be the first step when the traffic on your app is increasing. This is the simplest way to scale since it doesn’t require any code refactoring or any complex configurations. but there is a limit we can augment on a single server.

Horizontal Scaling
Horizontal scaling means adding more hardware to the existing hardware resource pool. This increases the computational power of the system.

Horizontal  Scaling

Now the increased traffic can be easily dealt with the increased computational capacity & there is no limit to how much we can scale horizontally.

Horizontal scaling also provides us with the ability to dynamically scale in real-time as the traffic on our website increases & decreases over a period of time as opposed to vertical scaling which requires pre-planning & a stipulated time to be pulled off.

Top comments (0)