Skip to main content

Optimize Azure App Service Plans

Azure App Service Plans are the foundation of the Azure App Service ecosystem, acting as a container that host your App Services (websites) and WebJobs. These plans provide the underlying compute resources that power your applications. Configuring them correctly is crucial to ensure your applications are cost-effective, performant, and secure. Whether you're running web apps, APIs, mobile backends, or background jobs, selecting and managing the right App Service Plan can significantly impact your application's scalability, reliability, and overall performance.

Below are actionable recommendations for your Azure App Service Plan.

Optimize Your Azure Environment with Us!
Looking to enhance your Azure setup for cost efficiency, performance, reliability, or security?
Talk to an Azure expert! Email us or schedule a 30-minute consultation and let's optimize your Azure environment together!
Stay ahead with actionable insights for Azure optimization. Subscribe to updates and unlock the full potential of Azure!

Cost Optimization Recommendations

Premium V2 vs Premium V3 SKUs

Impact: High

If you're running Azure App Service Premium V2 plans, you can save a considerable amount of cost by upgrading to Premium V3. Premium V3 is not only more cost-effective but also provides access to newer, faster CPUs and more memory.

Upgrade your App Service Plan from Premium V2 to Premium V3 to benefit from:

  • Better performance: Enhanced hardware specifications.
  • Higher resource capacity: More memory and faster CPUs.
  • Lower costs: Premium V3 is cheaper than Premium V2 for equivalent SKUs.
  • Additional savings: Leverage Reserved Instances and Savings Plans for compute.

SKU Pricing Comparison (Australia East Region)

SKUPlanSpecificationsOSPrice (USD)Cost Savings
Premium V2 (P1V2)Pay as you go1 Core, 3.5GB RAMWindows$183.96N/A
Premium V3 (P0V3)Pay as you go1 Core, 4GB RAMWindows$125.56~32%

Note: Prices vary based on Azure region. Review the Azure pricing calculator for up-to-date cost estimations.

Linux Instances for .NET Core / .NET 6+

Impact: High

If you're hosting applications on .NET 6+ and using a Windows App Service Plan, consider migrating to a Linux App Service Plan. Running your applications on Linux can result in substantial cost savings without sacrificing performance.

Windows vs Linux Pricing Comparison (Australia East Region)

SKUPlanOSPrice (USD)Cost Savings
Premium V3 (P0V3)Pay as you goWindows$125.56N/A
Premium V3 (P0V3)Pay as you goLinux$67.16~47%

Note: Prices vary based on Azure region. Review the Azure pricing calculator for up-to-date cost estimations.

If your applicaton is using .NET 4.7, consider migrating to .NET Core / .NET 6+. Not only does this enable you to leverage a newer and faster framework, but it also opens up opportunities to move to alternative compute services such as Azure Container Apps or Azure Kubernetes Service (AKS). This migration could provide better scalability, flexibility, and performance for your applications.

Premium V3 Reserved Instances

Impact: High

You can save significantly, up to 55% on Azure App Service Premium V3 plans by purchasing Reserved Instances for 1 or 3 years. Reserved Instances provide substantial cost savings over Pay-as-you-go pricing. This option allows you to commit to a 1-year or 3-year term in exchange for a lower, upfront price.

Reserved Pricing Comparison (Australia East Region)

SKUPlanOSPrice (USD)Cost Savings
Premium V3 (P0V3)Pay as you goWindows$125.56N/A
Premium V3 (P0V3)Reserved for 1 yearWindows$93.50~26% savings
Premium V3 (P0V3)Reserved for 3 yearsWindows$75.22~40% savings
Premium V3 (P0V3)Pay as you goLinux$67.16N/A
Premium V3 (P0V3)Reserved for 1 yearLinux$43.84~35% savings
Premium V3 (P0V3)Reserved for 3 yearsLinux$30.30~55% savings

Note: Prices vary based on Azure region. Review the Azure pricing calculator for up-to-date cost estimations.

Orphaned App Service Plans (Paid SKUs)

Impact: High

Orphaned App Service Plans on paid plans such as Premium or Standard SKUs incur ongoing costs even when they are not hosting any websites or services. These plans should be identified and deleted to eliminate unnecessary expenses and optimize your Azure environment.

  • Audit all App Service Plans regularly to identify unused or orphaned plans.
  • Ensure that no dependencies, such as webjobs or linked resources, are active before deletion.

By removing unused App Service Plans, you can achieve significant cost savings and maintain a cleaner, more efficient cloud environment.

Stopped App Service Plans (Paid SKUs)

Impact: High

Stopped App Service Plans on paid SKUs continue to incur costs even when no websites are running. Deleting these plans can help reduce unnecessary expenses in your Azure environment.

  • Review stopped App Service Plans on Premium, Standard or Basic SKUs to identify those no longer in use.
  • Verify that there are no active webjobs or dependencies before proceeding with deletion.
  • Delete unused plans promptly to optimize costs and streamline resource management.

