How to configure concurrentRequests and messageCount when scaling Azure Container Apps?

Kamal Rathnayake 31 Reputation points MVP
2022-05-31T23:47:40.347+00:00

This is the definition given in the documentation for concurrentRequests count.

"When the number of requests exceeds this value, then another replica is added.
Replicas will continue to be added up to the maxReplicas amount as the number of concurrent requests increase."

https://learn.microsoft.com/en-us/azure/container-apps/scale-app

How is the concurrent request count defined? What's the time window. Is this per replica?
How does this affect to queue based scaling? A new replica created?

I'm expecting an answer like this. :)
Replica count = Message Count in the Queue / messageCount

Couldn't find this information mentioned in the docs. Thanks!

(I wasn't able to add azure-container-apps tag)

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
215 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,360 questions
{count} vote

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,451 Reputation points
    2022-06-15T10:08:15.753+00:00

    Hi @Kamal Rathnayake ,

    Thanks for reaching out to Q&A forum.

    In Azure containerized apps, the scaling is taken care by the Keda (Event driven). You can control the horizontal scaling by resources.properties.template.scale section of the JSON configuration file. For Http traffic, the scaling of replicas is based on the number of concurrent requests. If the Min value is set to 1, then by default the container would have one replica running. When the value of the concurrentRequests property increases, one replica is added, there is no time window. It is not per replica but for the entire Azure container app itself. Let say, there are 1000 concurrent requests and the concurrentRequests property is set to 100, then 10 replicas will be running.

    Same logic can be applied for the event driven (messaging) trigger as well.

    I hope this helps! Feel free to reach out to me if you have any further queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments