-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Selenium Grid Scaler | Max Sessions implementation issue #3061
Comments
@adborroto does it make sense to you? I remember we talked about the edge case of having only 1 pending message with high |
@JorTurFer @adborroto I think the confusion here (from what I can see in the tests) is that gridMaxSession is being treated as a variable representing the max session each node can take when in reality it is the max session count for the entire grid. When running a grid where every node only can run one session at a time it looks like so: |
That makes sense totally! |
@JorTurFer that is the plan, should have something soon just making sure im covering my bases with tests and docs. |
Signed-off-by: Brandon Wolfe <Wolfe1@gmail.com>
Hello, Thanks |
@AmmarRami it will be part of KEDA 2.8 coming in a week or so. |
Report
The MaxSessions implementation in #2774 is producing incorrect results. I ran into this while trying to create a fix for #2709.
Expected Behavior
We need to take into consideration the count of the nodes we have in this calculation.
Something like:
count = count / (gridMaxSession / nodeCount)
a. count = 5 / (2 / 2)
b. This equals out to be 5 which is how many nodes we need.
a. count = 17 / (10 / 2)
b. This equals out to be 3.4 (rounded to 4 I assume?) which is what we need.
Actual Behavior
https://github.com/kedacore/keda/blob/main/pkg/scalers/selenium_grid_scaler.go#L252 :
count = (count + gridMaxSession - 1) / gridMaxSession
is the current equation.This equation does not take into account the number of nodes available and thus will consistently produce an incorrect result, for example:
a. count = (5 + 2 - 1) / 2
b. This equals out to be 3 when it should be 5
a. count = (17 + 10 - 1) / 10
b. This equals out to be 2.6 (rounded to 3 I assume?) when it should be 4
Steps to Reproduce the Problem
Simply using the scaler with a version higher than 2.6.1 will suffice. Items will be left in the queue while we still have room to scale.
Logs from KEDA operator
No response
KEDA Version
2.7.1
Kubernetes Version
1.23
Platform
Microsoft Azure
Scaler Details
Selenium Grid
Anything else?
No response
The text was updated successfully, but these errors were encountered: