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
Avoid scaling up or downMediumScalabilityYesNo
Create separate App Service plans for production and testHighGovernanceNoNo
Enable Autoscale/Automatic scaling to ensure adequate resources are available to service requestsMediumScalabilityNoNo

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)



Avoid scaling up or down

Impact:  Medium Category:  Scalability

APRL GUID:  07243659-4643-d44c-a1c6-07ac21635072

Description:

Avoid frequent scaling up/down of Azure App Service instances to prevent service disruptions. Choose the right tier and size for the workload and scale out for traffic changes, as scaling adjustments can trigger application restarts.

Potential Benefits:

Minimizes restarts, enhances stability
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 and the number of changes that was made to the pricing tier, if the count is higher that 3 it means you need to avoid scaling up and down that often

resourcechanges
| extend changeTime = todatetime(properties.changeAttributes.timestamp), targetResourceId = tostring(properties.targetResourceId),
changeType = tostring(properties.changeType), correlationId = properties.changeAttributes.correlationId,
changedProperties = properties.changes, changeCount = properties.changeAttributes.changesCount
| where changeTime > ago(14d)
| join kind=inner (resources | project resources_Name = name, resources_Type = type, resources_Subscription= subscriptionId, resources_ResourceGroup= resourceGroup, id) on $left.targetResourceId == $right.id
| where resources_Type contains "microsoft.web/serverfarms"
| where changedProperties['sku.name'].propertyChangeType == 'Update' or changedProperties['sku.tier'].propertyChangeType == 'Update'
| summarize count() by targetResourceId, resources_Name  ,tostring(changedProperties['sku.name'].previousValue), tostring(changedProperties['sku.tier'].newValue)
| project recommendationId="07243659-4643-d44c-a1c6-07ac21635072", name=resources_Name, id=targetResourceId, tags="", param1=['changedProperties_sku.name_previousValue'], param2=['changedProperties_sku.tier_newValue'], param3=count_



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