You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-autoscaling/4951-configurable-hpa-tolerance/README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,8 +143,17 @@ updates.
143
143
[Horizontal Pod Autoscaler][] (HPA) regularly estimates how many replicas a given Deployment (or other resource with a `/scale` subresource) should instantiate.
144
144
HPAs define one (or more) metrics (e.g. CPU utilization) on which autoscaling is based. The number of replicas is derived from the ratio between the *expected* and *current* value of this metric ([Algorithm details][]).
145
145
146
-
To avoid flapping, the number of replicas is left unchanged if this ratio is approximately 1, within a *tolerance* set to 10%. This proposal adds a parameter
147
-
to HPAs allowing users to configure this tolerance.
146
+
For example, for a workload with 100 `currentReplicas` and a usage ratio
147
+
(`currentMetricValue`/`desiredMetricValue`) of 1.07, the calculated `desiredReplicas`
148
+
would be 107 (100 * 1.07).
149
+
150
+
However, to avoid flapping, scaling actions are skipped if the usage ratio is approximately 1, within a
151
+
globally-configurable *tolerance*, set to 10% by default. In the example above, no scaling action would
152
+
take place, since the ratio is within this tolerance.
153
+
154
+
This proposal adds a parameter to HPAs allowing users to configure this tolerance per HPA resource.
155
+
For the example above, we could configure the tolerance in the workload's HPA to 5%, which would
156
+
allow the scale-up to 107 replicas to proceed.
148
157
149
158
[Horizontal Pod Autoscaler]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
0 commit comments