Skip to content

Fix required instance calc preventing demand runaway

Arran Walker requested to merge ajwalker/required-instances-fix into main

When IdleScale was 0, scaling instances was previously unstable because it would often incorrectly calculate there being demand for capacity when there wasn't.

With this fix, if acquired + unavailable capacity is above what can be provided by the current number of instances than we don't scale.

This prevents a demand runaway scenario where the demand for capacity was previously satisfied by the current number of instances, but then the instances were removed. In this case, we shouldn't re-create capacity to satisfy this perceived demand, but instead wait for acquisitions to be released or for unavailable capacity to be removed.

Closes gitlab-org/fleeting/plugins/aws#64 (moved)

Edited by Arran Walker

Merge request reports