Can the Azure container apps from 0 to more like azure functions?

Question:

I have recently started exploring azure container apps as a microservice.
I have kept the minimum number of replicas to be 0 and maximum to be 10.
I am using a queue trigger input binding, that whenever a message comes in the queue it is processed.

I was expected it to work like a function app, where the container might be invoked on the input trigger. However, what I have observed is that the trigger doesnot get processed on the conditions I described above.

If I change the replicas to 1, then the trigger gets processed like a function app. But this method doesn’t make it a serverless service as one instance is ON all the time and is costing me money (also unable to find how much it is costing in the idle state).

Can someone please guide me if I understood the container apps correctly, and is there a way to only invoke the container when a message comes to the queue?

Asked By: Rebe

||

Answers:

Based on example in documentation, you can scale from 0 for azure storage queue using keda scaler.

Answered By: JJ.

The scenario that you are describing is what we support with ScaledJobs in KEDA instead of ScaledObject (deamon-like workloads).

ScaledJobs, however, are not supported in Azure Container Apps yet and is tracked on GitHub.

Answered By: Tom Kerkhove