Selecting Standard SKU Load Balancer enhances reliability through availability zones and zone resiliency, ensuring deployments withstand zone and region failures. Unlike Basic, it supports global load balancing and offers an SLA.
Ensure the Backend Pool contains at least two instances
Impact:HighCategory:High Availability
APRL GUID:6d82d042-6d61-ad49-86f0-6a5455398081
Description:
Deploying Azure Load Balancers with at least two instances in the backend prevents a single point of failure and supports scalability. Pairing with Virtual Machine Scale Sets is advised for optimal scale building.
Use NAT Gateway instead of Outbound Rules for Production Workloads
Impact:MediumCategory:High Availability
APRL GUID:8d319a05-677b-944f-b9b4-ca0fb42e883c
Description:
Outbound rules for Standard Public Load Balancer involve manual port allocation for backend pools, limiting scalability and risk of SNAT port exhaustion. NAT Gateway is recommended for its dynamic scaling and secure internet connectivity.
In regions with Availability Zones, assigning a zone-redundant frontend IP to a Standard Load Balancer ensures continuous traffic distribution even if one availability zone fails, provided other healthy zones and backend instances are available to receive the traffic.
Click the Azure Resource Graph tab to view the query
//AzureResourceGraphQuery//FindallLoadBalancerswithwithregionalorzonalpublicIPAddressesresources|wheretype=="microsoft.network/loadbalancers"|wherelocationin~("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")|wheretolower(sku.name)!='basic'|mv-expandfeIPconfigs=properties.frontendIPConfigurations|extendfeConfigName=(feIPconfigs.name),PrivateSubnetId=toupper(feIPconfigs.properties.subnet.id),PrivateIPZones=feIPconfigs.zones,PIPid=toupper(feIPconfigs.properties.publicIPAddress.id),JoinID=toupper(id)|whereisnotempty(PrivateSubnetId)|whereisnull(PrivateIPZones)orarray_length(PrivateIPZones)<2|projectname,feConfigName,id|union(resources|wheretype=="microsoft.network/loadbalancers"|wherelocationin~("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")|wheretolower(sku.name)!='basic'|mv-expandfeIPconfigs=properties.frontendIPConfigurations|extendfeConfigName=(feIPconfigs.name),PIPid=toupper(feIPconfigs.properties.publicIPAddress.id),JoinID=toupper(id)|whereisnotempty(PIPid)|joinkind=innerunique(resources|wheretype=="microsoft.network/publicipaddresses"|wherelocationin~("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")|whereisnull(zones)orarray_length(zones)<2|extendLBid=toupper(substring(properties.ipConfiguration.id,0,indexof(properties.ipConfiguration.id,'/frontendIPConfigurations'))),InnerID=toupper(id))on$left.PIPid==$right.InnerID)|projectrecommendationId="621dbc78-3745-4d32-8eac-9e65b27b7512",name,id,tags,param1="Zones: No Zone or Zonal",param2=strcat("Frontend IP Configuration:"," ",feConfigName)
Use Health Probes to detect backend instances availability
Impact:HighCategory:Monitoring and Alerting
APRL GUID:e5f5fcea-f925-4578-8599-9a391e888a60
Description:
Health probes are used by Azure Load Balancers to determine the status of backend endpoints. Using custom health probes that are aligned with vendor recommendations enhances understanding of backend availability and facilitates monitoring of backend services for any impact.
Click the Azure Resource Graph tab to view the query
//AzureResourceGraphQuery//Listtheloadbalancerswhichdon't have health probe configured
resources
| where type =~ "microsoft.network/loadbalancers"
| where array_length(properties.probes) == 0
| project recommendationId="e5f5fcea-f925-4578-8599-9a391e888a60", name, id, tags, param1="customHealthProbeUsed: false"