Vertical Scaling In System Design | SDE Interview

Ganesh Prasad
3 min readJan 7, 2023

Vertical scaling, also known as scaling up or scaling vertically, refers to the practice of increasing the capacity of a single component in a system, such as a server or a database, by adding more resources, such as memory or CPU. This is in contrast to horizontal scaling, which involves adding more components to a system to distribute the load, such as adding more servers to a network.

When To Scale Vertically

Vertical scaling is often used to improve the performance of a system that is struggling to keep up with demand. By adding more resources to the system, it is possible to increase its capacity and handle a larger workload. This can be particularly useful for systems that are running on a single server and are limited by the resources of that server.

In the above diagram, a single server has its resources (CPU, memory, etc.) increased to handle more workload.

Advantages of Vertical Scaling

One of the main benefits of vertical scaling is that it is often easier and quicker to implement than horizontal scaling. Adding more resources to a single server is typically a straightforward process, and can be done without making any changes to the system's architecture. This can be particularly useful in situations where time is of the essence, and there is a need to scale up quickly to meet demand.

Another benefit of vertical scaling is that it is often more cost-effective than horizontal scaling. Adding more servers to a system can quickly become expensive, particularly if those servers run specialized hardware or software. In contrast, adding more resources to a single server is often a relatively inexpensive process.

Disadvantages of Vertical Scaling

However, vertical scaling does have some limitations. One of the main drawbacks is that it is only effective up to a certain point. At some point, the capacity of a single server will be reached, and it will no longer be possible to scale up by adding more resources. When this happens, it will be necessary to switch to horizontal scaling in order to continue increasing capacity.

Another limitation of vertical scaling is that it can be less reliable than horizontal scaling. If a single server fails, the entire system will go down, resulting in downtime. In contrast, if a server in a horizontally scaled system fails, the load can be distributed to the other servers, minimizing the impact on the system as a whole.

Despite these limitations, vertical scaling can be a valuable tool for improving the performance of a system that is struggling to keep up with demand. It is advantageous in situations where time is of the essence, and there is a need to scale up quickly, or where the cost of adding more servers would be prohibitive.

Conclusion

In summary, vertical scaling involves increasing the capacity of a single component in a system by adding more resources, such as memory or CPU. It is often easier and quicker to implement than horizontal scaling and can be more cost-effective in some cases. However, it has some limitations, including the fact that it is only effective up to a certain point and can be less reliable than horizontal scaling.

That’s all 👍🏼.

Thanks 🤗.

Want to Hire/Connect? LinkedIn

P.S.: If you like this uninterrupted reading experience on this beautiful platform of Medium.com, consider supporting the writers of this community by signing up for a membership HERE. It only costs $5 per month and helps all the writers.

A clap would be highly appreciated if you liked what you just read. You can be generous in clapping; it shows me how much you enjoyed this story. And if you didn’t like it? Please do comment😋!

--

--

Ganesh Prasad

Backend Developer at Appscrip | C++ veteran, 💜 Dart