Load Balancer & Traffic Manager
Standard · Gateway · global tier · rules · probes · SNAT and outbound rules · Traffic Manager routing methods, endpoints, monitoring
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Load Balancer: SKUs, tiers and type
| SKU or tier | Use it for | Key facts |
|---|---|---|
| Standard (regional) | Layer 4 TCP and UDP traffic across VMs or virtual machine scale sets in a single virtual network | Public or internal. Backend pool by NIC or IP address. Probes: TCP, HTTP, HTTPS. Zone-redundant or zonal frontends. Closed to inbound flows unless a network security group allows them |
| Gateway | Third-party network virtual appliances (NVAs): firewalls, packet analytics, intrusion detection and prevention, DDoS protection | Frontend IP is private only. Rules can only be HA ports rules. Traffic uses VXLAN. Chained from a Standard public load balancer or a Standard public IP configuration of a VM |
| Global tier (of Standard) | Cross-region load balancing behind one static anycast IP | Public frontend only. Backend pool holds regional load balancers. Layer 4 pass-through, so client IP is preserved. Shares the SLA of Standard |
| Basic | Retired on September 30, 2025 | Had no SLA and was open to the internet by default. Upgrade to Standard |
| Public load balancer | Internal load balancer | |
|---|---|---|
| Frontend IP configuration | Public IP address (its SKU must be Standard) | Private IP address |
| Traffic | Inbound from the internet and outbound for backend VMs | Inside a virtual network, and from on-premises in a hybrid scenario. Can't accept incoming traffic from the internet |
| HA ports rule | Not supported | Supported |
| Outbound rules | Supported on Standard | No outbound connectivity until you enable it explicitly (instance-level public IPs, NAT gateway or an outbound-only configuration) |
- A load balancer rule can't span two virtual networks: all frontends and their backend instances must be in a single virtual network.
- A backend pool can't consist of a Private Endpoint. VMs don't need a public IP address to join the backend pool of a public load balancer, and VMs in a stopped state can still be attached.
- Load-balancing rules and inbound NAT rules don't support ICMP. The exception is an internal Standard load balancer with HA ports enabled.
- A resource can reference one SKU, never both: you can't mix Basic and Standard IPs or load balancers. Resource group moves (same subscription) are supported for Standard; subscription moves aren't.
- Upgrading from Basic requires downtime and is one-way. The
AzureBasicLoadBalancerUpgradePowerShell module is the recommended method when your scenario is supported; otherwise rebuild manually in the portal. - Standard load balancers block outbound access by default: a public load balancer needs an outbound rule, and a private one needs a NAT gateway or instance-level public IPs.
- A backend pool configured by IP address behaves like Basic with default outbound enabled. Configure the backend pool by NIC for a secure-by-default setup.
Rules, probes and distribution
| Rule | What it does | Notes |
|---|---|---|
| Load-balancing rule | Maps a frontend IP and port to backend IPs and ports for all instances in the pool | Inbound only. Needs a health probe. Distribution is per flow |
| HA ports rule | A load-balancing rule with protocol All and port 0: balances all TCP and UDP flows on all ports | Internal Standard load balancer only. For NVAs. Not intended for typical web workloads |
| Inbound NAT rule | Forwards a frontend IP and port to one specific VM or instance (port forwarding) | Doesn't need a health probe. Same hash-based distribution |
| Outbound rule | Configures outbound NAT (SNAT) for all instances in the backend pool | Standard public load balancer only |
Health probes
| Protocol | Healthy when | Fails when |
|---|---|---|
| TCP | The three-way TCP handshake completes on the port | The listener doesn't respond in time, or the instance sends a TCP reset |
| HTTP | The instance answers the HTTP GET (relative path) with status 200 | Any other status code (403, 404, 500 and so on), no response in time, or a TCP reset |
| HTTPS | Same as HTTP, with TLS added | Same as HTTP. Needs certificates with a minimum SHA256 signature hash in the whole chain |
- Probe source IP is
168.63.129.16for IPv4. Allow it in NSGs and local firewalls; theAzureLoadBalancerservice tag covers it and allows probe traffic by default. Blocking it makes the instance show as down. - Default probe interval: 5 seconds in the portal, 15 seconds (minimum 5) with templates, REST, CLI or PowerShell. HTTP/S probes time out after 30 seconds.
- For HTTP probes the threshold applies only when the probe times out; a clear 200 or non-200 answer changes the state at once.
- HTTP probes don't support hostnames and don't support probing ports 19, 21, 25, 70, 110, 119, 143, 220 and 993. HTTPS probes don't support client-certificate mutual authentication.
- Probe-down behavior on Standard: new connections stop, and established TCP connections to the unhealthy instance continue. If all probes are down, TCP flows continue. UDP flows move to another healthy instance, and all UDP flows end if all instances are down.
- The probe check on the portal validates the definition; with PowerShell, CLI, templates or API a probe definition isn't checked.
- Don't use the Microsoft-owned address range that contains 168.63.129.16 in your virtual network: it collides with the probe address.
Distribution mode, idle timeout, TCP reset, floating IP
| Session persistence (portal) | CLI value | Tuple |
|---|---|---|
| None (hash-based), the default | Default | Five-tuple |
| Client IP | SourceIP | Two-tuple: source IP and destination IP |
| Client IP and protocol | SourceIPProtocol | Three-tuple: source IP, destination IP and protocol type |
- Idle timeout on Standard: 4 to 100 minutes for load-balancing and inbound NAT rules; 4 to 120 minutes for outbound rules. The default is 4 minutes. Idle timeout isn't supported for UDP load-balancing rules.
- By default the load balancer drops an idle flow silently. TCP reset makes it send bidirectional TCP resets on idle timeout, so endpoints learn at once that the connection is gone. A reset is sent only for a TCP connection in the ESTABLISHED state.
- Floating IP is required to reuse the same backend port across multiple rules (clusters, NVAs, multiple TLS endpoints). With it, Azure maps to the frontend IP instead of the VM IP, so the guest OS needs a loopback interface with the frontend IP, weak host receive on Windows, and a firewall rule.
- With Floating IP enabled, the application must use the primary IP configuration of the NIC for outbound, and Floating IP isn't usable on secondary IP configurations for load balancing.
- Multiple frontends on one backend pool: different backend ports need nothing extra; the same backend port needs Floating IP on each rule.
Outbound rules and SNAT
| Method (priority order) | Port allocation | Production-grade? |
|---|---|---|
| 1. NAT gateway on the subnet | Dynamic, explicit | Yes. Best. It takes precedence over every other method |
| 2. Public IP on the VM | Static, explicit | Yes. Takes precedence over load balancer methods |
| 3. Load balancer frontend with outbound rules | Static, explicit | Yes, but not at scale |
| 4. Load balancer frontend without outbound rules | Static, implicit | No |
| 5. Default outbound access | Implicit | No. Avoid for production |
- Outbound rules let you choose which VMs use which public IPs, how many SNAT ports each gets, which protocols are translated, the idle timeout (4 to 120 minutes, default 4) and whether to send a TCP reset.
- Outbound rules are followed only if the backend VM has no instance-level public IP. They apply to the primary IPv4 configuration of a NIC (secondary configurations only for IPv6), and support TCP and UDP only, not ICMP.
- Each public IP on the frontend, or each IP in a public IP prefix, adds 64,000 ephemeral ports for SNAT. Each load-balancing or inbound NAT rule uses a range of eight ports from them.
- Default allocation (no outbound rule) gives each instance at most 1,024 ports: 1-50 instances get 1,024; 51-100 get 512; 101-200 get 256; 201-400 get 128; 401-800 get 64; 801-1,000 get 32. Don't use it for production.
- Manual allocation is in multiples of 8. A value not divisible by 8, or more ports than the frontend IPs provide, is rejected. Ports per instance = number of frontend IPs × 64K ÷ number of backend instances. Specify
0to return to default allocation. - Use "ports per instance" for VMs and "maximum number of backend instances" for virtual machine scale sets, so scale-out isn't blocked.
- To tune SNAT on an IP also used for inbound, set
disableOutboundSnatto true on the load-balancing rule. If you then have no outbound rule, the VM has no outbound connectivity. - To translate both TCP and UDP, disable outbound SNAT on the load-balancing rule and add an outbound rule with
"protocol": "All". - SNAT exhaustion: reuse connections in the application. For Azure PaaS services, Private Link avoids SNAT entirely.
- All VMs of an availability set or virtual machine scale set must be in the backend pool for outbound connectivity.
NAT gateway takes precedence over load balancer outbound rules and instance-level public IPs, and its idle timeout applies. Learn recommends NAT gateway for scalable outbound connectivity.
Inbound NAT, Gateway Load Balancer and the global tier
| Inbound NAT | Version 1 (single VM) | Version 2 (backend pool) |
|---|---|---|
| Target | One VM, 1:1 port mapping (SSH or RDP to individual VMs) | The whole backend pool. A frontend port range is preallocated from the first port and the maximum number of machines |
| Scaling | Per-VM rule | Scale up adds mappings automatically; scale down keeps existing mappings. If the range is too small, scale-up is blocked |
| Portal type | Azure Virtual Machine with a target VM | Backend pool with a target backend pool |
| Status | Fully supported | Recommended for multiple VMs or scale sets |
- Inbound NAT Pools (the scale set feature of version 1) retire on September 30, 2027. You can't create new ones from November 15, 2026. Single-VM version 1 rules aren't affected.
- Migrating from NAT pools to version 2 causes downtime for traffic flowing through the NAT rules; load-balancing and outbound rules aren't affected. NAT rules can't overlap port ranges or share a backend port, and NAT and load-balancing rules can't share a backend port.
- Gateway Load Balancer: chain a Standard public load balancer frontend (or Standard public IP configuration of a VM) to its frontend. No UDRs are needed afterward, and the frontend can't be a UDR next hop. Inbound and outbound inspection work; for outbound, chain it to the frontends used by the outbound rules.
- Gateway Load Balancer backend pools use up to two tunnel interfaces: external for traffic arriving at the pool, internal for traffic from the appliance to the application. A rule can use up to two backend pools.
- Consumer and provider virtual networks can be in different subscriptions or tenants. Cross-tenant chaining needs the
Microsoft.Network/loadBalancers/frontendIPConfigurations/join/actionpermission and isn't supported in the portal. It doesn't work with the Global tier. - HA ports flow symmetry isn't guaranteed across two load balancers, multiple backend pools or multiple frontends; Learn points to Gateway Load Balancer when you need it with NVAs between a public and an internal load balancer.
- Global tier home regions host the global load balancer or global public IP and don't affect routing; if a home region fails, traffic isn't affected. Regional load balancers can be in any public Azure region. Routing uses geo-proximity, and the global load balancer checks regional load balancers every 5 seconds.
- Global tier limits: public frontend only; no internal load balancer in its backend pool; no outbound rules (use regional outbound rules or NAT gateway); no ICMP; no NAT64; a regional load balancer can't be upgraded, so create a new global one.
Traffic Manager: routing methods
Traffic Manager is a DNS-based load balancer. It answers DNS queries with an endpoint; clients then connect to that endpoint directly. It isn't a proxy or a gateway and doesn't see the traffic.
| Method | Picks | Details |
|---|---|---|
| Priority | The highest-priority available endpoint | Priority is 1 to 1000; lower is higher priority; values can't repeat. Failover pattern |
| Weighted | A random available endpoint by weight | Weight 1 to 1000, default 1. Gradual upgrades, migration, cloud-bursting. DNS caching can skew results when few clients or resolvers are involved |
| Performance | The endpoint with the lowest network latency | Uses the Internet Latency Table and the IP of the recursive resolver. External and nested endpoints need a location. Same-region endpoints share traffic evenly |
| Geographic | The endpoint mapped to the query's region | Region levels: World, regional grouping, country/region, state/province (Australia, Canada, USA). A region maps to one endpoint; the lowest granularity wins; no mapping returns NODATA |
| Multivalue | All healthy endpoints, up to a configured maximum (10) | Endpoints must be External and given as IPv4 or IPv6 addresses. Client can retry another IP |
| Subnet | The endpoint mapped to the source IP range | CIDR or range, unique and non-overlapping. An endpoint with no range is the fallback; without one, undefined ranges get NODATA |
- A profile has one routing method at a time. You can change it at any time; the change applies within one minute without downtime. Combine methods with nested profiles.
- Performance and Geographic both use the recursive DNS resolver's IP (or the EDNS client subnet when the resolver passes it), not the client's own IP.
- For Geographic routing Microsoft strongly recommends nested endpoints whose child profiles have at least two endpoints, and one endpoint with the region World so unmapped queries get an answer.
- Traffic Manager can't do sticky sessions: it has no way to track individual clients because it sees the resolver's address.
Traffic Manager: endpoints, monitoring, nesting and DNS
| Endpoint type | Used for | Notes |
|---|---|---|
| Azure | Services hosted in Azure: PaaS cloud services, Web Apps, Web App slots, PublicIPAddress resources | A public IP needs a DNS name. Web Apps must be Standard SKU or higher, one per Azure region per profile |
| External | IPv4/IPv6 addresses, FQDNs, or services outside Azure | IP address endpoints can only be External. Can be mixed with Azure endpoints, but not IP and domain-name externals with each other or IP externals with Azure endpoints |
| Nested | A child profile added to a parent profile | MinChildEndpoints (default 1) sets how many healthy child endpoints keep the child up |
| Monitoring setting | Value |
|---|---|
| Protocol | HTTP, HTTPS or TCP. HTTPS checks only that a certificate is present, not that it is valid |
| Path | Required for HTTP and HTTPS; an error with TCP |
| Probing interval | 30 seconds (default) or 10 seconds (fast probing, priced separately) |
| Tolerated failures | 0 to 9; default 3 |
| Timeout | 5 to 10 seconds for a 30-second interval (default 10); 5 to 9 seconds for 10 seconds (default 9) |
| Expected status codes | Default 200; up to eight ranges |
| Custom headers | Up to eight header:value pairs, at profile or endpoint level |
- Monitoring is on by default. All endpoints in a profile share monitoring settings; use nested profiles for different settings per endpoint.
- Endpoint status Disabled removes the endpoint from DNS answers without touching the underlying service. A disabled profile, or all endpoints disabled, gives an NXDOMAIN answer.
- Degraded endpoints are left out of answers, unless all endpoints are degraded: then all are returned. An endpoint is Degraded after the number of consecutive failures exceeds the tolerated failures setting.
- DNS TTL on responses can be 0 to 2,147,483,647 seconds. A short TTL means more queries to Traffic Manager; a long TTL delays moving traffic away from a failed endpoint. Existing connections aren't affected by failover.
- Nested profiles: each profile has one routing method, and you can't combine Weighted and Performance in one profile. The parent doesn't probe the child directly; it uses the child's endpoint health. Any nested Multivalue profile needs at least one IPv4 and one IPv6 endpoint.
- Traffic Manager can't route traffic to endpoints inside a private network (for example an internal load balancer) or from users making DNS requests from such networks.
- A vanity domain uses a CNAME to the profile name, which isn't possible at the zone apex. Use Traffic Manager Linked Records (recommended, returns IPs without a CNAME hop) or an alias record. Only one tenant can own a root
trafficmanager.netname.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create a zone-redundant Standard public IP | az network public-ip create --resource-group load-balancer-cli-rg --name lb-frontend-ip --sku Standard --zone 1 2 3 | New-AzPublicIpAddress @publicip |
| Create a Standard public load balancer | az network lb create --resource-group load-balancer-cli-rg --name load-balancer --sku Standard --public-ip-address lb-frontend-ip --frontend-ip-name lb-frontend --backend-pool-name lb-backend-pool | New-AzLoadBalancer @loadbalancer |
| Create a Standard internal load balancer | az network lb create --resource-group load-balancer-cli-rg --name load-balancer --sku Standard --vnet-name lb-vnet --subnet backend-subnet --backend-pool-name lb-backend-pool --frontend-ip-name lb-frontend | - |
| Create a health probe | az network lb probe create --resource-group load-balancer-cli-rg --lb-name load-balancer --name lb-health-probe --protocol tcp --port 80 | New-AzLoadBalancerProbeConfig @probe |
| Create a load-balancing rule (outbound SNAT off, TCP reset on) | az network lb rule create --resource-group load-balancer-cli-rg --lb-name load-balancer --name 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 | New-AzLoadBalancerRuleConfig @lbrule -EnableTcpReset -DisableOutboundSNAT |
| Change the distribution mode of a rule (then Set-AzLoadBalancer -LoadBalancer $lb) | az network lb rule update --lb-name myLoadBalancer --load-distribution Default --name myHTTPRule --resource-group myResourceGroupLB | $lb.LoadBalancingRules[0].LoadDistribution = 'default' |
| Check whether a load balancer uses Inbound NAT Pools | az network lb inbound-nat-pool list -g MyResourceGroup --lb-name MyLoadBalancer | $slb.InboundNatPools |
| Create an inbound NAT rule (version 2) on the backend pool | az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLoadBalancer -n MyNatRule --protocol Tcp --frontend-port-range-start 201 --frontend-port-range-end 500 --backend-port 22 --backend-address-pool MybackendPool | - |
| Create a Traffic Manager profile (Priority) | az network traffic-manager profile create --name $mytrafficmanagerprofile --resource-group myResourceGroup --routing-method Priority --path '/' --protocol "HTTP" --unique-dns-name $mytrafficmanagerprofile --ttl 30 --port 80 | - |
| Add an Azure endpoint to a profile | az network traffic-manager endpoint create --name $mywebappeastus --resource-group myResourceGroup --profile-name $mytrafficmanagerprofile --type azureEndpoints --target-resource-id $App1ResourceId --priority 1 --endpoint-status Enabled | - |
| Disable a Traffic Manager endpoint | az network traffic-manager endpoint update --name $mywebappeastus --resource-group myResourceGroup --profile-name $mytrafficmanagerprofile --type azureEndpoints --endpoint-status Disabled | - |
Exam Tips
Tick each tip once you can answer it without looking.
“Distribute TCP or UDP traffic across VMs privately inside a virtual network, including from on-premises” → A Standard internal load balancer (private frontend IP). Trap: Application Gateway works at layer 7 for web traffic, and Traffic Manager is DNS-based and can't route to endpoints in a private network. An internal load balancer can't take traffic from the internet.
“An old deployment still uses Basic Load Balancer” → Basic was retired on September 30, 2025. Upgrade to Standard: it needs downtime and is one-way. Use the AzureBasicLoadBalancerUpgrade module. Trap: You can't mix Basic and Standard SKUs or public IPs, and a subscription move of a Standard load balancer isn't supported.
“Backend VMs behind a Standard public load balancer need controlled outbound internet access, with fixed public IPs and enough SNAT ports” → An outbound rule (set disableOutboundSnat on the load-balancing rule). For scale, a NAT gateway is the best method. Trap: Default port allocation gives at most 1,024 ports per instance and risks exhaustion. Outbound rules are ignored for VMs with an instance-level public IP. Global tier has no outbound rules.
“Several rules must send to the same backend port on the same VMs (clusters, multiple TLS endpoints)” → Enable Floating IP on each rule and add a loopback with the frontend IP in the guest OS. Trap: Without Floating IP the VM sees its own IP and can't tell the frontends apart. Different backend ports need no Floating IP.
“Balance all ports of a pool of firewall appliances with one rule” → An HA ports rule (protocol All, port 0) on an internal Standard load balancer. Trap: Public load balancers don't support HA ports, and they aren't meant for typical web workloads.
“Insert third-party NVAs transparently in the path of a public endpoint, without UDRs” → Gateway Load Balancer, chained from a Standard public load balancer frontend or a Standard public IP configuration. Trap: Its frontend can't be a UDR next hop and its frontend is private only. It doesn't work with the Global tier.
“One static anycast IP in front of Standard public load balancers in several regions” → The global tier load balancer (backend pool of regional load balancers; layer 4; preserves client IP). Trap: It has a public frontend only and no outbound rules, an internal load balancer can't be in its pool, and you can't upgrade a regional load balancer, only create a new global one. Traffic Manager is DNS-based and returns different endpoints.
“Backend instances are marked down although the app runs; an NSG is applied” → Allow 168.63.129.16 (the AzureLoadBalancer tag) and check the probe port, protocol and path (HTTP needs 200). Trap: Blocking the probe source makes the instance show as down; HTTP/HTTPS probes fail on any status other than 200.
“RDP or SSH to each instance of a scale set through the load balancer on a different frontend port” → An inbound NAT rule version 2 targeting the backend pool. Trap: Inbound NAT Pools retire on September 30, 2027, and you can't create new ones from November 15, 2026. NAT rules don't need a health probe.
“Keep a client on the same VM; or avoid silent drops of idle connections” → Session persistence Client IP (two-tuple) or Client IP and protocol (three-tuple); enable TCP reset for idle timeouts. Trap: The default is five-tuple hash-based. Idle timeout isn't supported for UDP rules, and without TCP reset an idle flow is dropped silently.
“Traffic Manager: HTTP errors, sticky sessions, or inspecting traffic” → Traffic Manager works at the DNS level: clients connect to the endpoint directly. It isn't a proxy, can't track clients and can't do sticky sessions. Trap: Don't expect a Traffic Manager IP address or HTTP-level features: use Application Gateway or Front Door for those.
“Primary site with ordered backups, or a gradual rollout of a new version” → Priority for failover (1 to 1000, lowest value first); Weighted for gradual rollout (weight 1 to 1000, default 1). Trap: Priority values can't repeat. DNS caching can skew weighted results when few resolvers are involved.
“Send users to the endpoint with the lowest latency” → Performance routing (Internet Latency Table, based on the recursive resolver's IP). Trap: Closest means lowest network latency, not geographic distance. External and nested endpoints need a location.
“Keep users from a country on endpoints in that country; or send a corporate IP range to a test site” → Geographic (region to endpoint) and Subnet (IP range to endpoint) routing. Trap: Geographic maps a region to one endpoint and returns NODATA for unmapped regions; add a World endpoint. Subnet needs a fallback endpoint or undefined ranges get NODATA.
“Return several healthy IP addresses so the client can retry” → Multivalue routing: External endpoints with IPv4 or IPv6 addresses only, up to 10 returned. Trap: Azure endpoints and FQDN endpoints don't fit Multivalue. The set returned can differ between queries.
“Default Traffic Manager health check settings” → 30-second interval, 3 tolerated failures, 10-second timeout, expected status 200; HTTP, HTTPS or TCP. Trap: Fast probing (10 seconds) has its own pricing, and HTTPS checks only that a certificate exists, not that it is valid. All endpoints in a profile share these settings.
“Different monitoring settings per endpoint, or Weighted routing inside Performance routing” → Nested profiles: a child profile as an endpoint of a parent (MinChildEndpoints default 1). Trap: You can't combine Weighted and Performance in one profile, and the parent doesn't probe the child directly.
“Point contoso.com (zone apex) at a Traffic Manager profile” → Traffic Manager Linked Records or an Azure DNS alias record. Trap: DNS standards don't allow a CNAME at the apex. A CNAME works for names such as www.contoso.com.
Sources
- Azure Load Balancer overview
- Load Balancer SKUs
- Load Balancer components
- Distribution mode
- Health probes
- Outbound connections and SNAT
- Outbound rules
- Floating IP
- TCP reset and idle timeout
- Global load balancer
- Gateway Load Balancer
- Inbound NAT rules
- Migrate inbound NAT rules v1 to v2
- HA ports
- Multiple frontends
- Manage rules
- Upgrade from Basic
- Quickstart: public load balancer (CLI)
- Quickstart: internal load balancer (CLI)
- Quickstart: public load balancer (PowerShell)
- Traffic Manager overview
- How Traffic Manager works
- Traffic Manager routing methods
- Traffic Manager endpoint monitoring
- Traffic Manager endpoint types
- Nested Traffic Manager profiles
- Traffic Manager FAQ
- Quickstart: Traffic Manager profile (CLI)
Checked against Microsoft Learn on November 13, 2026.