3.1 Azure Load Balancer and Traffic Manager
📘Microsoft Azure Networking Solutions (AZ-700)
Azure Traffic Manager is a DNS-based traffic load balancer. It helps distribute traffic across multiple endpoints—like Azure VMs, App Services, or external services—based on policies you configure. This improves application availability, responsiveness, and disaster recovery.
1. What Azure Traffic Manager Does
Traffic Manager works at the DNS level, not the network level. It does not route individual packets like Azure Load Balancer. Instead:
- When a user requests your app (e.g.,
www.example.com), Traffic Manager responds with the best IP address of an endpoint based on your routing rules. - It continuously monitors the health of your endpoints to ensure only healthy ones receive traffic.
- Useful for global applications to send users to the closest or fastest endpoint.
Key benefit: If one endpoint goes down, Traffic Manager automatically directs users to other healthy endpoints—ensuring high availability.
2. Types of Endpoints
Traffic Manager can route traffic to:
- Azure endpoints – Azure services like:
- VMs (via public IP)
- Azure App Services
- Cloud Services
- External endpoints – Any internet-accessible service outside Azure.
- Nested Traffic Manager profiles – A Traffic Manager profile can point to another Traffic Manager profile for advanced routing.
Example for IT environments:
If you have web apps running in East US and West Europe, Traffic Manager can send users to the nearest available app automatically.
3. Traffic Routing Methods
Azure Traffic Manager supports several routing methods:
| Routing Method | How It Works | Use Case in IT |
|---|---|---|
| Priority | Sends traffic to the primary endpoint. If it fails, sends traffic to the next endpoint in priority order. | Disaster recovery scenario: your main web app is in East US, backup in West US. |
| Weighted | Distributes traffic based on assigned weights. | Gradual rollout of new versions; 80% traffic to old app, 20% to new app. |
| Performance | Sends traffic to the endpoint with the lowest network latency from the user. | Global apps serving users in different continents; improves responsiveness. |
| Geographic | Routes traffic based on the user’s location. | Regional compliance: Europe users go to EU endpoints, US users to US endpoints. |
| Multivalue | Returns multiple healthy endpoints in the DNS reply. | Load balancing for applications that support client-side load balancing. |
| Subnet | Routes traffic based on the client IP subnet. | Enterprise apps where different subnets get different endpoints. |
Exam tip: You must know each routing method and when to use it.
4. Health Monitoring
Traffic Manager continuously monitors endpoints using HTTP, HTTPS, or TCP probes:
- Checks endpoint health at a set interval (default: 30 seconds).
- Removes unhealthy endpoints from DNS responses automatically.
- You can configure probe path, protocol, and interval for monitoring.
IT scenario: If your app’s East US VM stops responding, Traffic Manager automatically stops sending traffic there and routes users to other healthy endpoints.
5. Creating a Traffic Manager Profile
To implement Traffic Manager:
- Create a Traffic Manager profile:
- Choose a profile name (DNS name, e.g.,
myapp.trafficmanager.net). - Select routing method (Priority, Weighted, Performance, etc.).
- Choose protocol for health probes (HTTP, HTTPS, TCP).
- Choose a profile name (DNS name, e.g.,
- Add endpoints:
- Azure endpoints (App Services, VMs, etc.)
- External endpoints
- Nested profiles (optional)
- Configure health probes:
- Define probe path (e.g.,
/health) - Set interval, timeout, and tolerated failures
- Define probe path (e.g.,
- Update DNS records:
- Either use the Traffic Manager DNS name directly or map it to a custom domain (via CNAME record).
Exam tip: The CNAME record is critical for connecting your app’s custom domain to Traffic Manager.
6. Important Considerations
- Traffic Manager works at DNS level, so routing is not instantaneous:
- Users may cache old DNS results until the TTL expires.
- It does not provide SSL termination; SSL is handled at the endpoint.
- Works well with Azure Load Balancer or Application Gateway at each endpoint:
- Traffic Manager directs traffic globally
- Load Balancer/Application Gateway handles traffic regionally
IT setup example:
Traffic Manager routes users to the nearest region (Performance routing). Within that region, an Application Gateway distributes traffic to multiple VMs.
7. Monitoring and Diagnostics
- Use Azure Monitor to track:
- Endpoint health
- DNS queries
- Traffic routing behavior
- Alerts can notify IT teams when an endpoint fails.
Exam tip: Knowing how to monitor Traffic Manager is essential.
8. Exam Checklist for Azure Traffic Manager
To pass the AZ-700 exam, be confident with:
- Purpose of Traffic Manager – DNS-based global traffic distribution.
- Endpoint types – Azure, external, nested.
- Routing methods – Priority, Weighted, Performance, Geographic, Multivalue, Subnet.
- Health monitoring – Probe configuration and automatic failover.
- Profile setup – Creating profile, adding endpoints, configuring probes.
- DNS integration – CNAME usage and TTL impact.
- Integration with other Azure networking services – Load Balancer, Application Gateway.
- Monitoring – Using Azure Monitor and alerts.
Summary:
Azure Traffic Manager is essential for highly available, globally distributed applications. It directs traffic based on health, performance, location, or custom rules. Understanding endpoint types, routing methods, and monitoring is critical for the AZ-700 exam.
