<p>In the Kubernetes <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-cooldown-delay" rel="nofollow noreferrer">documentation for horizontal pod autoscalers</a> it states as of version 1.12 a "new algorithmic update removes the need for the upscale delay"</p>

<p>I have searched for information on this change including going through the <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.12.md" rel="nofollow noreferrer">v1.12 change log</a>.  The change I see mentioned is the polling frequency from 30 seconds to 15 seconds.  </p>

<p>There are also some discussions about <a href="https://github.com/kubernetes/kubernetes/pull/74525" rel="nofollow noreferrer">adding HPA configurations for scale delay</a>.  </p>

<p>What was the change that removed the need for upscale delay? </p>

leemicw
<p>There are several changes (quoted from the release notes):</p>

<ul>
<li>Replace scale up forbidden window with disregarding CPU samples collected when pod was initializing. (<a href="https://github.com/kubernetes/kubernetes/pull/67252" rel="nofollow noreferrer">#67252</a>, <a href="https://github.com/jbartosik" rel="nofollow noreferrer">@jbartosik</a>)</li>
<li><p>Speed up HPA reaction to metric changes by removing scale up forbidden window. (<a href="https://github.com/kubernetes/kubernetes/pull/66615" rel="nofollow noreferrer">#66615</a>, <a href="https://github.com/jbartosik" rel="nofollow noreferrer">@jbartosik</a>)</p>

<ul>
<li>Scale up forbidden window was protecting HPA against making decision to scale up based on metrics gathered during pod initialisation (which may be invalid, for example pod may be using a lot of CPU despite not doing any "actual" work).</li>
<li>To avoid that negative effect only use per pod metrics from pods that are:</li>
<li>ready (so metrics about them should be valid), or</li>
<li>unready but creation and last readiness change timestamps are apart more than 10s (pods that have formerly been ready and so metrics are in at least some cases (pod becoming unready because of overload) very useful).</li>
</ul></li>
<li><p>Horizontal Pod Autoscaler default update interval has been increased from 30s to 15s, improving HPA reaction time for metric changes. (<a href="https://github.com/kubernetes/kubernetes/pull/68021" rel="nofollow noreferrer">#68021</a>, <a href="https://github.com/krzysztof-jastrzebski" rel="nofollow noreferrer">@krzysztof-jastrzebski</a>)</p></li>
<li>Stop counting soft-deleted pods for scaling purposes in HPA controller to avoid soft-deleted pods incorrectly affecting scale up replica count calculation. (<a href="https://github.com/kubernetes/kubernetes/pull/67067" rel="nofollow noreferrer">#67067</a>, <a href="https://github.com/moonek" rel="nofollow noreferrer">@moonek</a>)</li>
<li>To avoid soft-deleted pods incorrectly affecting scale up replica count calculations, the HPA controller will stop counting soft-deleted pods for scaling purposes. (<a href="https://github.com/kubernetes/kubernetes/pull/67067" rel="nofollow noreferrer">#67067</a>, <a href="https://github.com/moonek" rel="nofollow noreferrer">@moonek</a>) (same as above)</li>
</ul>

<p>This is a related change (quoted from the release notes):</p>

<ul>
<li>Replace scale down forbidden window with scale down stabilization window. Rather than waiting a fixed period of time between scale downs HPA now scales down to the highest recommendation it during the scale down stabilization window. (<a href="https://github.com/kubernetes/kubernetes/pull/68122" rel="nofollow noreferrer">#68122</a>, <a href="https://github.com/krzysztof-jastrzebski" rel="nofollow noreferrer">@krzysztof-jastrzebski</a>)</li>
</ul>

<p>More documentation related to that change is <a href="https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM/" rel="nofollow noreferrer">here</a>.</p>
