Tue, 16 Apr, 2024

HPA

HPA in 01Cloud

Horizontal Pod Autoscaler (HPA) is a feature that automatically adjusts the number of pod replicas in a deployment based on observed CPU Utilization or Custom Metrics. Using HPA in 01cloud allows you to automate the scaling process, improving the scalability, availability, and cost-effectiveness of your applications running on Kubernetes clusters.

How does HPA work in 01cloud?

1. Monitoring: HPA continuously monitors the CPU utilization or custom metrics of your application pods.

2. Thresholds: You define thresholds or rules that specify when HPA should scale up or down. For example, you might set a threshold of 80% CPU utilization.

3.Scaling Actions:

  • Scale Up: When CPU utilization exceeds the defined threshold, HPA triggers a scale-up action, adding more pod replicas to handle the increased workload.

  • Scale Down: If CPU utilization falls below the threshold, HPA triggers a scale-down action, reducing the number of pod replicas to save resources.

4. Dynamic Adjustment: HPA dynamically adjusts the number of pod replicas based on real-time workload demands, ensuring that your application remains responsive and efficient.