Hey all! Please tell me if I’m wrong here, but I can’t see a reason why the Nomad Autoscaler would scale in if there’s two or more threshold
strategies in the same policy.
For example, let’s use the policy below which I took from the threshold
documentation.
policy {
# ...
check "high-memory-usage" {
# ...
strategy "threshold" {
upper_bound = 100
lower_bound = 70
delta = 1
}
}
check "low-memory-traffic" {
# ...
strategy "threshold" {
upper_bound = 30
lower_bound = 0
delta = -1
}
}
# ...
}
Let’s assume the metric value we have is 20
. That means the low-memory-traffic
check would return ScaleIn
, as expected. However, since 20
is outside the threshold bounds of the high-memory-usage
check, it would return ScaleNone
. And because the Autoscaler chooses results that retain the most capacity (ScaleIn and ScaleNone => ScaleNone
), this policy will evaluate to ScaleNone
.
I can’t think of any non-overlapping combinations of threshold
strategies that would ever return ScaleIn
. Am I missing something here? Thanks for listen. I’ve been racking my brain on this a bit.