Scalability

Scalability is the ability of a system to handle increasing load (users, traffic, data) without degrading performance. It is a core requirement for building reliable, production-grade systems.

A scalable system should:


Types of Scalability

1. Vertical Scaling (Scaling Up)

Vertical scaling means increasing the capacity of a single machine by upgrading hardware.

Examples


Characteristics


When Vertical Scaling Breaks

At this point, scaling up further becomes inefficient → you must scale out.


2. Horizontal Scaling (Scaling Out)

Horizontal scaling means adding more machines (nodes) to distribute load.

Instead of making one machine stronger, you make many machines work together.


Characteristics


Core Components Required

Load Balancer

Stateless Services

Distributed Data Layer


Challenges in Horizontal Scaling


Comparison Diagram

graph TD
    subgraph "Vertical Scaling (Scale Up)"
        V1[Small Server] --> V2[Medium Server] --> V3[Large Server]
    end

    subgraph "Horizontal Scaling (Scale Out)"
        LB[Load Balancer]
        LB --> H1[Server 1]
        LB --> H2[Server 2]
        LB --> H3[Server 3]
    end