1

I have a azure container app that I want to scale based on a Azure service bus queue.

The app is already configured to process the queue and every instance processes two messages at a time. With manually scaling everything works as expected.

Now I want to autoscale the app because there are peaks with hundreds of messages but most of the time and during the night scaling to zero would be great.

I configured my container app with min replicas = 0 and max replicas = 10 and and I use a simple http-auto-scaler with other apps and it really scales my apps down to zero and up if I have more connections. So I want to enable this with my backend queue processor as well.

After reading this article https://techcommunity.microsoft.com/t5/fasttrack-for-azure/container-apps-a-practical-scaling-with-azure-queue-scale-rule/ba-p/3722075 I tried to add a azure queue scale

scaler 1

This doesn't work and my app only scales down to one but never goes higher even with 20 messages to process.

I also tried a keda scale rule as described here but this doesn't seem to change anything either

scaler 2

What am I missing?

Is there a way to dignose these rules?

1 Answer 1

0

Alright, I solved it.

In hindsight it should be pretty obvious but most of the tutorials I found just leave this detail out and just tell you to select the connection string and set trigger parameter to connection which I did.

They key point is in the keda documentation

kede docs

My connectionstring was just a url https://messagingabcdef.servicebus.windows.net:443/ and not in the form Endpoint=sb://messagingabcdef.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=1234567890=

So it makes sense. My container app is allowed to access the service queue with this connection string but the external keda scaler obviously not. I still haven't figured out how to find scaling related logs that would have pointed me in the direction but after adding the Endpoint connection string to the scaler rule the container app is scaling as expected.

metrics

Sign up to request clarification or add additional context in comments.

2 Comments

The only way to get the KEDA logs I know of, is through the Logs screen on a container app, query the ContainerAppSystemLogs_CL table and filter by EventSource_s = 'KEDA'
@MarnixvanValen Thank's - Will keep that in mind for the next time I need do diag this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.