Peeush Agarwal > Engineer. Learner. Builder.

I am a Machine Learning Engineer passionate about creating practical AI solutions using Machine Learning, NLP, Computer Vision, and Azure technologies. This space is where I document my projects, experiments, and insights as I grow in the world of data science.

View on GitHub

Scaling

This document explores the concepts of vertical and horizontal scaling in system architecture. It discusses the advantages and disadvantages of each approach, as well as scenarios where one may be preferred over the other.

TLDR;

Vertical scaling Horizontal scaling
Adds resources (CPU, RAM, storage) to a single machine Adds more machines to distribute load
Simpler to implement More complex, requires architectural changes
Limited by hardware constraints Can scale indefinitely
May require downtime for upgrades Enhances availability and fault tolerance

Vertical vs Horizontal Scaling Diagram

Vertical Scaling

Vertical scaling, also known as scaling up, involves adding more resources (CPU, RAM, storage) to an existing server or machine. This approach is often simpler to implement since it does not require changes to the application architecture. However, vertical scaling has limitations, such as hardware constraints and potential downtime during upgrades.

Advantages of Vertical Scaling

Disadvantages of Vertical Scaling

Horizontal Scaling

Horizontal scaling, or scaling out, involves adding more machines or instances to a system to distribute the load. This approach is more complex as it often requires changes to the application architecture, such as implementing load balancing and data replication. However, horizontal scaling offers greater flexibility and resilience.

Advantages of Horizontal Scaling

Disadvantages of Horizontal Scaling

When to Use Each Strategy


ยป CAP Theorem

Back to Core Architecture Principles Back to System Design Concepts