-
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
SQS scaleOnInFlight not being respected #4276
Comments
After some experiments and looking at the scaler code, it turns out if only one of many ScaledObjects in the cluster has |
What do you mean? It's a global variable inside the AWS SDK? inside the SQS Backend? I KEDA we store it as part of the scaler but each trigger has its own scaler instance. This behaviour you are describing sounds weird :( If you set |
Yes, if it's explicitly set to |
Each trigger inside each ScaledObject generates its own scaler instance, so from KEDA code pov, it isn't global. I can't guarantee that internally the client doesn't use it globally somehow (maybe storing the value at scope level). I have to check it deeper to be 100% sure but this is interesting as this could be a strong limitation to share in docs. |
Hi, |
Report
We have our ScaledObject configured as such:
KEDA is not scaling the deployment based on in-flight message count (AWS API is reporting the value correctly). It only looks at messages available, and we verified it by changing queueLength - 1 instead of 2 indeed causes KEDA to scale twice as high, but only if there are messages available.
As soon as messages available reach 0, no matter how many messages are in-flight (tested with 200-2000), KEDA will not scale unless messages available starts going up again.
This results in frequent and steep peaks and lows in scaling.
What is also weird is that it was working as expected before, and started behaving incorrectly when we added more ScaledObjects / ScaledJobs (not many, around 8) to this cluster.
We have tried recreating ScaledObject and restarting / redeploying KEDA completely, no dice. We're running EKS K8S 1.22 and are planning to upgrade, however, again, it worked as expected for some time. I haven't seen any specific fixes in newer versions / any similar issues open or closed.
Expected Behavior
Expected to see KEDA keeping up with in-flight message counter and keep, for example, deployment replicas at 250 for ~500 messages in-flight and 0 messages available.
Actual Behavior
KEDA does not keep up with messages in-flight and scales deployment to minimum.
Steps to Reproduce the Problem
scaleOnInFlight
set tofalse
.Logs from KEDA operator
Nothing suspicious / no errors in logs, tried debug level as well.
KEDA Version
2.8.1
Kubernetes Version
< 1.23
Platform
Amazon Web Services
Scaler Details
SQS
Anything else?
No response
The text was updated successfully, but these errors were encountered: