Configure and Troubleshoot Azure Load Balancer
30-second answer
Azure Load Balancer spreads TCP and UDP flows (layer 4) from a frontend IP to a backend pool of VMs or scale set instances. A public load balancer uses a Standard public IP; an internal one uses a private IP in a subnet. A load-balancing rule maps a frontend port to a backend port and uses a health probe (TCP, HTTP or HTTPS) to send new flows only to healthy instances. Use the Standard SKU (Basic was retired on 30 September 2025): it's zone-redundant, needs backends in one VNet, and is secure by default, so an NSG must allow the traffic. Probes come from 168.63.129.16 (the AzureLoadBalancer tag); blocking it marks backends Down.
Simulate it » No Azure account neededExam objective: 4.3.2 Configure an internal or public load balancer. 4.3.3 Troubleshoot load balancing. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Search for <strong>load balancers</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Search for load balancers.
- Type load balancers in the search bar and pick Load balancers under Services.
- Public gives the frontend a public IP. Internal uses a private IP in a subnet, for tiers only the VNet should reach.
- Add a frontend that uses the Standard public IP pip-lb.
- The pool holds VMs from one VNet, by NIC or by IP address.
- A rule maps frontend port 80 to backend port 80 and uses an HTTP probe on /health. Only a 200 counts as healthy.
- Review and Create.
- Customers say pages are slow. Backend pools shows vm-web02 is unhealthy, so it gets no new flows.
- On web02's NIC the effective rules show a Deny-LB rule blocking the probe. Delete it (or never write it).
- After the fix, Insights shows health probe status back at 100%. The Health Probe Status and Data Path Availability metrics are the first place to look next time.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Standard load balancer and health probes
A load balancer spreads TCP/UDP flows from a frontend (public or internal) to a backend pool by load-balancing rules. A health probe pulls a VM out of rotation when it stops answering. Probes come from 168.63.129.16.
🤔 What happens if…
Read this tour as text
- VNets, subnets and a public IP. A virtual network is your private range in one region, split into subnets. Azure keeps 5 addresses in every subnet. A Standard public IP is static, zone-redundant where the region has zones, and closed to inbound traffic until an NSG opens it.
- Peering is not transitive. VNet peering joins two VNets over the Microsoft backbone. Each side has its own link, address spaces can't overlap, and the hub can share its VPN gateway (gateway transit). Peering never chains: spoke 1 and spoke 2 can't talk through the hub on their own.
- User-defined routes to the NVA. A route table on a subnet overrides system routes. Next hop Virtual appliance sends traffic to a firewall or NVA, which needs IP forwarding on its NIC. Longest prefix wins, and a user route beats a system route on the same prefix.
- NSGs, ASGs and effective rules. An NSG has rules checked by priority (100 to 4096, lowest first). Inbound traffic meets the subnet NSG first, then the NIC NSG, and both must allow. An application security group lets a rule say "to the web servers" instead of listing IPs.
- Azure Bastion. Azure Bastion lives in AzureBastionSubnet (/26 or larger) and opens RDP and SSH to VMs on their private IPs, from the portal over TLS 443 or with the native client on Standard and Premium. One Bastion in the hub serves peered spokes.
- Service endpoint vs private endpoint. A service endpoint sends a subnet's traffic to the service's public IP over the backbone, and the service firewall allows that subnet. A private endpoint gives the service a private IP in your VNet, and a privatelink private DNS zone makes the name resolve to it.
- Azure DNS: public and private zones. A public zone answers the internet once you delegate the domain to Azure's name servers. Alias records point at Azure resources such as a public IP. A private zone answers only VNets with a virtual network link, and can auto-register VM names.
- Standard load balancer and health probes. A load balancer spreads TCP/UDP flows from a frontend (public or internal) to a backend pool by load-balancing rules. A health probe pulls a VM out of rotation when it stops answering. Probes come from 168.63.129.16.
- Troubleshoot with Network Watcher. Network Watcher tools answer one question each. IP flow verify: which NSG rule allows or denies this flow? Next hop: where does this packet go? Connection troubleshoot: can A reach B, and if not, at which hop?
Put two web servers behind a Standard public load balancer, give it a friendly name with an Azure DNS alias record, then troubleshoot when one server drops out of rotation because an NSG rule blocks the health probe.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
One web server crashes and a third of customers get errors until someone notices.
😊 THE SOLUTION
Put the servers behind a Standard load balancer with a health probe.
- Dead server keeps getting traffic✓ Health probe takes it out
- Probe blocked by an NSG✓ Allow the AzureLoadBalancer tag
- Database tier exposed✓ Internal frontend
Start with a question
How does a busy café keep the queue moving when one barista goes on break?
The manager points each new customer to a free barista. Every few minutes she glances along the counter, and if someone has stepped away, she stops sending customers to that spot until they’re back.
An Azure Load Balancer is the manager. It hands each new connection to a VM in the backend pool, and a health probe is her glance along the counter. A VM that stops answering gets no new customers until it recovers.
Explain it like I’m 10
The technical explanation
The parts
| Part | What you set |
|---|---|
| Frontend IP | Public (a Standard public IP, zone-redundant) or internal (a private IP in a subnet) |
| Backend pool | VMs or scale set instances by NIC or by IP address, all in one VNet |
| Health probe | Protocol TCP, HTTP or HTTPS, port, path (HTTP/S), interval (default 5 seconds) |
| Load-balancing rule | Frontend IP + port → backend pool + port, probe, session persistence, idle timeout, floating IP, TCP reset |
| Inbound NAT rule | One frontend port → one VM (for example 50001 → VM1:22) |
| Outbound rule | SNAT for outbound internet from the pool (public load balancer) |
Distribution: None (5-tuple hash of source IP, source port, destination IP, destination port, protocol), Client IP (2-tuple) or Client IP and protocol (3-tuple). HA ports (all ports, all protocols) exist on internal Standard load balancers for NVAs.
Standard SKU behaviour
- Secure by default: backends get no inbound traffic unless an NSG on the subnet or NIC allows it.
- Zone-redundant frontends, 99.99% SLA, HTTPS probes, up to 1,000 backend instances.
- Backends must be in one virtual network.
- Basic was retired on 30 September 2025, so new deployments are Standard (or Gateway for chaining NVAs).
Price feel: about $0.025 an hour for the first 5 rules plus a small charge per GB processed (illustrative).
Public vs internal
Public load balancer
- Frontend: Standard public IP
- Clients: anywhere on the internet
- Typical tier: web
- Can provide outbound SNAT
Internal load balancer
- Frontend: private IP in a subnet
- Clients: VNet, peered VNets, on-premises
- Typical tier: app, database, NVA (HA ports)
- No internet exposure
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| One backend never gets traffic | Probe fails on that VM | Probe port/path, app listening, NSG blocking AzureLoadBalancer / 168.63.129.16, guest firewall |
| All backends Down | Probe misconfigured | Wrong port, HTTP path returns 404 or 301 |
| Probes healthy, clients time out | NSG doesn’t allow client traffic | Effective security rules on the backend NIC (Standard is secure by default) |
| Backend VM can’t reach the internal frontend | Flow hashed back to itself | Not supported; call the other tier directly |
| Uneven distribution | Few clients behind one NAT | Expected with hashing; review session persistence |
Use Load balancer → Insights and the metrics Health Probe Status (DipAvailability) and Data Path Availability (VipAvailability), plus Network Watcher on the backend VMs.
Portal and CLI
Portal: Load balancers → + Create: Basics (SKU Standard, Type Public or Internal, Tier Regional) → Frontend IP configuration → Backend pools → Inbound rules (rule + new health probe) → Review + create.
az network public-ip create -g rg-net-lb -n pip-lb --sku Standard --allocation-method Static
az network lb create -g rg-net-lb -n lb-web --sku Standard --public-ip-address pip-lb \
--frontend-ip-name fe-web --backend-pool-name bepool-web
az network lb probe create -g rg-net-lb --lb-name lb-web -n probe-http --protocol Http --port 80 --path /health
az network lb rule create -g rg-net-lb --lb-name lb-web -n rule-http --protocol Tcp \
--frontend-port 80 --backend-port 80 --frontend-ip-name fe-web --backend-pool-name bepool-web --probe-name probe-http
az network nic ip-config address-pool add -g rg-net-lb --nic-name nic-web01 --ip-config-name ipconfig1 \
--lb-name lb-web --address-pool bepool-web
# Internal instead: az network lb create ... --vnet-name vnet-web --subnet snet-app --private-ip-address 10.40.2.10
PowerShell: New-AzLoadBalancerFrontendIpConfig, New-AzLoadBalancerBackendAddressPoolConfig, New-AzLoadBalancerProbeConfig, New-AzLoadBalancerRuleConfig, New-AzLoadBalancer -Sku Standard.
Architect level Floating IP and HA ports
Floating IP (direct server return) keeps the frontend IP as the destination when the packet reaches the VM, which SQL Server Always On listeners need. HA ports on an internal Standard load balancer balance every port and protocol with one rule, which is how you put a pair of firewall NVAs behind one internal frontend and point UDRs at it.
Real-world business scenario
Proseware Learning (fictional)
- The problem
- Exam-day traffic overloaded the single web VM, and when the team added a second VM behind a load balancer, it never received traffic.
- What they used
- A Standard public load balancer with an HTTP probe on /health, two then four web VMs across zones in one backend pool, and an internal load balancer in front of the API tier. Effective security rules showed a hardened NSG denying the AzureLoadBalancer tag on the new VM, which was removed.
- Why that choice
- The probe can now reach every VM, so traffic spreads across all healthy ones and a failed VM drops out on its own.
- The result
- Exam-day traffic was shared across four VMs with no outage, and a VM that crashed mid-morning was taken out of rotation within seconds.
When to use it and when not to
✓ Use it when…
- Spreading TCP or UDP traffic over VMs or scale set instances.
- An internal frontend for app, database or NVA tiers.
- High availability across zones with health probes doing the failover.
✕ Think twice when…
- URL-based routing, TLS termination or WAF. Use Application Gateway.
- Global routing across regions by latency. Use Front Door or Traffic Manager.
- Backends with no NSG allowing the traffic on a Standard load balancer.
↔ Alternatives to consider
- Azure Application Gateway for layer 7 routing and WAF.
- Azure Front Door for global HTTP(S) load balancing and acceleration.
- Cross-region (global tier) Load Balancer for layer 4 across regions.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between a public and an internal load balancer?
Model answer
A public load balancer has a public IP frontend, so internet clients can reach it, typically for a web tier. An internal one has a private IP frontend inside a subnet, so only the VNet, peered VNets and on-premises can reach it, which suits app or database tiers.
Intermediate One backend VM is marked unhealthy, but the app works when you browse to it directly. What do you check?
Model answer
What the probe does. Is the probe port the port the app listens on, and for HTTP, does the path return 200? Then the NSGs on that VM's subnet and NIC: a rule that blocks the AzureLoadBalancer tag, or 168.63.129.16, makes the probe fail even though users could connect. I'd look at the Health Probe Status metric and the effective security rules.
Experienced developer What changed when Basic Load Balancer was retired?
Model answer
Everything is Standard now. Standard is secure by default, so backends need an NSG that allows traffic. It supports availability zones, a 99.99% SLA, HTTPS probes, outbound rules and backends of any VM in one VNet, not just an availability set. And it needs Standard public IPs.
Scenario A VM in the backend pool calls the internal load balancer's frontend IP and the call times out. Why?
Model answer
If the flow gets hashed back to the same VM, it fails, because an internal load balancer doesn't support a backend sending traffic to its own frontend and landing on itself. The usual fix is to have the app call the other tier directly or put the client in a different pool.
Quick revision
Key points
- Layer 4 (TCP/UDP). Frontend, backend pool, health probe, load-balancing rule.
- Public frontend = Standard public IP. Internal frontend = private IP in a subnet.
- Standard only (Basic retired 30 September 2025). Zone-redundant, one VNet per pool, secure by default.
- Probes come from 168.63.129.16. Don't block the AzureLoadBalancer tag.
- Default distribution is a 5-tuple hash. Client IP persistence keeps a client on one VM.
Important terminology
- Frontend IP configuration
- The IP address clients connect to. A Standard public IP for a public load balancer, or a private IP in a subnet for an internal one.
- Backend pool
- The VMs or scale set instances, by NIC or by IP address in one VNet, that receive the traffic.
- Health probe
- A regular TCP, HTTP or HTTPS check of each backend. HTTP and HTTPS need a 200 response to count as healthy.
- Load-balancing rule
- Maps a frontend IP and port to a backend pool and port, with a probe, distribution mode and options such as floating IP.
- Session persistence
- Distribution mode. None (5-tuple hash, default), Client IP (2-tuple) or Client IP and protocol (3-tuple).
- Inbound NAT rule
- Forwards one frontend port to one backend instance, for example port 50001 to VM1 port 22.
Common mistakes
- No NSG on a Standard load balancer's backends, so nothing gets in.
- HTTP probe pointing at a path that returns 404 or a redirect.
- Using Load Balancer when URL routing or a WAF is needed (Application Gateway).
Exam tips
- "Distribute TCP traffic across VMs, keep the database tier private" = internal load balancer.
- "Backend marked unhealthy" = check the probe port/path and NSG rules for AzureLoadBalancer.
- "Same client must reach the same VM" = session persistence Client IP.
Five quick revision questions
-
1.At which OSI layer does Azure Load Balancer work?Show
Layer 4 (TCP and UDP).
-
2.Which IP do health probes come from?Show
168.63.129.16.
-
3.What response does an HTTP probe need?Show
HTTP 200.
-
4.What is the default distribution mode?Show
5-tuple hash (session persistence None).
-
5.Which metric shows probe results?Show
Health Probe Status (DipAvailability).
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Troubleshoot Virtual Network Connectivity
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.