Networking · Lesson 20 of 24

Load balancing and troubleshooting

One address in front of several servers, which product does that at which layer, and the order you check when it breaks.

About 10 min · Interactive · 3 practice questions

Exam objective
Configure an internal or public load balancer · Troubleshoot load balancing · (Monitoring domain) Use Azure Network Watcher and Connection monitorImplement and manage virtual networking · 15–20% of the exam · typical question: "Which product for layer-7 / global", unhealthy probe diagnosis, NAT rule vs LB rule, which Network Watcher tool
In one sentence. A load balancer is one front door with several rooms behind it. Visitors knock on the door; the balancer sends each to a room that is answering. It keeps asking each room "are you alive?" (the health probe) and stops sending people to rooms that go quiet. Azure has four such products; the exam wants you to pick by layer (does it understand web URLs or just ports?) and reach (one region or the world?).
ProductUnderstandsReachPick when
Azure Load BalancerTCP/UDP ports (layer 4)One regionSpread traffic across VMs; public front or internal
Application GatewayHTTP/HTTPS (layer 7)One regionRoute by URL path or host name, terminate SSL, cookie stickiness, web application firewall
Traffic ManagerDNS answersGlobalSend each user to the nearest or healthiest region
Azure Front DoorHTTP (layer 7)GlobalWorldwide web acceleration, caching, WAF at the edge
Clientany IPLoad balancerFront-end IP 20.5.5.5Rule: TCP 80 → 80Probe: HTTP /healthNAT: 50001 → VM1:3389VM1 · healthyVM2 · healthyVM3 · probe FAILBack-end pooltaken out of rotationProbe comes from 168.63.129.16 (service tag AzureLoadBalancer). Block it with an NSG and every VM looks dead.

You, the admin: put web1 and web2 behind one address

  1. Load balancers › + Create: SKU Standard, type Public, new Standard public IP as the front-end.
  2. Backend pools tab: add web1 and web2 NICs (same VNet).
  3. Inbound rules tab: add a health probe HTTP, port 80, path /health, every 5 s. Add a load balancing rule front port 80 → back port 80, TCP, that probe, session persistence None.
  4. Optional inbound NAT rule: front port 50001 → web1 port 3389 so you can RDP to one specific server through the LB.
  5. Because Standard is closed by default, the NSG on the Web subnet must allow 80 from Internet and allow the probe (service tag AzureLoadBalancer) or the pool shows unhealthy.
  • Public LB has a public front IP; internal LB has a private IP from a subnet and sits between tiers.
  • Session persistence: None (round robin), Client IP, Client IP and protocol. Floating IP is for SQL Always On listeners; HA ports (all ports in one rule) is for firewalls behind an internal LB.
  • SKUs: Basic is retiring, has no SLA and no zones. Standard is zone-redundant, 99.99%, and requires Standard public IPs everywhere.

When traffic does not arrive, check in this order

  1. Probe: is the service really listening on the probe port and path? A local Windows firewall blocking 80 fails the probe.
  2. NSG: is the probe source (AzureLoadBalancer tag, 168.63.129.16) and the client port allowed on both subnet and NIC NSGs?
  3. Pool: are the VMs in the same VNet as the LB?
  4. SKU: Standard LB with a Basic public IP, or vice versa, is refused.

Network Watcher: the diagnostic kit

QuestionTool (Network Watcher › …)
Would a packet from X to Y:443 be allowed, and by which NSG rule?IP flow verify
Where does a packet to 10.20.0.4 go next, via which route?Next hop
Can VM A reach VM B port 1433 right now, where does it fail?Connection troubleshoot
Keep testing reachability and latency and alert meConnection monitor
Which rules actually apply to this NICEffective security rules
Who talked to whom through this NSG last weekNSG / VNet flow logs + Traffic Analytics
Capture packets from a VMPacket capture (needs the Network Watcher agent extension)
Draw me the networkTopology
Trap wording. "URL-path routing / SSL offload" = Application Gateway. "Users to the nearest region by DNS" = Traffic Manager. "RDP to one VM through the LB" = inbound NAT rule. "Standard LB, all VMs unhealthy, service is up" = NSG blocking the probe.

Key points

  • Pick by layer and reach: Load Balancer (ports, regional), Application Gateway (URLs, regional), Traffic Manager (DNS, global), Front Door (web, global).
  • Standard load balancer is closed by default: the NSG must allow the client port and the probe (AzureLoadBalancer tag).
  • Health probe decides who gets traffic; inbound NAT rule maps one port to one VM.
  • Network Watcher: IP flow verify (which NSG rule), Next hop (which route), Connection troubleshoot (one-off), Connection monitor (continuous).

Formal terms: Layer 4 vs layer 7, front-end IP, back-end pool, health probe, load balancing rule, inbound NAT rule, session persistence, floating IP, HA ports, Network Watcher.

Check your understanding

3 exam-style questions in the formats AZ-104 uses. Each is marked when you check it, with the reasoning.

0 of 3 checked

All scenarios and questions are original. None are taken from the exam, Microsoft's practice assessment or any question bank. PrepToExcel is not affiliated with Microsoft.