Checkout slows at lunch as new pods never appear

On-call incidentEasy15 min

Your task

It is 12:25. The checkout service runs on Kubernetes in the shop namespace. A horizontal pod autoscaler (HPA) adds checkout pods when their average CPU passes 60%, up to 30 pods. Every pod in shop requests 1 CPU. This alert fires:

CheckoutLatencyP95: p95 above 800 ms for 10 minutes (current 2.6 s)

What you see:

  • p95, the time 95% of requests finish within, has climbed since 12:00 as lunch traffic arrived. kubectl get hpa checkout shows cpu: 97%/60% with 14 replicas.
  • kubectl get deploy -n shop shows checkout 14/23, cart 6/6 and loadgen 20/20. loadgen is 22 hours old. No checkout pod is Pending.
  • The cluster's 10 nodes have 16 CPUs each, and 56 of those 160 CPUs are unrequested. The cluster autoscaler has added no nodes today.
  • kubectl describe resourcequota -n shop shows requests.cpu at 40 of 40.
  • At 17:30 yesterday, Sam from the performance team posted: "Load test against staging checkout is done, results are in the doc."

How do you get checkout back to normal before the lunch rush ends, and what do you change this week?

It covers

  • Kubernetes
  • Resource quota
  • Hpa