Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

An Overview of Azure Traffic Manager

  • February 12, 2019
  • 12 min read
IT Production Manager. Nicolas is primarily focused on Microsoft technologies, he is a Microsoft MVP in Cloud and Datacenter Management.
IT Production Manager. Nicolas is primarily focused on Microsoft technologies, he is a Microsoft MVP in Cloud and Datacenter Management.

azure traffic manager

azure traffic manager (ATM)

Introduction

Azure Traffic Manager (ATM) is a great Azure service to distribute user traffic to service endpoints in different datacenters. Different routing methods can be used:

  1. Performance: It routes the traffic to the fastest responsive node.
  2. Priority: it routes the traffic to a specific node if the node goes down.
  3. Weighted: It routes the traffic based on the weight assigned to each node.
  4. Geographic: It routes the traffic to specific nodes based on the source location.
  5. Subnet: It routes the traffic to a specific node based on an IP address range.
  6. Multivalue: It routes the traffic to a specific number of nodes. It will return multiple IPv4 or IPv6 endpoints.

 

The term “Endpoints” refers to the nodes across which the traffic load balancing occurs. Endpoints can be Azure Virtual Machines, Web Apps, Cloud Services, and External non-Azure Endpoints.

Before going deeper, I just need to explain the difference between Azure Traffic Manager and Azure Load Balancer.

  • Azure Traffic Manager is to route the traffic globally based on defined policies. It can work across regions. Please note that Azure Traffic Manager will not “forward” the traffic. When a client requests a page or a website, the client will connect directly to the Endpoint (selected by the Azure Traffic Manager) but not through the ATM.
  • Azure Load Balancer is to route the traffic inside an Azure Region but not globally! It only works with Virtual Machines in the same region.

It means that Azure Traffic Manager will route the traffic to a specific Azure Region, then when the traffic will be inside the Azure Region, the Azure Load Balancer will route the traffic to a specific Virtual Machine (local failover).

In this article, I will use two Azure Web Apps to explain how to implement Azure Traffic Manager. So, let me explain how to create an Azure Web App.

Create an Azure Web App

Azure Web Apps are the compute resources for hosting your web application. The application code runs in a managed VM so that you do not need to manage the infrastructure. The code can be in any language or framework that is supported by Azure App Service, such as:

          • .NET
          • Node.js
          • PHP
          • Java
          • Python
          • HTML

In the Azure Portal, search for “Web App“:

search for "Web App"

Then, you must enter the following information:

          • The Web App name
          • Select your Azure subscription
          • Select a Resource Group or create a new one
          • Select the operating system (Windows or Linux)
          • Select the Azure App Service Plan
          • Select the language of your applicationweb app creating

Once the Web App is successfully created, you just have to open a browser and go to your Web App URL: to see the default home page.

default home page

You can easily deploy your website by creating FTP credentials. These credentials allow you to connect through FTP to your Web App in order to deploy your code.

Deployment Credentials

So, in my case, I created:

          • The first Web App is called “get-cmd1” and located in the US Region. I deploy a simple HTML file with basic information such as the Azure Location which is West Europe.
          • The second Web App is called “get-cmd2” and located in the West Europe Region. I deploy a simple HTML file with basic information such as the Azure Location which is Central US.

Create an Azure Traffic Manager Profile

Now, search for the “Traffic Manager profiles” in your Azure subscription:

Traffic manager profiles

Click “Add” to create a new Traffic Manager profile.

add a new profile

Type a friendly name, select a routing method, your subscription and to finish, select a Resource Group or create a new one.

Configure ATM Profile

Traffic Manager can monitor your services to ensure they are available. Of course, it is important to configure all your Endpoint the same way. Once the profile is created, check the “Configuration” panel.

In this case, I selected “Performance” to route traffic to the fastest Endpoint. The port number is 80 and the “Path” is a custom HTML file. Note that a forward slash “/” implies that the file is in the root directory.

You can customize other fields to suit your needs.

Configuration panel

Configure ATM Endpoints

We need to configure the Endpoints. Click “Endpoints” and “Add”:

Endpoints

Just a few words about Endpoints:

          • Azure Endpoints are used for services hosted in Azure.
          • External Endpoints are used for IPv4/IPv6 addresses, or, for services hosted outside Azure. These Endpoints can either be on-premises or with a different hosting provider.
          • Nested Endpoints are used to combine Traffic Manager profiles to create more flexible traffic-routing schemes.

At the beginning of the article, I created two Azure Web Apps. First, I add the Web App number one:

get-cmd 1

Then, repeat the previous step to add the second Web App:

get-cmd 2

It will show you the monitor status as “Checking endpoint”. Wait a moment, and it will change the status to “Online”. At this step, both Web App are ready to receive the traffic based on the routing method.

Checking endpoint

In order to test my Azure Traffic Manager profile, I deployed a Windows 10 Virtual Machine in the Central US Region which is the same location as my second Web App. I typed the DNS name in this machine’s browser, and I confirmed that the traffic was directed to the Web App located in the Central US Region because it was closer to this machine and the network latency suited that location.

Location

Here, you can test the “Priority” method. Add a priority number to both Web Apps:

Priority method

Here, you can test the “Weighted” method. Add a weight to both Web Apps:

Weighted method

Conclusion

Thanks to Azure Traffic Manager, you can “geo-route” incoming traffic to your website for better performance and availability. If you need to monitor your Azure Traffic, I advise you to use Azure Traffic View because it will help you to understand which regions have a large number of traffic.

More information about ATM pricing: https://azure.microsoft.com/en-us/pricing/details/traffic-manager/.

Thanks for reading!

Hey! Found Nicolas’s article helpful? Looking to deploy a new, easy-to-manage, and cost-effective hyperconverged infrastructure?
Alex Bykovskyi
Alex Bykovskyi StarWind Virtual HCI Appliance Product Manager
Well, we can help you with this one! Building a new hyperconverged environment is a breeze with StarWind Virtual HCI Appliance (VHCA). It’s a complete hyperconverged infrastructure solution that combines hypervisor (vSphere, Hyper-V, Proxmox, or our custom version of KVM), software-defined storage (StarWind VSAN), and streamlined management tools. Interested in diving deeper into VHCA’s capabilities and features? Book your StarWind Virtual HCI Appliance demo today!