From 5347e2c2c80fbc45be7390eab117e861d30776d1 Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Thu, 30 Nov 2023 11:59:10 +0100 Subject: [PATCH] ADR: Changing semantics of min runners to be min idle runners (#3040) --- .../adrs/2023-07-18-customize-listener-pod.md | 2 +- docs/adrs/2023-11-02-min-runners-strategy.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/adrs/2023-11-02-min-runners-strategy.md diff --git a/docs/adrs/2023-07-18-customize-listener-pod.md b/docs/adrs/2023-07-18-customize-listener-pod.md index 0d567ce5..809c0f20 100644 --- a/docs/adrs/2023-07-18-customize-listener-pod.md +++ b/docs/adrs/2023-07-18-customize-listener-pod.md @@ -1,6 +1,6 @@ # Customize listener pod -**Status**: Proposed +**Status**: Done ## Context diff --git a/docs/adrs/2023-11-02-min-runners-strategy.md b/docs/adrs/2023-11-02-min-runners-strategy.md new file mode 100644 index 00000000..ace4061f --- /dev/null +++ b/docs/adrs/2023-11-02-min-runners-strategy.md @@ -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.