Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Use goroutine pool within autoscaler to limit concurrency. #24

Merged
merged 2 commits into from
Aug 26, 2019
Merged

Conversation

jrasell
Copy link
Owner

@jrasell jrasell commented Aug 21, 2019

Previously the internal autoscaler iterated through the scaling
policies and launched a go routine to run the autoscaling check
process. There were no limits on the number of routines which
could lead to overloading on the Nomad API.

This change introduces a goroutine pool in order to limit the
number of concurrent scaling threads. The number of threads is
configurable via the CLI, with a default of 3. When all threads
are in use, the iteration will block until additional work
can be consumed. There is a timelimit of the execution, currently
set to 60's which we may want to make configurable in the future.

closes #23

Previously the internal autoscaler iterated through the scaling
policies and launched a go routine to run the autoscaling check
process. There were no limits on the number of routines which
could lead to overloading on the Nomad API.

This change introduces a goroutine pool in order to limit the
number of concurrent scaling threads. The number of threads is
configurable via the CLI, with a default of 3. When all threads
are in use, the iteration will block until additional work
can be consumed. There is a timelimit of the execution, currently
set to 60's which we may want to make configurable in the future.
@jrasell jrasell added kind/enhancement Issues relating to enhancements area/autoscaling Issues related to internal autoscaling labels Aug 21, 2019
@jrasell jrasell self-assigned this Aug 21, 2019
@jrasell jrasell merged commit f25fd1a into master Aug 26, 2019
@jrasell jrasell deleted the gh-23 branch August 26, 2019 19:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/autoscaling Issues related to internal autoscaling kind/enhancement Issues relating to enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autoscaler concurrency limiter to avoid overloading
1 participant