Skip to content
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

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

Merged
merged 4 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/adrs/2023-07-18-customize-listener-pod.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Customize listener pod

**Status**: Proposed
**Status**: Done

## Context

Expand Down
19 changes: 19 additions & 0 deletions docs/adrs/2023-11-02-min-runners-strategy.md
Original file line number Diff line number Diff line change
@@ -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.