Why the number of pods running is reduced while the number of messages in the queue is still high? #1870
Unanswered
ChayanBansal
asked this question in
Q&A / Need Help
Replies: 1 comment 2 replies
-
I think that HPA controller does that based on the queue length (coming from KEDA metrics) and the current pod countm, you can check the HPA algorithm for details: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details You might want to check https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-configurable-scaling-behavior as well, there are scaling policies, that could help you with tweaking how fast the HPA does the scale up/down operation. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running a KEDA enabled k8s cluster with Storage Queue Azure Function which executes 2000 messages at once having variable execution times (between 30 seconds to 10 minutes).
The system works fine for a certain duration but when the number of messages in the queue starts decreasing, the number of pods also start decreasing.
Question: Why the number of pods running is reduced while the number of messages in the queue is still high?
Example: The maximum replica count is 120 and the number of messages in the queue is around 250. So why the HPA scales down the pods. Ideally, it should still be using all the 120 pods to complete all messages in the queue.
Supplement Questions:
Following is the scaledobject.yaml file:
Deployments.yaml file:
Beta Was this translation helpful? Give feedback.
All reactions