# Idle Azure Container App

> Scale-to-zero makes an idle Container App nearly free, so ZopNight only flags apps that are provably holding replicas: Requests must average and peak at 0 over 30 days with 7+ days of history, while the Replicas series shows an average above 0. Absent replica telemetry means abstain, not fire.

Source: https://zop.dev/integrations/azure/recommendations/idle-azure-container-app
Updated: 2026-08-19

---

## The scale-to-zero distinction that decides everything

Two Container Apps with zero requests can have opposite cost profiles. One has min-replicas 0
and scaled itself to nothing, so it costs almost nothing and needs no attention. The other keeps
a warm replica (min-replicas 1 or a stuck revision) burning vCPU-seconds and memory around the
clock for traffic that never arrives. Request metrics cannot tell them apart, so ZopNight
demands the second signal: the `Replicas` series must show an average above 0 before an app
with zero requests is treated as waste. Missing replica telemetry defaults to the innocent
explanation, and the rule abstains.

## Requests judged on average and peak

The `Requests` series must read 0 on both the average and the maximum across the analysis
window. A single request-hour anywhere in the full harvested series disqualifies the app,
because a delete-path recommendation must never target something that served traffic recently.
The request series also needs at least 7 days of coverage, so a freshly deployed app with a
warm replica and no users yet is not condemned prematurely.

## See both signals side by side

```bash
az monitor metrics list \
  --resource "$(az containerapp show -n <app> -g <rg> --query id -o tsv)" \
  --metric Requests Replicas \
  --interval PT1H --offset 30d --aggregation Average Maximum
```

Zero requests next to a persistent replica count of 1 or more reproduces the finding.

## The one-line fix that usually beats deletion

Setting min-replicas to 0 keeps the app deployable and its ingress, secrets, and revisions
intact while ending the idle compute charge. Cold-start latency is the only price. Deletion is
for apps nobody will ever call again:

```bash
az containerapp update -n <app> -g <rg> --min-replicas 0
```

## Held findings

Requests present anywhere in the window, replica average at 0, replica series absent, shallow
request history, or an unpriced cost. Each of those keeps the rule quiet. The savings figure, when
emitted, is the app's observed monthly compute charge.

## Roles in play

Reader discovers the app and its revisions; Monitoring Reader supplies both series. ZopNight's
write role can start and stop Container Apps for scheduling, but this finding recommends a
configuration change or a human-reviewed delete.
