Azure App Service Cost Optimization: How to Stop Paying for Unused Plans
Azure App Service makes it easy to host web apps and APIs, but it also makes it easy to forget about them. Many teams find they are paying for empty plans, oversized tiers and test environments nobody uses. The cause is simple: you are billed for the App Service Plan, not for the individual apps inside it. This guide shows how to find and fix that waste.
How App Service Billing Works
An App Service Plan is the computer behind your apps. It defines the region, instance size, number of instances and pricing tier. Key points:
- The plan bills for as long as it exists, whether it hosts one app, ten apps or none.
- Stopping an app does not stop the charge. The plan keeps running and billing.
- Multiple apps can share one plan, so you pay once for the computer.
This is why unused plans are such a common source of hidden spend.
Step 1: Find Empty and Idle Plans
Start by listing plans with no apps. Use Azure Resource Graph Explorer and run:
resources| where type =~ 'microsoft.web/serverfarms'| where properties.numberOfSites == 0| project name, resourceGroup, subscriptionId, sku.name
This returns plans hosting zero apps. Check with the owner, then delete them. Next, look at plans with apps that are stopped or barely used. Review CPU and memory metrics in Azure Monitor, and check traffic for the past 30 days.
Step 2: Consolidate Apps Into Fewer Plans
If you have several small apps, each on its own plan, you are likely overpaying. Apps in the same region can share a plan, as long as they have compatible requirements.
- Group low-traffic apps together.
- Keep critical or heavy apps on separate plans so one cannot starve another.
- Watch total CPU and memory after consolidating.
This is often the fastest saving in any azure cost optimization effort for web workloads.
Step 3: Rightsize the Pricing Tier
Many plans are bigger than they need to be. Compare your real usage against the tier.
- Dev and test: Use lower tiers such as Free, Basic or Standard where features allow. Free and Shared tiers have limits and are not meant for production.
- Production: Match the instance size to actual CPU and memory use, with a safety margin.
- Premium tiers: Keep these only where you need the features, such as stronger performance, more scale or advanced networking.
Check the features you use before scaling down. Some, like deployment slots and autoscale, require specific tiers.
Step 4: Use Autoscale Instead of Fixed Capacity
Running extra instances all day for a peak that lasts an hour is wasteful. On supported tiers, set autoscale rules to add instances when CPU or request load rises and remove them when it falls. Set a sensible minimum and a maximum limit so costs stay predictable.
Step 5: Control Dev, Test and Slots
Non-production environments often run 24/7. Reduce that waste:
- Use a smaller tier for dev and test, instead of copying production.
- Delete or scale down temporary environments after projects finish.
- Review deployment slots, since they run on the same plan and use its resources.
- Automate cleanup with scripts or scheduled runbooks where possible.
Step 6: Use Commitments for Steady Workloads
For production plans that run continuously, look at Azure Reservations or Savings Plans for eligible App Service tiers. These can lower the effective price in exchange for a one- or three-year commitment. Commit only to the baseline you are sure you will use, and check eligibility in Microsoft’s documentation.
Step 7: Add Tags, Alerts and Reviews
Prevention is cheaper than cleanup.
- Tag every plan with team, project, environment and owner.
- Create budgets and alerts in Azure Cost Management.
- Review Azure Advisor recommendations monthly.
- Add a recurring check for empty plans to your routine.
Quick Checklist
- Delete plans with zero apps
- Consolidate small apps into shared plans
- Rightsize tiers using real metrics
- Enable autoscale where it fits
- Shrink or remove dev and test plans
- Review reservations for steady workloads
- Tag plans and set budget alerts
Final Thoughts
App Service waste is easy to miss because the plan, not the app, drives the bill. Find empty plans, consolidate, rightsize and automate scaling, and you can cut costs without affecting users. Make these checks part of your regular azure cost optimization routine, and unused plans will stop quietly draining your budget.