B
BlogSmoke
Scalability

Horizontal vs Vertical Scaling

system-designscalability

Horizontal vs Vertical Scaling

Vertical Scaling (Scale Up)

Add more power (CPU, RAM) to an existing machine.

Pros: Simple, no code changes Cons: Hardware limits, single point of failure

Horizontal Scaling (Scale Out)

Add more machines to distribute the load.

Pros: No upper limit, better fault tolerance Cons: Requires load balancing, distributed state management

When to Choose

Start with vertical scaling for simplicity. Move to horizontal when you hit hardware limits or need high availability.