This tutorial walks you through the steps to verify that your Azure Load Balancer is correctly distributing traffic, handling health probes, and responding to failover scenarios.
# Azure CLI
az network lb probe show \
--resource-group MyResourceGroup \
--lb-name MyLoadBalancer \
--name MyHealthProbe
Next: Test Distribution
# Test Load Balancer distribution
$lbIP = "20.30.40.50"
$iterations = 20
for ($i=1; $i -le $iterations; $i++) {
$response = Invoke-WebRequest -Uri "http://$lbIP/api/instance" -UseBasicParsing
Write-Host "$i: $($response.Content)"
Start-Sleep -Milliseconds 300
}
This script repeatedly calls an endpoint on each backend VM. Ensure the endpoint returns the VM name or ID.