-
Notifications
You must be signed in to change notification settings - Fork 29
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
[KEDA][AzureEventHub] App not scaling to zero #1225
Comments
@goncalo-oliveira thank you for reaching out. Does this application have external ingress enabled and is also serving HTTP requests? |
Hi @simonjj, thanks for replying. Yes, as a matter of fact, the app does have ingress enabled so that prometheus metrics can be scraped off by another app, although the ingress traffic is limited to the container app environment. Right... as I'm writing this... the scraping is actually keeping the app alive... |
Just to confirm, I've removed the ingress from the app and it did scale down to zero after some time, as expected. However, the app did not scale back up when new events were added, which was unexpected. Reactivating the ingress woke the app again and scaled up to 2 replicas, possible because of the number of events waiting and after some time, it scaled down to 1, after the number of events normalized (all as expected). Am I missing something here? I do have It's not the end of the world, since for my particular use case, in production, I am not expecting the number of events to be zero, ever, but it's still an unexpected behaviour. |
@goncalo-oliveira Can you please check your system logs to see if there are any scaling/KEDA related error messages? It's possible that the Event Hubs scale rule isn't correctly configured and the only thing scaling the app is the HTTP rule. |
I guess that I'm proving myself wrong and that things are working as expected - which is a good thing. Can't say why it didn't work first, maybe I did have something not properly configured.
Thank you both, @simonjj and @anthonychu. |
Thanks for clarifying and getting back to us. We will add an item to improve the KEDA error messaging. |
This issue is a:
Issue description
I have set up a container app with 0 - 4 replicas, using
azure-eventhub
scale rule with the following settingsI did have an earlier issue, which I commented on #972, where the app didn't scale down, but that was down to the missing
checkpointStrategy
which was updated. It now scales up and down to 1, depending on the load. However, it does not scale down to zero when there are no events to process.I was thinking that it might be intended behaviour, but from the documentation, it seems that it should scale to zero and activate at a threshold
Steps to reproduce
minReplicas: 0
and a positivemaxReplicas
valueExpected behavior
Without any events being sent to the Event Hub, the expectation was for the app to scale to zero. When the unprocessed messages hits the
activationUnprocessedEventThreshold
, the app scales back to 1.Actual behavior
Without any events being sent to the Event Hub, the number of replicas is kept at
1
.Screenshots
The text was updated successfully, but these errors were encountered: