Lesson 4 of 4 Name Resolution and Load Balancing in Azure

Troubleshooting Azure Load Balancer

This lesson explains health probes, Load Balancer metrics and the checks that find common load-balancing faults.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how health probes decide which backends receive traffic.
  • Describe the Load Balancer metrics in Insights.
  • Identify the likely cause of common load-balancing symptoms.

Health probes

A backend instance receives new flows only while its health probe succeeds. Probes come from the Azure infrastructure address 168.63.129.16, represented by the AzureLoadBalancer service tag. If all instances fail the probe, the load balancer stops sending traffic and clients time out. Common causes are a probe on the wrong port or path, an HTTP probe that gets a status other than 200 (for example a redirect or an authentication challenge), an application not listening, the guest firewall blocking the probe port, or an NSG rule with a higher priority than AllowAzureLoadBalancerInBound that denies it.

The following diagram shows why a load balancer marks two healthy web VMs as unhealthy, and the fix.

Why both web VMs are marked unhealthy. An HTTP health probe succeeds only on a 200 response, and /health returns 404, so Health Probe Status is 0% even though the site itself works. Pointing the probe at a path that returns 200, such as /, or adding the /health endpoint to the application fixes it; the NSG is not the problem.
The scenario is illustrative.
Troubleshooting

Unhealthy backends

Exam skills 4.3.3

Find the cause when the probe marks working VMs as unhealthy.

Log in to try this activity Interactive activities are free with an account.

Metrics and Insights

Load Balancer Insights in the portal shows a topology view and a dashboard of metrics. Health Probe Status (DIP availability) shows the percentage of successful probes per backend instance, split by backend IP. Data Path Availability (VIP availability) shows whether the frontend can reach the backends through the data path. SNAT Connection Count and Used SNAT Ports reveal outbound port exhaustion, and Byte Count and Packet Count show traffic per rule. Alerts on these metrics detect problems early.

Match the pairs

Which metric shows it?

Exam skills 4.3.3

Match each question with the Load Balancer metric that answers it.

Log in to try this activity Interactive activities are free with an account.

Other checks

Verify that the NSGs on the backend subnet and NICs allow the application port from the clients, because Standard Load Balancer does not open anything by itself. Check that the load-balancing rule maps the correct frontend and backend ports and uses the intended probe, and that the backend pool contains the expected NICs or IPs. An instance in the backend pool of an internal load balancer cannot reach the load balancer's own frontend (the flow would return to itself), so testing from a backend VM gives misleading failures; test from another VM. Uneven distribution is often caused by session persistence or by few clients behind one NAT address, not by a fault.

SymptomLikely cause
All backends unhealthyProbe port or path wrong, app down, NSG or guest firewall blocking 168.63.129.16
Probe healthy but clients time outNSG does not allow the client traffic on the application port
Test from a backend VM to the internal frontend failsHairpinning is not supported; test from another VM
Outbound connections fail intermittentlySNAT port exhaustion; add outbound IPs or use a NAT gateway
One instance receives most trafficSession persistence with few client IPs
Sort into groups

Symptom and cause

Exam skills 4.3.3

Match each symptom with its likely cause.

Log in to try this activity Interactive activities are free with an account.
Worked example

A load balancer with no healthy backends

A public Standard load balancer forwards TCP 80 to two web VMs with an HTTP probe on path /health. Health Probe Status is 0% for both. Browsing to each VM's private IP on port 80 from a jump box returns the home page, but /health returns 404. The NSG allows TCP 80 from Internet. What should you do?

An HTTP probe succeeds only on a 200 response, and /health returns 404, so both instances are marked unhealthy. Change the probe path to one that returns 200, such as /, or add the /health endpoint to the application. The NSG is not the problem, because the default AllowAzureLoadBalancerInBound rule allows probe traffic.

Check yourself

From which IP address do health probes originate?

Show answer

168.63.129.16, represented by the AzureLoadBalancer service tag.

Exam Tips

Remember for the exam

  • Probes come from 168.63.129.16 (AzureLoadBalancer tag); do not block it.
  • HTTP and HTTPS probes need a 200 response.
  • Use Health Probe Status and Data Path Availability metrics in Load Balancer Insights.
  • Backend VMs cannot reach their own internal load balancer frontend.