Wednesday, 18 March 2015

How to test your Azure Traffic Manager settings

   By Debra Littlejohn Shinder



The more traffic you have, the more important traffic management becomes. When motor vehicles first appeared on the roads, they were few and far between and little management was necessary. Yet today traffic control devices are essential to prevent accidents and traffic jams. Likewise, today’s oft-overburdened networks carry data packets from hundreds or thousands of endpoints across routers and switches and through gateways, making traffic management a necessity to ensure performance and reliability.

Microsoft Azure Traffic Manager is a tool designed to work with Microsoft’s cloud operating system to enable you to control the way traffic is distributed to Azure cloud services, web sites and other endpoints that you specify by applying policies to DNS queries. This can result in significant improvement to availability, performance and responsiveness – all of which can be concerns when working with cloud services over an Internet connection, especially for those who are used to the high speed of today’s local networks.

Traffic Manager is deployed in association with an Azure subscription, after which you can add your endpoints, select a monitoring configuration and load balancing method, then create a profile and configure the settings. You can configure Traffic Manager settings in the Management Portal, by using REST APIs or using PowerShell. You can also create nested profiles, which refers to a setup where you have another Traffic Manager profile as an endpoint.

For more information about how to control network traffic distribution with Azure Traffic Manager, be sure to check out Richard Hicks’ article over on CloudComputingAdmin.com.

Before you get that far, though, you might want to test your Traffic Manager settings after configuring them. To do that, first make sure that you set DNS TTL to a low value, such as 30 seconds, so that the changes you make will be quickly propagated and you won’t have to wait to see the results.

You can check your Traffic Manager profile using the common nslookup utility:

  1. Open an administrative command prompt window.
  2. Enter ipconfig /flushdns to flush the DNS resolver cache.
  3. Enter nslookup <Traffic Manager domain name>

Examine the results returned from this command. This should show the DNS name and IP address of the DNS server that you’re using to resolve the domain name. It will also show the Traffic Manager domain along with the IP address to which it resolves. The second IP address shown should be a public virtual IP (VIP) address that is assigned to one of the cloud services or web sites you’ve configured as an endpoint in Traffic Manager.

Now, to test your failover load balancing method, follow these steps:

  1. With the endpoints up, using a single client, use the nslookup tool to request DNS name resolution of your company domain name. The resolved endpoint should be for your primary endpoint.
  2. Either take down your primary endpoint or remove the monitoring file (this will make it appear to be down to Traffic Manager).
  3. Wait now for the DNS TTL plus two minutes to pass.
  4. Now flush the DNS client cache as described above.
  5. Request DNS resolution again. This time the IP address returned should be for your secondary endpoint.
  6. Take down the secondary endpoint and repeat the process for each of the endpoints. The key here is to be sure that the DNS resolution request comes back each time with the IP address of the next endpoint on your list.

If you’re using the round robin load balancing method, the steps to test are a little different. The first step is the same, but the endpoints won’t be in order. Make sure you get back the IP address of one of the endpoints on your list, then flush the DNS cache and repeat to get a different address from your list, and so forth, until the IP addresses for all of your endpoints have been returned.


Author Profile

Debra Littlejohn Shinder, MCSE, MVP (Security) is a technology consultant, trainer and writer who has authored a number of books on computer operating systems, networking, and security.

She is also a tech editor, developmental editor and contributor to over 20 additional books. Her articles are regularly published on TechRepublic's TechProGuild Web site and WindowSecurity.com, and has appeared in print magazines such as Windows IT Pro (formerly Windows & .NET) Magazine.