Back to all scenarios
Scenario #491
Scaling & Load
Kubernetes v1.25, Azure AKS

Pod Overload During Horizontal Pod Autoscaling Event

Horizontal Pod Autoscaler (HPA) overloaded the system with pods during a traffic spike, leading to resource exhaustion.

Find this helpful?
What Happened

During a sudden traffic spike, the HPA scaled up the pods rapidly, but the system could not handle the load, leading to pod evictions and service degradation.

Diagnosis Steps
  • 1Checked HPA configuration and found that the scaling trigger was set too aggressively, causing rapid pod scaling.
  • 2Observed resource exhaustion in CPU and memory as new pods were scheduled without enough resources.
Root Cause

Aggressive scaling triggers in HPA, without sufficient resource constraints to handle rapid pod scaling.

Fix/Workaround
• Adjusted HPA scaling parameters to make the scaling triggers more gradual and based on longer-term averages.
• Allocated more resources to the nodes and tuned resource requests for the pods to accommodate scaling.
Lessons Learned

Scaling policies should be configured with a balance between responsiveness and resource availability.

How to Avoid
  • 1Use conservative scaling triggers in HPA and ensure resource requests and limits are set to prevent overload.
  • 2Implement rate-limiting or other measures to ensure scaling is done in manageable increments.