[System Design] Vertical Scaling — In a Nutshell (with OOP Code)

The basic idea of the vertical scaling is to add more resources to the existing system in order to super-size it and to meet the expectations.

Consider the below system,

Server’s Threshold is 5K

And Code Snippets,

Client: Code

Server: code

Now, the server is currently strong enough to take 5K requests at most.

In order to scale up the system vertically, we need to increase the Server’s strength, so that it will be able to take more requests, for example, 10K or 15K at most.

Possible Design Solutions

  1. Increase the threshold limit.

OR

Drawback: Heap Issues with the time.

2. Chain the Servers: Once you get the request, if not possible to serve it, Send it to chained Server. (Actual scaling vertically)

Since Server 1 is exposed to the client, in order to maintain the decoupling and extensibility in the system, we need to make sure that all requests and responses should have to be driven through Serve 1 or Master server.

Drawback:

  1. Increase Response time.
  2. Also, the headache of managing request chaining increases with the increase in client count.

There is one more design solution for scaling vertically. if you know, do comment.

Advantages of Vertical scaling :

  1. Reduced software costs.
  2. Easy Implementation.

Major Disadvantages of Vertical Scaling:

  1. Limited Scaling.
  2. The risk for downtime is much higher than horizontal scaling.
  3. Greater risk of outages and hardware failures.
  4. Finite scope of upgradeability in the future.

Code Source:

--

--