Home › Studies › AZ-104 › Virtual Networking › Load Balancer

Load Balancer

Public and internal · backend pools · probes · rules · outbound and SNAT · troubleshooting

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Components and types

SKUs

Distribution modes

Portal session persistenceHashREST name
None (default)5-tupleDefault
Client IP2-tuple (source IP, destination IP)SourceIP
Client IP and protocol3-tupleSourceIPProtocol

Switching modes causes no downtime. Backend pool membership changes recompute the distribution.

Health probes

Outbound rules and SNAT basics

Floating IP

Troubleshooting

SymptomCheck
No inbound connectivity to a Standard public load balancerAdd an NSG (subnet or NIC) allowing the port, then check probe state, the rule, the backend listener and the guest firewall
Health probe shows downBackend VM unhealthy; VM not listening on the probe port (netstat -an should show LISTENING); a firewall or NSG blocking the probe port, including a Deny All rule with higher priority than the default rule that allows load balancer probes; a UDR sending probe packets elsewhere. Try another probe type (HTTP to TCP)
Tracing a probe problemTest with PsPing or TCPing from another VM. No incoming packets on the backend points to NSG or UDR. No outgoing packets points to the VM or application
Non-HTTP serviceUse a TCP probe on a port that represents service health (for example AD DS LDAP 389)
No outbound from a Standard internal load balancerStandard internal load balancers don't provide default outbound access: add a NAT gateway, public IPs or an outbound-rule load balancer

To simulate a probe failure, use an NSG rule that blocks the probe port. Blocking the probe IP and port in an NSG is otherwise unsupported.

CLI and PowerShell

TaskCommand
Create a Standard public load balanceraz network lb create -g rg -n load-balancer --sku Standard --public-ip-address lb-frontend-ip --frontend-ip-name lb-frontend --backend-pool-name lb-backend-pool
Create an internal load balanceraz network lb create -g rg -n load-balancer --sku Standard --vnet-name lb-vnet --subnet backend-subnet --backend-pool-name lb-backend-pool --frontend-ip-name lb-frontend (no public IP, so the frontend takes a private IP from the subnet)
Health probeaz network lb probe create -g rg --lb-name load-balancer -n lb-health-probe --protocol tcp --port 80
Load-balancing ruleaz network lb rule create -g rg --lb-name load-balancer -n lb-HTTP-rule --protocol tcp --frontend-port 80 --backend-port 80 --frontend-ip-name lb-frontend --backend-pool-name lb-backend-pool --probe-name lb-health-probe --disable-outbound-snat true --idle-timeout 15 --enable-tcp-reset true
Add a NIC to the backend poolaz network nic ip-config address-pool add --address-pool lb-backend-pool --ip-config-name ipconfig1 --nic-name lb-VM1-nic -g rg --lb-name load-balancer
NSG allow ruleaz network nsg rule create -g rg --nsg-name lb-nsg -n lb-nsg-rule --protocol '*' --direction inbound --destination-port-range 80 --access allow --priority 200
NAT gateway on the subnetaz network vnet subnet update --nat-gateway lb-nat-gateway (after az network nat gateway create)
PowerShell building blocksNew-AzLoadBalancerFrontendIpConfig, New-AzLoadBalancerBackendAddressPoolConfig, New-AzLoadBalancerProbeConfig, New-AzLoadBalancerRuleConfig (-EnableFloatingIP, -LoadDistribution SourceIP, -DisableOutboundSNAT), then New-AzLoadBalancer -Sku Standard

Limits

ItemValue
Standard backend pool size5,000
Standard frontend IP configurations600
Standard rules (load-balancing plus inbound NAT) per resource1,500
Standard outbound rules per load balancer600
Standard SLA99.99%

Exam Tips

Tick each tip once you can answer it without looking.

“Standard public load balancer; internet requests to the VMs time out; no NSG exists” → Standard is closed by default: add an NSG that allows the port. Trap: adding an inbound NAT rule.

“Backend instance marked unhealthy while the app works locally” → Allow AzureLoadBalancer (168.63.129.16) in NSGs and the guest firewall, and confirm the probe port is listening. Trap: giving the VM a public IP.

“HTTP probe gets 301, 403 or 500” → Treated as down: the probe needs HTTP 200. Trap: any response counting as healthy.

“Need an HTTPS health probe” → Standard SKU. Trap: Basic does not support HTTPS probes.

“Standard load balancer with a Basic public IP” → Not supported: both must be Standard. Trap: it being allowed in the same region.

“Same client IP must reach the same VM, based on source and destination IP” → Session persistence Client IP (2-tuple). Trap: the default, None, which hashes the 5-tuple.

“Default distribution mode” → 5-tuple hash (session persistence None). Trap: source IP affinity.

“Change the distribution mode” → No downtime. Trap: recreating the rule.

“RDP to each backend VM separately through one public IP” → Inbound NAT rules. Trap: a load-balancing rule on 3389.

“Load balance every port to NVA firewalls behind an internal load balancer” → HA ports rule (protocol All, port 0) on an internal Standard load balancer. Trap: one rule per port, or a public load balancer.

“A backend VM calls its own internal load balancer frontend and it fails” → A backend VM can't connect to the frontend of the same internal load balancer: test from another client. Trap: adding an NSG rule.

“Backend VMs behind a Standard load balancer need internet access” → Add a NAT gateway, instance public IPs or outbound rules; there is no default outbound once in the pool. Trap: assuming nothing is needed.

“Backend VMs behind a Standard internal load balancer cannot reach the internet” → Add a NAT gateway (recommended), a public IP per NIC, or outbound rules on a Standard public load balancer. Trap: an inbound NAT rule or opening outbound in the NSG.

“Outbound connections fail intermittently with many VMs behind one frontend IP” → SNAT port exhaustion: use a NAT gateway, add frontend IPs, allocate ports manually and reuse connections. Trap: a larger VM size.

“SNAT ports per frontend IP, and per instance with manual allocation” → 64,000 per frontend IP; ports per instance = frontend IPs × 64K ÷ backend instances. Trap: relying on default allocation in production.

“Two rules must use the same backend port (SQL Always On listener)” → Enable Floating IP and configure the guest OS loopback with the frontend IP. Trap: Client IP session persistence.

“All probes down on a Standard load balancer” → No new connections; established TCP flows continue. Trap: all flows being reset.

“Move a Standard load balancer to another subscription” → Not supported (a resource group move is). Trap: the move working for any subscription.

“Private endpoint as a backend pool member” → Not supported. Trap: the IP-based pool accepting it.

“Probe interval for a probe created with the CLI” → 15 seconds (the portal default is 5). Trap: assuming 5 in every tool.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Azure DNSNetwork Troubleshooting →