Azure Container Apps allow serverless container scaling to zero, saving costs when idle. However, some apps must stay responsive, incurring “idle” charges at reduced rates. Learn how to optimize idle usage, eligibility criteria, and strategies to minimize costs while maintaining performance. Unique :

Understanding Idle Usage in Azure Container Apps: What You Need to Know
Azure Container Apps offers a powerful serverless platform to run containers effortlessly at scale. One standout feature is the ability to scale workloads down to zero when idle. This means you only pay when your app is actively handling traffic or doing work. But what happens when scaling to zero isn’t an option? Microsoft’s new “idle usage” pricing model has you covered.
What’s New: Idle Usage Pricing Explained
Idle usage pricing applies specifically to containers on Azure’s consumption plan. Instead of paying full CPU costs when your app is idle, you pay a reduced rate. For example, CPU costs drop from $0.000024 to $0.000003 per vCPU per second, while memory costs stay the same. This pricing helps reduce bills when your app isn’t processing requests but can’t scale down to zero.
“Scaling to zero ensures you only pay when your workloads are actively receiving traffic or performing work.”
Major Updates: Eligibility and Monitoring
Not all containers qualify for idle pricing. To be eligible, your app must:
- Run on the consumption plan (no dedicated plans)
- Have no GPUs allocated
- Be scaled to your minimum replica count (can be more than one)
- Have all containers running without failures
- Meet resource usage thresholds: under 0.01 vCPU, no HTTP requests, and less than 1000 bytes/s inbound traffic
Monitoring idle usage isn’t straightforward. You need to track metrics like replica count, CPU usage, network traffic, and HTTP requests through Azure Monitor. Setting a 1-minute granularity helps avoid misleading averages.
Common Pitfalls: Health Probes and External Services
Health probes from outside your container environment count as inbound traffic, potentially preventing idle billing. For example, Azure Front Door’s frequent health checks can keep your app “active.” To reduce this, consider:
- Lowering probe frequency
- Aggregating health checks via Azure API Manager
- Using ARM health APIs instead of direct app queries
External services like monitoring, messaging, or background tasks may also cause inbound traffic. Avoid polling queues and throttle background jobs to stay within idle limits.
“Health checks from outside the container environment will cause your container to no longer be ‘idle.’”
Tips to Stay Within Idle CPU Limits
CPU usage during idle must stay below 0.01 vCPU cores. Background threads, inefficient code, or polling can easily breach this. To optimize:
- Use async programming patterns to avoid busy loops
- Switch to event-driven triggers like KEDA instead of polling
- Tune garbage collection and diagnostics frequency
- Audit containers to remove unnecessary services
Final Thoughts
Azure Container Apps’ idle usage pricing is a smart way to cut costs when your app can’t fully scale to zero. By understanding eligibility and monitoring key metrics, you can optimize your workloads and save money. Just watch out for health probes and background activity that might keep your container “active.”
In short, “where it is possible to scale your application to zero, it is recommended that this is where you focus your effort.” But when zero scaling isn’t feasible, idle pricing is your next best friend.
From the New blog articles in Microsoft Community Hub