By removing stopped paid App Service Plans, you can achieve significant cost savings while maintaining an efficient and organized cloud environment.

Performance Recommendations

Autoscaling App Service Plans

Impact: High

Autoscaling is a critical feature that helps maintain application performance during high-demand periods and reduces costs during low-demand periods. By enabling autoscaling for your App Service Plan, you can dynamically adjust resources based on demand, ensuring both cost efficiency and optimal performance.

Enable autoscaling with both scale-out and scale-in rules tailored to your application's workload. Use appropriate metrics to trigger scaling and fine-tune thresholds to ensure smooth and reliable operation.

  • Scale-out rules will automatically increase the App Service Plan instances when demand spikes.
  • Scale-in rules will decrease App Service Plan instances during low-demand periods, avoiding unnecessary costs.

Benefits of scaling rules:

  • Maintains application performance during traffic spikes.
  • Optimizes resource usage and reduces costs during off-peak hours.
  • Enhances operational efficiency by automating resource management.

While autoscaling can greatly enhance performance and cost efficiency, it is essential to configure it with appropriate metrics and conditions to ensure stable and reliable scaling behavior. Misconfigured rules may lead to oscillations, unnecessary instance churn, or reactive scaling issues.

Key Recommendations for Stable Autoscaling:

  1. Avoid Scaling Oscillations

    • Small threshold gaps between scale-in and scale-out rules can cause scaling oscillations.
    • Increase the threshold gap for metrics to promote stable scaling behavior and reduce instance churn.
  2. Set Appropriate Cooldown Periods

    • Cooldown periods prevent frequent scaling adjustments.
    • Ensure the cooldown period for the metric is at least 5 minutes to prevent rapid scaling oscillations.
  3. Configure Time Windows Appropriately

    • Time windows define the evaluation period for scaling rules.
    • Increase the time window for the metric to at least 5 minutes to avoid reactive scaling that may not reflect sustained demand.
  4. Fine-Tune Scale Action Increments

    • Large instance count changes during scaling can destabilize applications.
    • For each metric, consider smaller increments of instance changes for smoother scaling behavior.
  5. Balance Scale-Out and Scale-In Rules

    • Unbalanced scaling rules can lead to inconsistent behavior.
    • Ensure a balanced number of scale-out and scale-in rules for better scaling reliability.
  6. Control Maximum Instance Count

    • A high maximum instance count may lead to unnecessary costs if unused.
    • Review the current maximum instance count and reduce it unless consistently required for peak demand.

Benefits of Fine-Tuning Autoscaling:

  • Improved stability in scaling operations.
  • Optimized costs through precise scaling.
  • Enhanced reliability of application performance during traffic fluctuations.

Review and adjust the metrics, thresholds, cooldown periods, and other parameters in your autoscaling rules to ensure they align with your application's workload and usage patterns. A well-configured autoscaling setup will enhance performance and reduce costs without introducing instability.

Reliability Recommendations

Zone Redundancy

Impact: Medium

If your Azure region supports availability zones and you have a minimum of three App Service Plan instances running continuously, consider enabling Zone Redundancy.

This feature, available at no additional cost, distributes your instances across multiple availability zones (data centers) within the region. By doing so, it mitigates the risk of downtime caused by a failure in a single zone. Traffic will seamlessly route to healthy instances, ensuring enhanced reliability and availability for your applications.

Redeploying your App Service Plan with zone redundancy provides an additional layer of resilience without requiring changes to your application architecture.

Operational Excellence Recommendations

Orphaned App Service Plans (Free SKUs)

Impact: Low

Orphaned App Service Plans on free or dynamic SKUs may not not incur direct costs but can contribute to clutter and operational inefficiencies in your Azure environment. Cleaning up unused or orphaned plans promotes Operational Excellence and helps maintain an organized cloud environment.

  • Regularly review Free App Service Plans to identify those that are no longer in use.
  • Verify that no active webjobs or dependencies exist before deletion.

By tidying up unused App Service Plans, you can reduce management overhead and improve the clarity of your cloud resources, ensuring a more streamlined and efficient environment.

Stopped App Service Plans (Free SKUs)

Impact: Low

Stopped App Service Plans on free or dynamic SKUs do not incur costs but can clutter your Azure environment. Addressing these plans is a tidy-up exercise to improve operational excellence.

  • Review stopped free App Service Plans to identify those no longer in use.
  • Verify that there are no active webjobs or dependencies before proceeding with deletion.
  • Delete unused plans to reduce clutter and streamline your Azure resource management.

By removing stopped Free App Service Plans, you enhance the clarity and organization of your Azure environment, promoting better operational practices.