jrasell / sherpa

Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Mozilla Public License 2.0
163 stars 8 forks source link

Autoscaler concurrency limiter to avoid overloading #23

Closed jrasell closed 5 years ago

jrasell commented 5 years ago

Is your feature request related to a problem? Please describe. Currently the internal autoscaler loops over the stored policies and will trigger and autoscaling run without any limit on the number of concurrent processes. In environments with a decent number of running and scalable jobs, this can cause pressure on the Nomad servers due to the number of API calls required to make.

Describe the solution you'd like. The autoscaler should have some method to limit the number of concurrent autoscaling activities that can take place. This ideally would be something that has a sensible default, but that can be overridden by the operator. The Nomad num_schedulers provides an ideal reference.