HPA oscillation with aggressive scale-down
Your task
A bursty, spiky-traffic API on an HPA that scales on average CPU keeps oscillating: it scales up during a burst, then the autoscaler scales it back down aggressively in the lull, and the next burst hits an under-provisioned fleet that must cold-start pods (each ~30s to ready), so p99 spikes on every burst and the fleet visibly flaps up and down all day. Steady-state load would be fine with a stable replica count. The HPA was recently retuned to be 'more cost-efficient' with a low target and short stabilization window. How do you triage and mitigate?
It covers
- Autoscaler flapping
- Scale to zero
- Cold start