Just an idea that came to our mind and I wanted to share. Consider the following:
- Have a host that is capable of running 20 runners in parallel
- Have 2 orgs (A and B) registered
The problem is, there's now no way to specify that we are able to run 20 runners maximum. So when 10 runners are assigned to each org, all is good. On the other hand, when org A is rarely used, org B is limited to 10 runners, although most of the time more runners could be used, because resources are available.
If I am using autoscaling and set org A to max 10 runners and org B to max 20 runners, this will work fine, as long as org A has no runners active. But when org A ramps up, I end up with 30 runners, which will be a problem for the system.
What I was thinking as a rough idea:
- Add a "max number of runners" setting to the provider to determine how many runners can be run at maximum for each provider
- Add a "pool priority" setting to the pool to determine which pool should be preferred when autoscaling and we are reaching the maximum of the provider
So given my example above, this would:
- Have org A with prio 10 (higher) and org B with prio 0 (lower)
- Have org B with 19 runners and org A with 1 runner (when 1 is defined as the minimum for org A)
- Scale back org B to free resources for org A when org A scales up (so when org A has 5 runners, org B should only have 15)
- So when both orgs scaled to their maximum, we would end up with 10 runners for org A and 10 runners for org B
Just an idea that came to our mind and I wanted to share. Consider the following:
The problem is, there's now no way to specify that we are able to run 20 runners maximum. So when 10 runners are assigned to each org, all is good. On the other hand, when org A is rarely used, org B is limited to 10 runners, although most of the time more runners could be used, because resources are available.
If I am using autoscaling and set org A to max 10 runners and org B to max 20 runners, this will work fine, as long as org A has no runners active. But when org A ramps up, I end up with 30 runners, which will be a problem for the system.
What I was thinking as a rough idea:
So given my example above, this would: