Performance acceleration with Azure Traffic Manager

Azure Traffic Manager 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.

The job of Azure Traffic Manager is to route traffic globally based on flexible policies, enabling an excellent user experience that aligns with how you’ve structured your application across the world

Traffic Manager works at the DNS level. It uses DNS responses to direct end-user traffic to globally distributed endpoints. Clients then connect to those endpoints directly.
Azure Traffic Manager has various benefits:-

Increase App Performance: Increase the performance of applications with 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).

Understanding endpoints
One of the key terms used throughout the Traffic Manager service is endpoint. Essentially, an endpoint is an instance of your site or service with a public DNS that Traffic Manager can direct Web traffic to. It is important to compile list of all the instances of your website or service to envision how they will translate into Traffic Manager’s three types of endpoint: Azure, external and nested. Azure-hosted instances will serve as Azure endpoints. Instances hosted outside of Azure, whether on-premises or with another host, will serve as external endpoints. As a third option, you can combine multiple Traffic Manager profiles to create nested endpoints.

Note: in order for Traffic Manager to work properly, all of your endpoints either have to be static pages delivering the same content to the user, or they each need to have access to a shared database. Otherwise, changes that users make using your web service at one endpoint will not be coordinated with changes that users make at another endpoint.

Choosing a DNS nameWhen creating a Traffic Manager profile, you will need to choose a unique name with the following format:

example.trafficmanager.net
This will become the DNS name used when connecting to your Traffic Manager profile, albeit through an alias of your choice, given that all of the Web traffic routing takes place at the DNS level. Once your user’s local DNS server finds your Azure DNS server, the Azure DNS server will select an endpoint to direct the user to, according to the traffic-routing method you’ve chosen.

Note: once you are ready to go live with Traffic Manager, do not forget to update your DNS records to reflect the change above.

Choosing a traffic-routing method

Traffic manager allows you to choose from four traffic-routing methods. You can only choose one traffic method per profile. However, you can create multiple profiles, then combine them for sophisticated traffic routing. This is referred to as nesting your profiles. Note that all traffic-routing methods involve Traffic Manager endpoint health checks and automatic failover.

Choosing a health-check frequency

One of the most important factors to consider when configuring your Traffic Manager settings is the amount of time that the service caches DNS responses it receives from your endpoints. Known as the time-to-live (TTL) for a DNS record, in the context of Traffic Manager this value represents the time that elapses between each of the service’s endpoint health checks. The shorter the TTL, the higher the frequency of checkups and the more effective Traffic Manager will be at routing traffic away from endpoints that have gone down or are otherwise unresponsive. However, it’s not always wise to reduce the TTL to the lowest possible period to approximate real-time health-checks. This is because the more health checks Traffic Manager performs, the higher the cost to your company under Traffic Manager’s pay-as-you-go pricing structure. So as you experiment with Traffic Manager’s benefits, you will want to choose a health-check frequency that strikes a good balance between affordability and optimal traffic routing.

The underlying process

Once you’ve completed your Traffic Manager profile, added your endpoints, and updated your DNS records, Traffic Manager will begin routing your traffic. Here’s how it works:

  1. The user navigates to (or otherwise tries to access) your URL: example.com
  2. The user’s local DNS redirects them to an alias for example.trafficmanager.net, your Traffic Manager profile, which resides in the Azure cloud.
  3. Traffic Manager selects an endpoint to direct the user to, based on your chosen traffic-routing method.
  4. Traffic Manager relays the IP address for the selected endpoint back to the user’s device.
  5. The user’s device connects directly to the endpoint.

Leveraging Traffic Manager to achieve optimal traffic flowsAs outlined above, Azure Traffic Manager shares some similarities with a traditional load balancer. However, Azure’s sophisticated, cloud-based solution works at the DNS level to allow your users to connect directly to the selected endpoint. Once you’re ready to get started, it’s time to set up a Traffic Manager profile with a unique DNS name; choose a traffic-routing method (priority, weighted, performance, or geographic); add your Azure, external and hybrid endpoints; and choose an affordable and effective health-check frequency. Finally, when you’re ready to go live with this powerful service, simply update your DNS records, then watch Traffic Manager begin routing each of your users to the destination that’s best for them and your business.