Skip to the content.

๐Ÿ”น 1. Vertical Scaling (Scale-Up)

Definition:

Characteristics:

Pros:

Cons:

Example:


๐Ÿ”น 2. Horizontal Scaling (Scale-Out)

Definition:

Characteristics:

Pros:

Cons:

Example:


๐Ÿ”น 3. Comparison Table

Feature Vertical Scaling Horizontal Scaling
How it scales Upgrade existing machine Add more machines
Complexity Low High
Fault tolerance Low (single point of failure) High (distributed)
Cost Expensive at high end Cost-effective (commodity machines)
Limit Hardware limit Practically unlimited
Example Upgrading RAM/CPU Adding web servers, DB shards

๐Ÿ”น Summary


Vertical Scaling (Scale-Up)

          +------------------+
          |     Server 1     |
          |  CPU: 4 -> 8     |
          |  RAM: 16GB -> 64GB|
          |  Storage: 1TB    |
          +------------------+

Horizontal Scaling (Scale-Out)

      +------------+    +------------+    +------------+
      |  Server 1  |    |  Server 2  |    |  Server 3  |
      |  CPU: 4    |    |  CPU: 4    |    |  CPU: 4    |
      |  RAM: 16GB |    |  RAM: 16GB |    |  RAM: 16GB |
      +------------+    +------------+    +------------+
             \               |               /
              \              |              /
               \             |             /
                +------------------------+
                |      Load Balancer     |
                +------------------------+

โœ… Key Takeaway: