What is Windows Azure Traffic Manager and How it Works

Introduction

In this article I will first explain what the Windows Azure Traffic Manager is along with how it works. We will look into the benefits of the Traffic Manager and some scenarios for its use. The Traffic Manager is all about your deployment and configuration so there is not any Demo / Sample code. I have explained all of this with screen shots.

Windows Azure Traffic Manager

Traffic Manager Name is itself self-explanatory. It allows users to control the distribution of user traffic of deployed Azure cloud services, Azure websites or any other endpoint. In this the distribution of traffic includes Azure cloud services, Azure web sites and other endpoints. There are 3 different load balancing methods provided by Azure. The Traffic Manager works by applying an intelligent routing policy engine to the Domain Name Service (DNS) queries on your domain names and maps the DNS routes to the appropriate instances of your applications.

Benefits of Azure Traffic Manager

  • Increase Performance: Can increase performance of your application that includes faster page loading and better user experience. This applies to the serving of users with the hosted service closest to them.
  • High Availability: You can use the Traffic Manager to improve application availability by enabling automatic customer traffic fail-over scenarios in the event of issues with one of your application instances.
  • No Downtime Required for Upgrade / Maintenance: Once you have configured the Traffic Manager you don't need downtime for application maintenance, patch purgation or complete new package deployment.
  • Easy to configure (Quick Setup): it's very easy to configure Azure Traffic Manager on Widows Azure portal. If you have already hosted your application on Windows Azure (a cloud service, Azure website) you can easily configure this Traffic Manager with a simple procedure (setting routing policys).

For this simple demo you need to be ready with the following check list.

How to Configure Azure Traffic Manager

1.
Login into the Azure portal using your login credentials. Once you are in go to the Traffic Manager then go to the Traffic Manager Option from the left panel.



2. Click on the "Create" option below the pane to create the Traffic Manager.

Click Create -> Network Services -> Traffic Manager -> Quick Create then enter the following details.

  1. DNS Prefix: it should be unique (for example yourdnsname.trafficmanager.net).

  2. Load Balancing Method: select the appropriate load balancing method from the drop down.


There are 3 load balancing methods

Performance: Direct Traffic to “Closest” service based on Network

In order to balance the load of the cloud services and websites (endpoints) located in multiple datacenters across the globe (also known as regions), you can direct incoming traffic to the endpoint with the lowest latency from the requesting client. Typically, the datacenter with the lowest latency corresponds to the closest in geographic distance.

Round-Robin: Distribute traffic equally across all services

A common load balancing pattern is to provide a set of identical endpoints that include cloud services and websites and that sends traffic to each in a round-robin fashion.

Failover: Direct traffic to the “backup” service if the primary service fails.

It does this by providing backup services in case their primary service goes down. A common pattern for service failover is to provide a set of identical services and send traffic to a primary service, while maintaining a configured list of one or more backup services.



Once you select the appropriate load balancing method, click on the “create” button. It will create a Traffic Manager service for you. For reference see the following screen.



3. Add End points for Traffic Manager

Add end points of your cloud service or Azure web site for which you need to create a Traffic Manager.



Once you complete the task of adding endpoints it will update your message, Updating the endpoints for Traffic Manager profile … “”.




4. Configure Traffic Manager

In the Configure tab, you will find the following options:

  1. DNS Name: This is read only entry, it's the DNS name of your Traffic Manager.

  2. DNS Time to Live: Default: 300 seconds.

    This value controls how often the client's local caching name server will query the Traffic Manager system for updated DNS entries. Any change that occurs with the Traffic Manager, such as load balancing method changes or changes in the availability of added endpoints, will take this period of time to be refreshed throughout the global system of DNS servers.

  3. Load Balancing Method

    Performance: Use this method when your endpoints are deployed in multiple geographic locations and you want to use the one with the lowest latency.

    Failover: Use this method when a primary endpoint is selected to serve all the traffic, but backups are required in case the primary or the backup endpoint go offline.

    Round Robin: Use this method when you want to distribute traffic equally across a set of endpoints.

  4. Monitoring Setting

    The Traffic Manager can monitor your services to ensure they are available. For monitoring to work correctly, you must set it up the same way for every endpoint within this profile. You can specify this protocol, the port and the relative path. The Traffic Manager will try to access the file specified in the relative path via the defined protocol and port to check for uptime.


Test Azure Traffic Manager

Once you have completed these steps of Traffic Manager configuration you can test your Traffic Manager with the following procedure:

  • Browse your Traffic Manager URL (for example Trafficmngdemp.trafficmanager.net).
  • It will redirect you to any one of the instances.
  • Now for testing the failover Load balancing method. Shout down your one cloud service / web site instance from the Azure portal manually.
  • Once you confirm that one instance is down, browse to the Traffic Manager URL (for example Trafficmngdemp.trafficmanager.net), it should redirect you to another available instance of your cloud service / web site.
Delete Traffic Manager Profile

It's simple, just select your Traffic Manager profile and go to the dashboard option. You will have the Delete option as below. Click on Delete.



Up Next
    Ebook Download
    View all
    Learn
    View all