Azure Traffic
Manager
9 August 2021
[email protected]
What is Traffic Manager?
• Azure Traffic Manager is a DNS-based traffic load balancer.
• This service allows you to distribute traffic to your public facing applications across the global Azure regions.
• Traffic Manager also provides your public endpoints with high availability and quick responsiveness.
• Traffic Manager uses DNS to direct the client requests to the appropriate service endpoint based on a traffic-
routing method.
• Traffic manager also provides health monitoring for every endpoint.
• The endpoint can be any Internet-facing service hosted inside or outside of Azure.
• Traffic Manager provides a range of traffic-routing methods and endpoint monitoring options to suit different
application needs and automatic failover models. Traffic Manager is resilient to failure, including the failure of
an entire Azure region.
Use cases
Azure provides a suite of fully managed load-balancing solutions for your scenarios.
• If you want to load balance between your servers in a region at the application layer, review
Application Gateway.
• If you need to optimize global routing of your web traffic and optimize top-tier end-user
performance and reliability through quick global failover, see Front Door.
• To do network layer load balancing, review Load Balancer.
Your end-to-end scenarios may benefit from combining these solutions as needed. For an Azure
load-balancing options comparison, see Overview of load-balancing options in Azure.
Controlling traffic by using Azure Traffic
Manager
• Routes requests from clients to apps in Azure
• Keeps track of app status (running, stopped, deleted):
• Will automatically route traffic away from an unavailable app
• Configured by using profiles:
• Stores the routing method for requests
• Stores a list of endpoints (apps) to route requests to
• Stores information about endpoint status
Azure Traffic Manager and Web Apps
DNS Azure Traffic Manager
Inbound IP
Azure Traffic Manager routing methods
• Priority:
• Distribute users to a specific app
• In case of failure, route users to backup apps based on a priority scheme
• Weighted:
• Distribute traffic across apps according to weights that you define
• Your weight definition could potentially distribute users evenly
• Performance:
• Route users to the “closest” app location based on latency
• Geographic:
• Route users to specific app locations based on their current location
Priority traffic-routing method
1
Recursive
DNS Service
DNS query
User Browser
DNS response
2
4 3
Client connects directly Choose available endpoint
to selected endpoint, with highest priority
not through Traffic Manager Traffic Manager Endpoint Priority Status
Health checks
Primary 1 Degraded
Failover A 2 Online
Failover B 3 Online
Primary Failover A Failover B
Priority 1 Priority 2 Priority 3
Azure
Weighted traffic-routing method
1
Recursive
DNS Service
DNS query
User Browser
DNS response
2
4 3
Client connects directly Choose available endpoint at
to selected endpoint, random, based on weights
not through Traffic Manager Traffic Manager Endpoint Weight Status
Health checks Primary 50 Degraded
Failover A 5 Online
Failover B 50 Online
Primary Failover A Failover B
Weight 50 Weight 5 Weight 50
Azure
Performance traffic-routing method
1
Recursive
DNS Service
DNS query
User Browser
DNS response 2 Look up closest available endpoint in latency
3 table by using DNS query source IP address
4
IP Range West US North Europe East Asia
Client connects directly
to selected endpoint,
… … … …
not through Traffic Manager Traffic Manager
Health checks 89.17.0.0/16 75ms 15ms 150ms
… … … …
Endpoint 1 Endpoint 2 Endpoint 3
West US North Europe East Asia
Azure
Geographic traffic-routing method
1
Recursive
DNS Service
DNS query
User Browser
DNS response
Choose the endpoint that is designated to
Client connects directly 3 2 serve the user’s geographic region, based on
4
to selected endpoint, the DNS query’s source IP address
not through Traffic Manager
Endpoint Assigned Geo
Traffic Manager
Health Checks
Endpoint 1 Germany
Nested Profile Mexico, Asia
Endpoint 1 Nested Profiles Endpoint 2 Endpoint 2 World
[Germany] [Mexico, Asia] [World]
Endpoint A Endpoint B
Priority 1 Priority 2 Azure
Implementing
Traffic Manager
•This will deploy two Azure Web Apps. One in
West Europe and one in Central US with a
customized homepage to show in which
region the Web App is running.
•Task 1: Create a web app and deploy to West
Europe region
•Task 2: Deploy the same web app to Central
US region
•Sample Azure deploy Script
(azure-traffic-manager-lab/azuredeploy.json
at master · JackStromberg
/azure-traffic-manager-lab · GitHub)
•Implementing and Configuring the Traffic
Manager
20533: Implementing Microsoft Azure Infrastr
ucture Solutions - Lab Answer Key: Module 5: I
mplementing Azure App Service (microsoftlear
ning.github.io)
References
• https://docs.microsoft.com/en-us/azure/traffic-manager/traffic-mana
ger-overview
• https://docs.microsoft.com/en-us/azure/traffic-manager/traffic-mana
ger-routing-methods