Skip to content
StackDecode
System Design
8. Load Balancing and ScalabilityAnimated

Auto Scaling

Adding or removing servers automatically.

The idea

Rules or metrics such as CPU trigger scaling, so capacity follows demand.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Load balancerApp 1App 2App 3App 4Shared state
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Scale the app tier by adding identical instances.

step:
1/4
at:
Load balancer
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Monitor a metric
  2. 2Cross a threshold
  3. 3Launch or terminate instances
  4. 4Wait for cooldown

Where it is used

Cloud workloads.

Watch out for

Slow startup causes lag behind spikes.

Related