Skip to main content
idle · azure

Container Apps keeping replicas warm with zero requests

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

ZopNight flags an Azure Container App that ran replicas, a `Replicas` average above zero, while its `Requests` metric stayed at zero on average and at peak, with at least 7 days of request data. The minimum replica count kept compute billing for an app nobody called. Apps that already scale to zero are left alone, since they cost almost nothing.

Signal and threshold

How ZopNight evaluates Container Apps keeping replicas warm with zero requests.
Field Value
Rule IDsRC-273
Categoryidle
Severitymedium
MetricReplicas, Requests
ThresholdRequests = 0 (average and peak), Replicas average > 0
Evaluation window30d
SourceZopNight
Permissions usedMicrosoft.App/containerApps/read · Microsoft.Insights/Metrics/Read

Why a warm replica with no traffic still costs money

In the Consumption plan, Azure Container Apps charges each replica for the resources it consumes. Microsoft’s billing guide explains that a replica can drop to a reduced idle rate, but only when the revision has a minimum replica count above zero, is scaled to that minimum, and the replica is running, handling no HTTP requests, using under 0.01 vCPU and receiving under 1,000 bytes per second. Idle is cheaper than active, but it is not free.

The default minimum is 0 replicas, per the scaling reference, and Microsoft states that a revision scaled to zero replicas incurs no resource consumption charges. The waste this rule looks for comes from a minimum raised above zero, often for cold-start reasons, on an app that turned out to get no calls.

Checking replicas and requests on an app

Terminal window
az containerapp show --resource-group my-rg --name my-app \
--query "{min:properties.template.scale.minReplicas, max:properties.template.scale.maxReplicas}"
az monitor metrics list --resource <container-app-resource-id> \
--metric Replicas Requests --offset 30d --interval PT24H --aggregation Average Maximum

Replicas running, requests absent

  1. The Requests series is present and is zero on both average and peak.
  2. The Replicas series is present and its average is above zero. This separates a warm, idle app from one that has correctly scaled to nothing.
  3. The request series covers at least 7 days, so a new app with a warm replica and no traffic yet is not told to delete itself in its first hours.
  4. The app has a known monthly cost above zero.

Apps that are not flagged

An app with zero replicas, or with no replica data at all, is skipped: scaling to zero is the healthy state and the safe assumption. Any request, even one peak, clears the app. Missing request data or less than 7 days of it also means no finding.

Saving is the compute the replicas used

Terminal window
saving = current monthly compute cost of the Container App
cost after fix = 0 (scaled to zero or deleted)

Letting the app scale to zero, or removing it

  1. Check the revision traffic split and ingress settings; a misconfigured ingress can hide real traffic from the app.
  2. If the app should stay available, let it scale to zero: az containerapp update --resource-group my-rg --name my-app --min-replicas 0. Expect the first request after a quiet period to take longer while a replica starts.
  3. If nothing needs it, delete it with az containerapp delete --resource-group my-rg --name my-app --yes.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·