Lesson 3.2

Horizontal pod autoscaling

CPU is the default scaling signal and often the wrong one.

28mIntermediate8k students

Overview

Scale on the thing that hurts

CPU is the default scaling signal and often the wrong one. A service that is slow because it waits on a database shows low CPU while queueing badly — scaling on queue depth or request latency tracks the actual pain.

Autoscaling only helps if a new pod becomes useful quickly. A workload that takes two minutes to warm up cannot respond to a traffic spike, however aggressive the policy.

Stabilisation windows exist to stop flapping. Scaling down too eagerly after a spike means scaling back up moments later, which costs more than staying scaled.

In this lesson you will:

  • Scale on a metric that tracks load
  • Set sensible minimum and maximum replicas
  • Avoid oscillation between scale events

Resources

Previous Lesson
Next Lesson
Horizontal pod autoscaling — Kubernetes for Application Developers — Vertex