An Azure service that provides a general-purpose, serverless container platform.
Hi @Brian Bento ,
Thank you reaching out to Microsoft Q & A !
CooldownPeriod is not a property of New-AzContainerAppScaleRuleObject. That cmdlet creates an individual scaling rule, whereas the cooldown period is part of the overall Container App scale configuration.
The underlying Container Apps resource model defines cooldownPeriod at the same scale level as minReplicas, maxReplicas, pollingInterval, and rules. Microsoft documents the default cooldown period as 300 seconds when it isn't specified.
Therefore, you should not add cooldownPeriod to CustomMetadata, because that metadata belongs to the individual scaler.
One point to note is that the cooldown period applies when scaling in from the final replica to zero. It does not affect the removal of other replicas. This is particularly relevant in your configuration because you have ScaleMinReplica = 0.
If the Az.ContainerApp PowerShell cmdlet/version you're using doesn't expose the scale-level cooldown property, you can configure it through a deployment method that exposes the underlying Container Apps scale model, such as ARM/Bicep.
References:
- New-AzContainerAppScaleRuleObject
- Scaling in Azure Container Apps
- Microsoft.App/containerApps ARM/Bicep resource reference
Hope this clarifies the distinction between the scale rule and the scale-level cooldown configuration.
Please "Upvote the Answer" if this information helped you. This will help us and others in the community as well.