Azure Documentation

Azure Traffic Manager

Azure Traffic Manager is a DNS-based traffic load balancer that allows you to distribute traffic optimally to your services hosted in different Azure regions, or even to external endpoints. It provides high availability and responsiveness by directing user traffic to the endpoint that provides the best performance or availability for your application.

How Traffic Manager Works

Traffic Manager uses the Domain Name System (DNS) to direct client requests to the most appropriate endpoint. You configure a Traffic Manager profile with a set of endpoints and a traffic-routing method. When a client makes a DNS query for your Traffic Manager domain name, Traffic Manager responds with the DNS record for the selected endpoint based on the chosen routing method and the health of the endpoints.

Traffic-Routing Methods

Traffic Manager supports several traffic-routing methods:

Key Features

Tip: Traffic Manager is a DNS-level load balancer and does not inspect the actual content of the traffic. For Layer 7 load balancing with features like SSL offloading and URL-based routing, consider Azure Application Gateway.

Creating a Traffic Manager Profile

You can create and manage Traffic Manager profiles using the Azure portal, Azure CLI, or PowerShell.

Here's a general overview of the steps:

  1. Navigate to the Azure portal.
  2. Search for "Traffic Manager profiles" and select it.
  3. Click "Create".
  4. Provide a name for the profile, select the subscription and resource group.
  5. Choose the desired Traffic-routing method.
  6. Configure the endpoints by adding their IP addresses or FQDNs (Fully Qualified Domain Names).
  7. Define the monitoring settings (protocol, port, interval, etc.).
  8. Review and create the profile.

Monitoring Endpoints

Traffic Manager performs health checks on your endpoints. You can configure:

Example Scenario: Performance Routing

Imagine you have your web application deployed in both the East US and West Europe Azure regions. To ensure the best performance for your users worldwide:

  1. Create a Traffic Manager profile.
  2. Select the Performance routing method.
  3. Add your web application endpoint in East US and your web application endpoint in West Europe.
  4. Configure health probes.

Now, users in North America will be routed to the East US endpoint, and users in Europe will be routed to the West Europe endpoint, providing them with the lowest latency.

Considerations

For detailed configuration and advanced scenarios, please refer to the official Azure Traffic Manager documentation.