Azure Proactive Resiliency Library v2
Tools Glossary GitHub GitHub Issues Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

serverFarms

Summary

RecommendationImpactCategoryAutomation AvailableIn Azure Advisor
Migrate App Service to availability Zone SupportHighHigh AvailabilityYesNo
Use Standard or Premium tierHighHigh AvailabilityYesNo
Create separate App Service plans for production and testHighGovernanceNoNo
Enable Autoscale/Automatic scaling to ensure adequate resources are available to service requestsMediumScalabilityNoNo
Set minimum instance count to 2 for app serviceHighScalabilityYesNo

Details


Migrate App Service to availability Zone Support

Impact:  High Category:  High Availability

APRL GUID:  88cb90c2-3b99-814b-9820-821a63f600dd

Description:

Azure's feature of deploying App Service plans across availability zones enhances resiliency and reliability by ensuring operation during datacenter failures, providing redundancy without needing different regions, thus minimizing downtime and maintaining uninterrupted services.

Potential Benefits:

Enhances app resiliency and reliability
Learn More:
Migrate App Service to availability zone support
High availability enterprise deployment using App Service Environment

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// The query filters the qualified App Service Plans that do not have Zone Redundancy enabled.
// Its important to check regions that support availability zones for Azure App Services running on multi-tenant and App Service Environments https://learn.microsoft.com/en-us/azure/reliability/reliability-app-service?tabs=graph%2Ccli#:~:text=The%20following%20regions%20support%20Azure%20App%20Services%20running%20on%20multi%2Dtenant%20environments%3A

resources
| where type =~ 'microsoft.web/serverfarms'
| where location in~ ("australiaeast", "brazilsouth", "canadacentral", "centralindia", "centralus", "eastasia", "eastus", "eastus2", "francecentral", "germanywestcentral", "israelcentral", "italynorth", "japaneast", "japanwest", "koreacentral", "mexicocentral", "newzealandnorth", "northeurope", "norwayeast", "polandcentral", "qatarcentral", "southafricanorth", "southcentralus", "southeastasia", "spaincentral", "swedencentral", "switzerlandnorth", "uaenorth", "uksouth", "westeurope", "westus2", "westus3", "usgovvirginia", "chinanorth3")
| extend zoneRedundant = tobool(properties.zoneRedundant)
| extend sku_tier = tostring(sku.tier)
| where (tolower(sku_tier) contains "isolated" or tolower(sku_tier) contains "premium") and zoneRedundant == false
| project recommendationId="88cb90c2-3b99-814b-9820-821a63f600dd", name, id, tags, param1=sku_tier, param2="Not Zone Redundant"



Use Standard or Premium tier

Impact:  High Category:  High Availability

APRL GUID:  b2113023-a553-2e41-9789-597e2fb54c31

Description:

Choose Standard/Premium Azure App Service Plan for robust apps with advanced scaling, high availability, better performance, and multiple slots, ensuring resilience and continuous operation.

Potential Benefits:

Enhanced scaling and reliability
Learn More:
Resiliency checklist for specific Azure services

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Provides a list of Azure App Service Plans that are not in the "Standard", "Premium", or "IsolatedV2" SKU tiers.

resources
| where type =~ 'microsoft.web/serverfarms'
| extend sku_tier = tostring(sku.tier)
| where tolower(sku_tier) !contains "standard" and
        tolower(sku_tier) !contains "premium" and
        tolower(sku_tier) !contains "isolatedv2"
| project recommendationId="b2113023-a553-2e41-9789-597e2fb54c31", name, id, tags, param1= strcat("SKU=",sku_tier)



Create separate App Service plans for production and test

Impact:  High Category:  Governance

APRL GUID:  dbe3fd66-fb2a-9d46-b162-1791e21da236

Description:

It is strongly recommended to create separate App Service plans for production and test environments to avoid using slots within your production deployment for testing purposes.

Potential Benefits:

Protects prod performance; avoids test impact
Learn More:
Resiliency checklist for specific Azure services

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg



Enable Autoscale/Automatic scaling to ensure adequate resources are available to service requests

Impact:  Medium Category:  Scalability

APRL GUID:  6320abf6-f917-1843-b2ae-4779c35985ae

Description:

Enabling Autoscale/Automatic Scaling for your Azure App Service ensures sufficient resources for incoming requests. Autoscaling is rule-based, whereas Automatic Scaling, a newer feature, automatically adjusts resources based on HTTP traffic.

Potential Benefits:

Optimizes resources for traffic
Learn More:
Automatic scaling in Azure App Service
Auto Scale Web Apps

ARG Query:

Click the Azure Resource Graph tab to view the query

// under-development



Set minimum instance count to 2 for app service

Impact:  High Category:  Scalability

APRL GUID:  855ca19a-6518-4f2e-9e5a-01796fbca9f8

Description:

App Service should be configured with a minimum of two instances for production workloads. If apps have a longer warmup time a minimum of three instances should be used.

Potential Benefits:

Improves app performance
Learn More:
Ultimate guide to running healthy apps in the cloud

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Provides a list of App services that do not have minimum instance count of 2

resources
| where type == "microsoft.web/serverfarms"
| where sku.capacity < 2
| project recommendationId = "855ca19a-6518-4f2e-9e5a-01796fbca9f8", name, id, tags, param1 = "Instance count is less than 2"