Interview Prep/SRE & Reliability/Capacity & Load Testing

Your HPA scales out during spikes, but users still see errors for the first 2 minutes.

AdvancedScenarioCapacity & Load Testing
Answer

Situation read → Scaling is too slow for the spike: metric delay, scale-up policy, pod startup time, or node provisioning.

What I'd do →

  1. Measure each stage: when the metric crossed the target, when the HPA scaled, when pods became Ready, whether pods were Pending waiting for nodes.
    kubectl describe hpa checkout -n shop
    kubectl get events -n shop --field-selector reason=FailedScheduling
    
  2. Tune behavior.scaleUp (allow 100% increase per 15s, no stabilization window for scale-up).
  3. Reduce startup time: smaller images, faster readiness, preloaded caches.
  4. Keep headroom: higher minReplicas or a lower target utilization; low-priority placeholder pods to keep spare node capacity.
  5. Consider scaling on RPS or queue depth (KEDA) instead of CPU.

Why → Reactive autoscaling has inherent delay; headroom covers the gap.

Interview tip → Name the stages: metric lag, HPA sync, pod start, node provisioning.

All SRE & Reliability questions Roadmap: SRE & incident response

More on Capacity & Load Testing