You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix correct initial poller count for autoscaler (#1440)
What changed?
rename pollerCount to less confusing name pollerCountWithoutAutoscaling
ensure starting enough goroutines for pollers when autoscaler is enabled
Why?
Consider a case when autoscaler is enabled with 40 max, 10 initial, 2 min. We need to start 40 poller goroutines first and only allow 10 to pass initially.
This is achieved by starting 40 go bw.runPoller() goroutines and set PollerPermit to 10.
The bug we have now is we only start 10 goroutines at the beginning so it just won't scale up.
How did you test it?
bench test with stable tasklist traffic.
Pollers are 2 intially with 20 instances with autoscaler enabled.
After scaling down 20 -> 10 and 10 -> 2. We saw the poller quota increased to cover the loss of hosts. Schedule to start latency is maintained.
Potential risks
Additional goroutines will be created but it's ok because we are already creating a max of 10k goroutines by default for sticky executions.
0 commit comments