Traffic Manager profiles
Within a Traffic Manager profile, you can only configure one traffic routing method at a time. You can select a different traffic routing method for your profile at any time. Your changes will be applied within a minute without any downtime.
All Traffic Manager profiles have health monitoring and automatic failover of endpoints.
Nested Traffic Manager profiles
As mentioned earlier, each Traffic Manager profile can only specify one traffic-routing method.
However, you may have scenarios that require more complicated traffic routing than the routing that can be provided by a single Traffic Manager profile. In these situations, you can combine traffic routing methods by using nested Traffic Manager profiles to gain the benefits of multiple traffic-routing methods.
Nested profiles enable you to override the default Traffic Manager behavior to support larger and more complex traffic-routing configurations for your application deployments.
Example: combining 'performance' and 'weighted' traffic routing methods using nested profiles
Suppose that you deployed an application in the following Azure regions:
- West US, West Europe, and East Asia.
- You use the Performance traffic-routing method to distribute traffic to the region closest to the user.
But what if you wanted to test an update to your service before rolling it out more widely, and you wanted to use the Weighted traffic-routing method to direct a small percentage of traffic to your test deployment?
You would set up the test deployment alongside the existing production deployment in West Europe.
As you just learned, you cannot combine both the Weighted and Performance traffic-routing methods in a single profile. Therefore, to support this scenario, you would create a Traffic Manager profile using the two West Europe endpoints and the Weighted traffic-routing method. Then you would add this child profile as an endpoint to the parent profile. The parent profile would still use the Performance traffic-routing method and would contain the other global deployments as endpoints.
The diagram below illustrates this example scenario:
With the above configuration, traffic directed via the parent profile (using the Performance routing method) distributes traffic across regions normally.
While, within West Europe, the nested child profile (using the Weighted routing method) distributes traffic to the production and test endpoints according to the weights assigned.
When the parent profile uses the Performance traffic-routing method, each endpoint must be assigned a location, which is done when you configure the endpoint. Choose the Azure region closest to your deployment.
Configuring Traffic Manager profiles
This example shows how to create and configure a new Traffic Manager profile to direct client traffic based on endpoint priority.
From the Azure portal home page, select Create a resource. In the search box, query for 'Traffic Manager profile', and then click Traffic Manager profile.
You need to enter the following information on the Create Traffic Manager profile page:
Field
Information
Name
- Enter a unique name for the Traffic Manager profile.
Routing method
- Select the routing method to use in this profile.
Subscription
- Select the subscription from the list that you want this profile to be applied to.
Resource group
- Select the appropriate resource group from the list or create a new one.
Resource group location
- The Azure Traffic Manager service is global and not bound to a location.
- This setting refers to the location of the selected resource group and has no impact on the runtime availability of your Traffic Manager profile.
Click Create to create the profile.
The next step is to add endpoints to the Traffic Manager profile.
From the Azure portal home page, select All resources, then select the Traffic Manager profile from the list.
On the Traffic manager profile page, under Settings, select Endpoints, then click Add.
You then enter the required information on the Add endpoint page.
Field
Information
Type
- Select the type of endpoint to add.
- You can select from the following endpoint types:
- Depending on which endpoint type you select here, the remaining options will differ.
- Azure endpoints
- External endpoints
- Nested endpoints
- Depending on which endpoint type you select here, the remaining options will differ.
Name
- Enter a unique name for the endpoint.
Target resource type (for Azure endpoints only)
- If you select the Azure endpoint type, you can select from the following resource types:
- Cloud service
- App Service
- App Service slot
- Public IP address
Target resource (for Azure and Nested endpoints only)
- Select the appropriate target service, IP address, or profile from the list.
- The available options will differ depending on which endpoint type and target resource type are selected above.
fully qualified domain name (FQDN) or IP (for External endpoints only)
- Specify the FQDN or IP address for the external endpoint.
Priority
- Specify the priority for this endpoint.
- If you enter 1, then all traffic goes to this endpoint when it's healthy.
Minimum child endpoints (for Nested endpoints only)
- Specify the minimum number of endpoints that must be available in the child Traffic Manager profile for it to receive traffic.
- If the available endpoints in the child profile falls below this threshold, this endpoint will be considered as degraded.
Custom Header setting (optional setting)
- You can configure custom headers for your endpoint, using the following paired formatting:
- host:contoso.com,customheader:contoso
- The maximum number of supported pairs is 8, and they are applicable for both the HTTP and HTTPS protocols.
- These endpoint Custom Header settings override the settings configured in a profile.
Add as disabled (optional setting)
- Disabling an endpoint in Traffic Manager can be useful to temporarily remove traffic from an endpoint that is in maintenance mode or being redeployed.
- Once the endpoint is running again, it can be re-enabled.
Click Add to add the endpoint to the Traffic Manager profile.
If you are adding a failover endpoint for another Azure region, then you would add another endpoint for that region. This would point to the application target resource in the other region and would have a priority setting of 2.
When you add endpoints to a Traffic Manager profile, their status will be checked.
Once they have been checked their Monitor status changes to Online.