Skip to main content

๐Ÿ›ก๏ธ Azure App Service Plan is underutilized๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ App Service Plan is underutilized๐ŸŸข
  • ID: /ce/ca/azure/app-service/plan-underutilized
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: COST

Statsโ€‹

not available

Logicโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies paid Azure App Service Plans that may be oversized for the applications they host. A plan is underutilized when its 30-day average CPU usage is below 20% and its average memory usage is below 40%.

Rationaleโ€‹

App Service Plan charges are driven by the selected SKU and worker capacity, whether or not that capacity is used. Rightsizing consistently underutilized plans can reduce costs without changing application code.

Impactโ€‹

Changing a plan SKU or worker count affects every app and deployment slot hosted by the plan. Review peak and seasonal demand, autoscale settings, application dependencies, and the rollback plan before making a change.

Auditโ€‹

This policy evaluates an Azure App Service Plan based on its 30-day performance metrics.

The App Service Plan is marked as INCOMPLIANT if:

  • Monitor: CPU, 30-Day < 20%.

    and Monitor: Memory, 30-Day < 40%.

The App Service Plan is marked as INAPPLICABLE if it is in a Free, Shared, Dynamic, WorkflowStandard, or FlexConsumption tier, or if Number Of Sites is 0.

... see more

Remediationโ€‹

Open File

Remediationโ€‹

Review peak and seasonal demand, autoscale settings, deployment slots, dependencies, and rollback options before changing the plan. A plan is shared by its hosted apps, so validate the proposed capacity with each application owner. Do not delete a non-empty plan.

Resize the planโ€‹

Choose a lower SKU or reduce the worker count only after confirming that the new capacity supports peak demand.

Azure CLIโ€‹
az appservice plan update \
--name {{app-service-plan-name}} \
--resource-group {{resource-group-name}} \
--sku {{target-sku}} \
--number-of-workers {{target-worker-count}}
PowerShellโ€‹
Set-AzAppServicePlan `
-Name "{{app-service-plan-name}}" `
-ResourceGroupName "{{resource-group-name}}" `
-Tier "{{target-tier}}" `
-WorkerSize "{{target-worker-size}}" `
-NumberofWorkers {{target-worker-count}}

Monitor application availability and response times after the change. Restore the previous SKU or worker count if capacity is insufficient.

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Resource Right-Sizing20no data