loading...
Nlogn

Horizontal Scaling And Vertical Scaling

mayankjoshi profile image mayank joshi Updated on ใƒป2 min read

System Design (6 Part Series)

1) What Are Load Balancers And How Load Balancing Is Done? 2) Horizontal Scaling And Vertical Scaling 3 ... 4 3) Consistent Hashing - System Design 4) What is CAP theorem and where is it used? 5) Eventual Consistency and Strong Consistency 6) A Guide To Ace Your Next System Design Interview ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Scaling is the ability of a system to grow or shrink in size to meet the increasing user requirement. A scalable system has an advantage because it is adaptable to the changing needs or demands of its users. Scaling can be achieved either by adding more resources to the current system, or by adding new systems in the existing one, or by both.

When we are talking about System Design, we generally talk about two types of Scaling:

  1. Vertical Scaling
  2. Horizontal Scaling

Vertical Scaling

In vertical scaling, we add more new resources to the same system i.e, increase the amount of RAM, CPU, GPU and other resources to meet the increased computing requirement. It is easy to accomplish. It also consumes less power.

But, Vertical Scaling does not make the system fault-tolerant, i.e if we are scaling application running with a single server and if that server goes down, our entire system will go down. Also, it is often limited to the capacity of a single machine i.e, scaling beyond that capacity of a machine often involves downtime.

Horizontal Scaling

In Horizontal Scaling, we scale by adding more systems into the existing pool of systems. Since all server works independently and is equally capable of handling the request, hence this will eventually decrease the load of requests on each server and also make the entire system fault-tolerant i.e, even if one server goes down other systems will handle the upcoming request.
Also, there is no limit, we can add as many new servers as we want.

It is hard to implement as it requires all of the systems to be synchronized with each other also, we need to use a load balancer to distribute the load equally among all systems, which is an additional overhead.

System Design (6 Part Series)

1) What Are Load Balancers And How Load Balancing Is Done? 2) Horizontal Scaling And Vertical Scaling 3 ... 4 3) Consistent Hashing - System Design 4) What is CAP theorem and where is it used? 5) Eventual Consistency and Strong Consistency 6) A Guide To Ace Your Next System Design Interview ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Posted on Mar 22 by:

mayankjoshi profile

mayank joshi

@mayankjoshi

I love system design and most of the time I find myself learning or designing one of them. I'm highly active on twitter, So ping me there.

Nlogn

nlogn is a Computer Science portal specially designed to help you prepare for product-based companies interviews by practicing a wide variety of problem-related to system Desing, Data-Structure and much more.

Discussion

markdown guide