Does the HPA use CPU requests or limits?

When the HPA targets CPU utilization, it compares observed CPU use with the CPU request. The scheduler uses the request to decide whether a pod fits on a node. A CPU limit controls how much CPU the container can use under enforced quota. Katarzyna Dusza explains what each setting does, and Paul Dally traces the effect on HPA targets.

Imagine six identical pods averaging 200 millicores each, with a 60% CPU utilization target. Use the same traffic and the same observed CPU before and after the change.

What happens when you halve the request?

Same 200m average CPU use per pod
CPU requestObserved utilizationCalculated replicas
400m50%5
200m100%10

Kubernetes estimates desired replicas by multiplying the current count by observed utilization divided by the target, then rounding up. At a 400m request, that’s 6 × 50 ÷ 60. At 200m, it’s 6 × 100 ÷ 60. These are simplified recommendations before tolerance, stabilization, replica bounds and missing metrics come into play.

The smaller request makes an individual pod easier to place. It can still create more pods under the same load. That’s how a change meant to lower compute use can leave you with more replicas than expected.

What should you watch during a rightsizing test?

Change one workload at a time. Compare tail latency, CPU throttling, desired versus ready replicas and node count through a normal period and a burst. If the HPA calls for ten pods but six become ready, check scheduling and node capacity before lowering requests again.

For a worker, verify that CPU tracks the customer outcome you care about. A worker waiting on a slow service may use little CPU while queue age climbs. Track queue age alongside CPU when evaluating the scaling policy.

If your team is tuning EKS or GKE, bring one service’s requests, HPA target and a peak-traffic chart. Inframan can help you walk through how that service scales and which metrics to watch before you change the rest of the cluster.

Review one workload’s scaling