Azure Container Apps with KEDA + Azure Service Bus scaling to 0 even when messages are coming in #6957
Unanswered
mxvoloshin
asked this question in
Q&A / Need Help
Replies: 1 comment
-
Interesting case! I think you are right. If messages are processed faster than the polling interval, KEDA sees an empty queue and starts the scale-down timer, even though more messages are coming. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using Azure Container Apps with a custom KEDA-based scaling rule that listens to an Azure Service Bus queue.
Here’s my setup:
minReplicas: 0
maxReplicas: 2
pollingInterval: 30 seconds
cooldownPeriod: 300 seconds
The scaling generally works — it scales up when messages arrive and down when idle.
However, I’m seeing unexpected scale-to-zero behavior even when messages are still coming in (though sporadically).
📈 My scenario:
Messages arrive with irregular frequency: 1 message every 1 to 15 seconds.
Each message is processed very quickly, so the queue often appears empty when KEDA checks it.
As a result, the app sometimes scales to 0 before the full 300-second cooldown, even though messages continue to trickle in.
❓ My question:
Is my assumption correct that because messages are processed too quickly, KEDA may not "see" them during the polling intervals — causing it to believe the queue is empty and trigger scale-down?
If so, is there a recommended way to prevent this kind of premature scale-down for low-frequency but steady message traffic?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions