Azure DNS and Load Balancer: AZ-104 Networking Guide
Name resolution and load balancing are two networking services you configure constantly as an Azure administrator. Azure DNS hosts your domain's records, and comes in two flavours: public DNS zones that answer queries from the internet, and private DNS zones that resolve names inside and between your virtual networks. Azure Load Balancer distributes network traffic across a pool of backend virtual machines at Layer 4, and comes as either a public load balancer for internet-facing traffic or an internal load balancer for private, in-network traffic. For AZ-104 you must configure both, pick the internal or public variant for a given scenario, choose Azure Load Balancer over Application Gateway or Traffic Manager when the situation calls for it, and troubleshoot a load balancer that has stopped distributing traffic. This lesson walks through public and private DNS zones, the anatomy of a load balancer, the Basic and Standard SKUs, when to reach for a different service, and how to diagnose a failing health probe.
On this page7 sections
- Public Azure DNS zones: hosting a domain
- Private DNS zones: resolving VM names inside a VNet
- Azure Load Balancer: a Layer 4 distributor
- Internal versus public load balancer
- Load balancer SKUs: Basic versus Standard
- Choosing the right service: Load Balancer, Application Gateway, or global
- Troubleshooting load balancing: the failing health probe
- Configure a public Azure DNS zone to host a domain's A, CNAME, MX, and TXT records and delegate it with name servers
- Configure a private DNS zone with a virtual network link and autoregistration to resolve VM names privately inside a VNet
- Identify the components of an Azure Load Balancer — frontend IP, backend pool, health probes, and load-balancing rules
- Choose between an internal and a public load balancer, and between the Basic and Standard SKUs
- Distinguish Azure Load Balancer from Application Gateway, Traffic Manager, and Azure Front Door
- Troubleshoot a load balancer that is not distributing traffic by diagnosing a failing health probe
Public Azure DNS zones: hosting a domain
Azure DNS is a hosting service for DNS domains, running on Microsoft's global name server infrastructure. A public DNS zone hosts the records for a domain name — such as contoso.com — and answers queries from anywhere on the internet. You do not buy domains through Azure DNS; you host the records for a domain you already own.
Inside a zone you create record sets, one per name and record type. The types you must recognise are the everyday ones: an A record maps a name to an IPv4 address, a CNAME aliases one name to another, an MX record points mail to a mail server, and a TXT record holds arbitrary text used for things like domain verification and SPF. Azure DNS also supports AAAA, NS, SOA, SRV, PTR, and CAA records.
To make Azure DNS authoritative for your domain you perform delegation. When you create the zone, Azure assigns it four name servers. You then go to your domain registrar and update the domain's NS records to point at those four Azure name servers. Once the registrar's delegation propagates, the internet resolves your domain's records from Azure DNS. On the exam, the phrase host a public domain's records plus update the name servers at the registrar always points to a public Azure DNS zone with delegation.
Private DNS zones: resolving VM names inside a VNet
By default, virtual machines in the same virtual network can resolve each other by name using Azure-provided default DNS (the platform resolver reachable at the virtual IP 168.63.129.16). That built-in resolution works only within a single VNet, uses an Azure-assigned suffix you cannot change, and does not span virtual networks. When you need a custom domain name, or resolution across peered virtual networks, you use a private DNS zone.
A private DNS zone provides name resolution inside and between your virtual networks without exposing anything to the internet. You connect a zone to a VNet with a virtual network link. Any VNet you link can resolve the zone's records; link several VNets to one zone and they all share private name resolution.
The feature that makes this effortless is autoregistration. When you enable autoregistration on a virtual network link, Azure automatically creates and updates an A record for every virtual machine in that VNet, and removes the record when the VM is deleted. You never hand-maintain host records. If a scenario asks how to resolve VM names privately inside a VNet, or resolve names across peered VNets using your own domain, the answer is a private DNS zone with a virtual network link, and autoregistration if the records should manage themselves. Without autoregistration the zone still works, but you add records manually.
Azure Load Balancer: a Layer 4 distributor
Azure Load Balancer distributes inbound network traffic across a pool of backend virtual machines. It operates at Layer 4 of the network stack — the transport layer — so it makes decisions on TCP and UDP flows using IP addresses and ports. It does not read URLs, host headers, or cookies; that is Layer 7 work for a different service. Because it works at Layer 4, Azure Load Balancer is fast, protocol-agnostic, and suited to any TCP or UDP workload, not just web traffic.
Four components make up every load balancer, and the exam expects you to name each one:
- Frontend IP configuration — the IP address clients connect to. A public frontend uses a public IP; an internal frontend uses a private IP from a subnet.
- Backend pool — the set of virtual machines (or scale-set instances) that receive the traffic.
- Health probe — a periodic check that tells the load balancer which backend instances are healthy enough to receive traffic.
- Load-balancing rule — the mapping that ties a frontend IP and port to a backend pool port and a probe, defining how a flow is distributed.
By default the load balancer spreads flows using a five-tuple hash (source IP, source port, destination IP, destination port, protocol). You can change the distribution to session persistence — source IP affinity (a two-tuple or three-tuple hash) — so that a client always lands on the same backend, which some stateful applications require. An inbound NAT rule is a related feature that forwards a specific frontend port to one specific VM, for example for direct RDP or SSH access.
Internal versus public load balancer
The single most common load balancer decision on AZ-104 is internal versus public, and it comes down to what kind of frontend IP the load balancer exposes.
A public load balancer has a public IP frontend. It takes traffic from the internet and distributes it across backend VMs — for example, spreading inbound web requests across a pool of front-end web servers. It also provides outbound connectivity for the VMs behind it.
An internal (private) load balancer has a private IP frontend from a VNet subnet. It is never reachable from the internet; it only distributes traffic that originates inside your network. The classic use is fronting a private application or database tier so that a web tier can call it through one stable private address while traffic is balanced across the backend instances.
| Aspect | Public load balancer | Internal load balancer |
|---|---|---|
| Frontend IP | Public IP | Private IP from a subnet |
| Reachable from | The internet | Inside the VNet only |
| Typical use | Internet-facing web tier | Private app or database tier |
| Direction of traffic | External clients inbound | Internal, tier-to-tier |
On the exam, distribute internal TCP traffic across a private app tier means an internal load balancer; balance internet requests across public web servers means a public load balancer. Both use the identical frontend, backend pool, probe, and rule components — only the frontend IP type differs.
Load balancer SKUs: Basic versus Standard
Azure Load Balancer comes in two SKUs, and you choose the SKU when you create the resource. The exam expects you to know why Standard is the production choice.
The Standard SKU is the full-featured, recommended tier. It is zone-redundant — you can spread a frontend across availability zones so the load balancer survives a zone outage — and it is secure by default: its endpoints are closed to inbound traffic unless a network security group explicitly allows it. Standard supports larger backend pools, HA ports, outbound rules, and richer diagnostics. It backs onto Standard public IP addresses.
The Basic SKU is the older, no-cost tier with limited scale, no availability-zone redundancy, and no built-in NSG requirement. Microsoft has placed Basic Load Balancer on a retirement path and recommends Standard for all new and production deployments, so treat Basic as legacy.
| Capability | Basic | Standard |
|---|---|---|
| Availability zones | Not supported | Zone-redundant or zonal |
| Security posture | Open by default | Secure by default (closed unless an NSG allows it) |
| Backend pool scale | Small | Large |
| Status | Legacy, being retired | Recommended |
The practical exam takeaway: if a scenario needs resilience to a datacentre (zone) failure or a production-grade, secure load balancer, choose Standard. Remember that Standard being secure by default means you must add an NSG rule allowing your application traffic, or clients cannot reach the backend at all.
Choosing the right service: Load Balancer, Application Gateway, or global
Azure offers several load-distribution services, and picking the wrong one is a favourite exam trap. The deciding factors are the layer the service works at and whether it balances traffic regionally or globally.
Azure Load Balancer is Layer 4, regional, and distributes any TCP or UDP traffic. Reach for it when you balance non-HTTP workloads, or web servers where you do not need URL-aware routing.
Application Gateway is a Layer 7, regional web load balancer. Because it reads HTTP, it can do URL path-based routing, host-based routing, SSL/TLS termination, and it integrates a Web Application Firewall (WAF). Choose it when a scenario mentions Layer 7 URL-path routing and WAF.
Traffic Manager is a DNS-based global load balancer. It hands clients the address of the best endpoint using routing methods such as priority, weighted, performance, and geographic — it works at the DNS layer and does not sit in the data path. Azure Front Door is a global Layer 7 service that adds CDN, WAF, and TLS at the edge for web apps.
| Service | Layer | Scope | Best for |
|---|---|---|---|
| Azure Load Balancer | Layer 4 (TCP/UDP) | Regional | Any TCP/UDP traffic within a region |
| Application Gateway | Layer 7 (HTTP/S) | Regional | URL-path routing, WAF, TLS termination |
| Traffic Manager | DNS | Global | DNS-based routing across regions |
| Azure Front Door | Layer 7 (HTTP/S) | Global | Global web acceleration, WAF, CDN |
The trigger words: Layer 4 TCP/UDP within a region is Azure Load Balancer; Layer 7 URL-path routing and WAF is Application Gateway; global DNS-based traffic routing is Traffic Manager.
Troubleshooting load balancing: the failing health probe
When traffic stops flowing through a load balancer, the cause is almost always the health probe. The load balancer only sends new connections to backend instances the probe reports as healthy. If a backend fails its probe, the load balancer removes it from rotation; if every backend fails, no traffic is distributed at all and clients see connection failures.
A probe checks a port (and, for an HTTP or HTTPS probe, a path that must return HTTP 200) at a regular interval. Work through these causes in order:
- Is the application actually listening on the probe port, and does the probe path return 200? A wrong port or a path that returns 404 marks the instance unhealthy.
- Does a network security group allow the probe? Standard Load Balancer probes originate from Azure's
168.63.129.16; you must allow theAzureLoadBalancerservice tag and the probe port inbound, or the probe never reaches the VM. - Is the backend instance itself healthy — VM running, application service started, host firewall open?
Scenario: a web tier calls an internal load balancer in front of a private app tier, and requests are suddenly failing. You check the backend health and every instance shows unhealthy. The app team recently changed the service to listen on port 8080, but the probe still targets port 80. Because the probe on port 80 fails, every backend is removed from rotation and the internal load balancer distributes nothing. You update the health probe to port 8080 (and confirm the NSG allows the AzureLoadBalancer tag on 8080); the probes pass, the instances return to the pool, and traffic flows again. On the exam, backend removed from rotation and traffic not distributing both point straight to a failed health probe — check the probe port and path, the NSG, and backend health.
Tip. Expect scenarios that hinge on trigger words. "Resolve VM names privately inside a VNet" or across peered VNets points to a private DNS zone with a virtual network link and autoregistration, while hosting a public domain's records and updating the registrar's name servers is a public Azure DNS zone. "Distribute internal TCP traffic across a private app tier" means an internal Azure Load Balancer, whereas "Layer 7 URL-path routing and WAF" is Application Gateway and "global DNS-based traffic routing" is Traffic Manager. When a backend is removed from rotation and traffic is not distributing, the answer is a failed health probe — check the probe port and path, the NSG allowing the AzureLoadBalancer tag, and backend health.
- A public Azure DNS zone hosts a domain's records (A, CNAME, MX, TXT) and becomes authoritative once you delegate the domain by updating the name servers at the registrar.
- A private DNS zone resolves VM names privately inside and between VNets via a virtual network link; enable autoregistration to have Azure create and remove VM A records automatically.
- Azure Load Balancer is a Layer 4 (TCP/UDP) distributor built from a frontend IP, a backend pool, health probes, and load-balancing rules.
- A public load balancer fronts a public IP for internet traffic; an internal load balancer fronts a private IP to distribute traffic across a private app tier inside the VNet.
- The Standard SKU is zone-redundant and secure by default (closed until an NSG allows traffic); Basic is legacy and being retired.
- Use Application Gateway for Layer 7 URL-path routing and WAF, and Traffic Manager for global DNS-based routing — not Azure Load Balancer.
- If a backend fails its health probe it is removed from rotation; when traffic stops distributing, check the probe port and path, the NSG allowing the AzureLoadBalancer tag, and backend health.
Frequently asked questions
What is the difference between an Azure Load Balancer and an Application Gateway?
Azure Load Balancer works at Layer 4 and distributes any TCP or UDP traffic within a region based on IP address and port. Application Gateway works at Layer 7 for HTTP and HTTPS, so it can do URL path-based routing, host-based routing, TLS termination, and it includes a Web Application Firewall. Choose Load Balancer for general TCP/UDP workloads and Application Gateway when you need URL-aware web routing or a WAF.
What is a private DNS zone in Azure?
A private DNS zone provides name resolution inside and between your virtual networks without exposing records to the internet. You connect it to a VNet with a virtual network link, and if you enable autoregistration Azure automatically creates and removes an A record for every VM in that VNet. It is the service you use to resolve VM names privately with a custom domain, including across peered VNets.
When should I use an internal load balancer instead of a public one?
Use an internal load balancer when the traffic originates inside your network rather than from the internet. It has a private IP frontend and is unreachable from outside the VNet, which makes it ideal for distributing traffic across a private application or database tier that a web tier calls internally. Use a public load balancer, with a public IP frontend, when you need to balance internet-facing traffic across backend servers.
Why is my Azure Load Balancer not distributing traffic?
The most common cause is a failing health probe. The load balancer only sends connections to backends that pass their probe, and it removes any that fail from rotation; if all backends fail, nothing is distributed. Check that the application listens on the probe port and that an HTTP probe path returns 200, that a network security group allows the AzureLoadBalancer service tag and the probe port, and that the backend VMs and their services are healthy.
How do I delegate a domain to Azure DNS?
When you create a public DNS zone, Azure assigns it four name servers. To make Azure DNS authoritative, sign in to your domain registrar and change the domain's NS records to point at those four Azure name servers. Once the delegation propagates, internet resolvers answer your domain's records from Azure DNS. Delegation is what connects a domain you already own to the zone you host in Azure.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.