ADR: Changing semantics of min runners to be min idle runners (#3040)

This commit is contained in:
Nikola Jokic 2023-11-30 11:59:10 +01:00 committed by GitHub
parent 1cba9c7800
commit 5347e2c2c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Customize listener pod # Customize listener pod
**Status**: Proposed **Status**: Done
## Context ## Context

View File

@ -0,0 +1,19 @@
# Changing semantics of the `minRunners` field
**Status**: Proposed
## Context
Current implementation treats the `minRunners` field as the number of runners that should be running on your cluster. They can be busy running the job, starting up, idle. This ensures faster cold startup time when workflows are acquired as well as trying to use the minimum amount of runners needed to fulfill the scaling requirement.
However, especially large and busy clusters could benefit having `minRunners` as minimum idle runners. When jobs are comming in large batches, the `AutoscalingRunnerSet` should pre-emptively increase the number of idle runners to further decrease the startup time for the next batch. In that scenario, the amount of runners that should be created should be calculated as the number of assigned jobs plus the number of `minRunners`.
## Decision
We will redefine the minRunners field to represent the minimum number of idle runners instead. The total number of runners would then be the sum of jobs assigned to the scale set and the minRunners value. If the maxRunners field is set, the desired number of runners will be the lesser of maxRunners and the sum of minRunners and the number of jobs.
The change in the behavior is completely internal, it does not require any modifications on the user side.
## Consequences
Changing the semantics of the `minRunners` field should result in faster job startup times on spikes as well as on cold startups.