-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accept max_scale_up and max_scale_down for target-value #848
Conversation
c65590d
to
a1f5677
Compare
I've force-pushed the unit tests. Feel free to reach out if there are any queries! |
bebe6b2
to
cd52cc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution @brmzkw! I really like the idea 🙂
It provides a stepped scaling instead of potentially abrupt changes. I was thinking if we could adopt this configuration more broadly such that it could be used with any strategy:
policy {
# ...
max_scale_up = 10
max_scale_down = 3
# ...
}
But looking at the other strategies we have so far they seem more controlled than target-value
because they usually define static changes. We can always expand later if we find the need.
Would be able to write some docs for these new config in https://github.com/hashicorp/nomad/blob/main/website/content/tools/autoscaling/plugins/strategy/target-value.mdx?
The two optional parameters max_scale_up and max_scale_down determine the maximum and minimum number of scaling differences between two evaluations. It is useful to avoid scaling down or scaling up a job too quickly.
This is why I implemented it in the target-value plugin. For example, I'm not sure it would make sense to have these parameters for the pass-through or for the fixed-value strategies. Thanks for the merge, I'll update the documentation today. Do you know when you intend to make a release? |
No specific date yet, but we will probably release a new version soon. |
Hey,
The two optional parameters max_scale_up and max_scale_down determine the maximum and minimum number of scaling differences between two evaluations.
It is useful to avoid scaling down or scaling up a job too quickly.
The code is not tested yet. For now, this is a draft pull request to see if you might be interested to include the feature in the target-value plugin.