Demostrating Traffic Manager Configuration

In this demonstration, you will see how to:

  1. Use PowerShell to test whether a given traffic manager profile URL is available.
  2. Create a new traffic manager profile, by using PowerShell.
  3. Add an endpoint to a traffic manager profile, by using the portal.

Configuring demonstration steps

Step 1. In the Microsoft Azure PowerShell, type the following command and then press Enter:

    Test-AzureTrafficManagerDomainName –DomainName

If the command returns true, you can use this domain for this demonstration. If the command returns false, try other domain names within

Step 2. Type the following command and then press Enter:

    New-AzureTrafficManagerProfile –Name DemoProfile 
    –DomainName "" – 
    LoadBalancingMethod Performance –MonitorPort 80 
    –MonitorProtocol Http –MonitorRelativePath "/" –ttl 60

Azure configures and returns the new traffic manager profile.

Step 3. In Internet Explorer, in the navigation on the left, click Traffic Manager.

Step 4. Click the traffic manager profile you created. If the profile is not visible, refresh the page.

Step 5. Click ENDPOINTS.

Step 6. Click ADD ENDPOINTS.

Step 7. In the SERVICE TYPE drop-down list, click Web Site.

Step 8. In the list of websites, select the website you created.

Step 9. Click the Complete icon.

Traffic Manager Advanced Features

Traffic Manager has some advanced features that can be only be enabled and configured from PowerShell at the time of writing. These advanced features broaden the reach of Traffic Manager and enable greater load balancing flexibility.

  1. External Endpoints

You can add an endpoint to a Traffic Manager profile, even if that endpoint is external to Azure. You will add instances of the website in Azure. If the Azure instances fail, you can build this configuration by adding the ISP-hosted website as an external endpoint to the Traffic Manager profile, which also includes the Azure websites as endpoints.

To configure an external endpoint, use the Add-TrafficManagerEndpoint cmdlet and specify the value “Any” for the Type parameter. If you are adding the external endpoint to a Traffic Manager profile that uses Performance load balancing, then you must also specify an Azure region by using the Location parameter.

Adding an External Endpoint

    $profile = Get-AzureTrafficManagerProfile -Name "AdatumMainWebsite"
    Add-AzureTrafficManagerEndpoint -TrafficManagerProfile 
    $profile -DomainName "" -Status
    "Enabled" -Type "Any" -Location "North Europe" | Set-AzureTrafficManagerProfile
  1. Weighted Round Robin Load Balancing

If you choose round robin load balancing for your Traffic Manager profile, Traffic Manager distributes load approximately equally between endpoints. If there are three endpoints in the profile, one third of Traffic Manager responses will forward requests to the first endpoint. An equal proportion of responses will forward requests to the second and third endpoints.

Sometimes, however, you would prefer an unequal distribution of traffic. For example, if one endpoint is a website in the standard tier, it can be scaled more easily than a website in the basic tier . For such situations, you can bias the distribution of load, by specifying a weight for each endpoint. Endpoints with larger weights receive more traffic. Weights can be specified between 1 and 1000. All endpoints have a default weight of 1.

Adding a Weighted Endpoint

$profile = Get-AzureTrafficManagerProfile -Name "Infoweb14Website"
Add-AzureTrafficManagerEndpoint -TrafficManagerProfile $profile -DomainName 
"" -Status "Enabled" -Type "Website" 
-Weight 70 | Set-AzureTrafficManagerProfile
  1. Nested Profiles

In most cases a Traffic Manager endpoint is either a website, a PaaS cloud service, or a VM in an IaaS cloud service . However, you can also specify a Traffic Manager profile as an endpoint . This creates a nested profile, in which a parent profile contains one or more child profiles.

You can use this technique to increase the flexibility of load balancing. For example, you could set up a parent profile that uses Performance load balancing to distribute load over several endpoints around the world. Client requests would be sent to the endpoint closest to the user. Within one of those endpoints, you could use round robin load balancing in a child profile to distribute load equal between two websites.

To set up nested profiles, create the parent and child profiles separately and configure their endpoints. Then add the child profile as an endpoint to the parent profile, specifying the parameter Type = “TrafficManager” in PowerShell.

Nesting Traffic Manager Profiles

$parent = Get-AzureTrafficManagerProfile -Name "Infoweb14Websites"
$child = Get-AzureTrafficManagerProfile -Name "EuropeRoundRobinWebsites"
$parent = Add-AzureTrafficManagerEndpoint -TrafficManagerProfile $parent -DomainName
"" -Status "Enabled" -Type "TrafficManager" -Location "North Europe"
Set-AzureTrafficManagerProfile -TrafficManagerProfile $parent