最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure - Why doesn't Container Apps scale down with scale rule in place (scale up works)? - Stack Overflow

programmeradmin1浏览0评论

I've configured a ContainerApp with an auto scale rule in place based on the Azure Service Bus Topics. The up scaling of the ContainerApp works properly. However, it does not scale down. Any idea what is going wrong?

Replicas for ContainerApp:

Min replicas: 1
Max replicas: 5
Cooldown period: 300
Polling interval: 3

Auto scale rule for Container App:

Authentication
service-bus-connection-string: connection

Metadata
messageCount: 2
namespace: namespaceName
subscriptionName: subscriptionName
topicName: topicName

Update: One thing that I did notice is that there is a Probe Failed since the Health check is not configured in Aspire but I don't think that should be an issue since upscaling works properly.

I've configured a ContainerApp with an auto scale rule in place based on the Azure Service Bus Topics. The up scaling of the ContainerApp works properly. However, it does not scale down. Any idea what is going wrong?

Replicas for ContainerApp:

Min replicas: 1
Max replicas: 5
Cooldown period: 300
Polling interval: 3

Auto scale rule for Container App:

Authentication
service-bus-connection-string: connection

Metadata
messageCount: 2
namespace: namespaceName
subscriptionName: subscriptionName
topicName: topicName

Update: One thing that I did notice is that there is a Probe Failed since the Health check is not configured in Aspire but I don't think that should be an issue since upscaling works properly.

Share Improve this question edited Mar 28 at 7:19 NetDev asked Mar 28 at 7:19 NetDevNetDev 32 bronze badges 1
  • Ensure the health probe is properly configured, as a failed probe can prevent scaling down. Additionally, consider adjusting the cooldown period to be shorter (e.g., 60-120 seconds) to allow quicker scaling down based on message count @NetDev – Vinay B Commented Apr 2 at 8:32
Add a comment  | 

1 Answer 1

Reset to default 0

Container Apps scale down with scale rule doesnt work where as in place scale up works

Where your Azure Container App scales up correctly but fails to scale down is generally occurring due to scaling rule condition, cooldown configurations and misconfigurations among health probes.

In order to overcome this, you may need to reconfigure the health probe because When a container is marked unhealthy due to missing or failed probes, it can prevent to autoscale from scaling it down, even if the workload has decreased.

You can check out with the Microsoft documentation on configuring the health probe by following

refer: https://learn.microsoft/en-us/azure/container-apps/health-probes?tabs=arm-template

Once this done, check with the scaling rules dedicated to cooldown period and the messageCount threshold because you provided cooldown period is set to 300 seconds, which can delay scale-in significantly after a scale-out event. Try reducing this to around 60 or 120 seconds to allow the app to scale down more responsively.

Similarly, your messageCount threshold is set to 2 which is mostly a high value you can change it to 1 or even 0 temporarily to test whether scaling down is triggered as expected.

For more information on this refer

https://learn.microsoft/en-us/azure/container-apps/scale-app?pivots=azure-portal#configure-scaling-rules

发布评论

评论列表(0)

  1. 暂无评论