Configuring Azure Traffic Manager using Performance Based Routing Method

Microsoft Azure Traffic Manager is a DNS load-balancing solution in Azure. It controls the distribution of user traffic for service endpoints in different datacenters. Service endpoints supported by Traffic Manager include Azure VMs, Web Apps, and Cloud services etc. Traffic Manager uses the Domain Name System (DNS) to direct client requests to the most appropriate endpoint based on a traffic-routing method and the health of the endpoints.

It distributes traffic based on the below load balancing method:

  • Priority – which routes all traffic will be routed to primary end point unless it fails.
  • Performance – which routes the traffic to the closet endpoint by measuring network latency.
  • Weighted – which distributes traffic based on weight. Higher is the weight, higher the routed traffic to the end point.
  • Geographic – users are directed to specific endpoints based on their geographic location from where the DNS query originates from.

Here, you will create Azure Traffic Manager based on Performance based routing method:

  1. Create a Web App in Southeast Asia and East Asia.
  2. Create a Traffic Manager profile.
  3. Configure Traffic Manager.
  4. Add Endpoints in Traffic Manager Profile.
  5. Load balance between Southeast Asia and East Asia.

Step 1: Create a Web App in Southeast Asia

1. Sign in to the Azure portal. On the toolbar to the left, click New, select the Web + Mobile link, and then click Web App.

2. On the Web App blade, in the App name text box, type a unique and valid name MSSERVERPROWebAppSA. If the name is unique and valid, a green check mark appears. In the Resource Group, select Use existing resource group name and select MSSERVERPRO-TMRG01. Click Windows. Click App Service plan /Location. On the App Service plan blade, click Create New.

3. On the New App Service Plan blade, in the App Service plan text box, type In the Location drop down list, select an Azure region Southeast Asia in the location. In Pricing tier, select S1 Standard, and then click Select. On the New App Service Plan blade, click OK.

4. On the Web App blade, leave the Application Insights setting at its default value. On the Web App blade, click Create. Wait until the web app is provisioned.

Related Post  Extend Azure Virtual Machine OS drive using Azure Portal

Create a Web App in East Asia

1. On the toolbar to the left, click New, select the Web + Mobile link, and then click Web App.

2. On the Web App blade, in the App name text box, type a unique and valid name MSSERVERPROWebAppEA. If the name is unique and valid, a green check mark appears. In the Resource Group, select Use existing resource group name and select MSSERVERPRO-TMRG01. Click Windows. Click App Service plan /Location. On the App Service plan blade, click Create New.

3. On the New App Service Plan blade, in the App Service plan text box, type In the Location drop down list, select an Azure region East Asia in the location. In Pricing tier, select S1 Standard, and then click Select. On the New App Service Plan blade, click OK.

4. On the Web App blade, leave the Application Insights setting at its default value. On the Web App blade, click Create. Wait until the web app is provisioned.

Step 2: Create Traffic Manager Profile

1. On the hub menu to the left, click New, click Networking, and click Traffic Manager Profile.

2. On the Create Traffic Manager profile blade, in the Name text box, type MSserverProPer in the net DNS namespace that will identify the profile. In the Routing method drop-down list, select Performance. In the resource group select use existing resource group for the Traffic Manager profile. Click Create. Wait until the Traffic Manager profile is create.

3. After you have created the Traffic Manager profile, navigate to it in the Azure portal.

Step 3: Configure Traffic Manager

1. Go to Resource groups blade, click on MSSEVERPRO-TMRG01 Resource groups.

2. In the Resource group, MSSERVERPRO-TMRG01 Overview, click on Traffic Manager profile,MSserverProPer.

3. In the Settings blade, click the Configuration In the Configuration blade, in the DNS time to live (TTL) text box, modify the original settings, and then type 30. In the Routing Method drop-down list, select Performance. On the command bar at the top, click Save.

Step 4: Add Endpoints in Traffic Manager Profile

1. In the Traffic Manager Profile blade, in the Settings blade, click Endpoints. In the Endpoints blade, click Add.

Related Post  Configuring Azure VNet Peering by using the Azure Portal

2. In the Add endpoint blade, in the Type drop-down list, select Azure endpoint. In the Name text box, type the name of your web app, In the Target resource type drop-down list of websites, select App Service. Click Choose an app service. In the Resource blade, select the web app that you created before, MSSERVERPROWebAppSA.

3. Click OK to add the endpoint.

4. Repeat steps 1 through 3 to add a second endpoint for the web app that you created. In the Endpoints blade, click Add.

5. In the Add endpoint blade, in the Type drop-down list, select Azure endpoint. In the Name text box, type the name of your web app, In the Target resource type drop-down list of websites, select App Service. Click Choose an app service. In the Resource blade, select the web app that you created before, MSSERVERPROWebAppEA. Click OK to add the endpoint.

6. In the Endpoints blade, make sure that both endpoints are added and Online in MONITOR STATUS.

Step 5: Load balance between Southeast Asia and East Asia

1. In the browser, in the Azure Portal, in the MsserverProPer Traffic Manager blade, click the link under the DNS name section copy the link http://msserverproper.trafficmanager.net.

2. Open the new tab in the browser, past the link http://msserverproper.trafficmanager.net and make sure that “Your App Service app is up and running”.

Copy the FTP address of Web App Service to upload custom website:

1. In the App’s resource page, select Overview in the left menu, then click the Web App that you want to copy the FTP address link.

2. In the App Services Overview blade, click to FTP/hostname click to Copy FTP address of Southeast Asia an East Asia ftp addresses.

Add Deployment Credentials

Local Git and FTP can’t authenticate using the credentials used for the portal. Create a new username and password to use with those deployment methods. This username and password will be the same across all apps in all subscriptions associated with your Microsoft Azure account. In the Azure portal, perform the following steps:

1. On the MSSERVEPROWebAppSA Web App blade, click Deployment credentials. On the Deployment credentials blade, in the FTP/deployment username text box, type the name of the user you intend to create. In the Password text box, type the password. In the Confirm password text box, type the same password, and then click Save.

Related Post  Configuring a Point-to-Site Connection to a VNet using Azure Portal

Deploy files to Azure by using FTP

From the FTP client, use the connection to connect to your web app. Once connected you will see the screen below. Expand the folder and then expand site folder until you will see /site/wwwroot directory in Azure. You will drag index.html file from your computer to wwwroot folder. You can now see index.html file. Do this on both Azure site.

Do the same in East Asia region

Let’s go to Traffic Manager

1. Open a web browser with the URL representing the Traffic Manager Verify that a browser displays Greetings from Nepal, MSSERVERPRO web app Access from Southeast Asia.

Now Bring down Southeast Asia Web App

1. In the MSSERVERPROWebAppSA Web App blade, click Stop to bring down Southeast Asia Web App.

2. On the Stop web app dialog box, click Yes to stop MSSERVERPROWebAppSA Web App.

3. Make sure your app is stopped.

4. Open a web browser with the URL representing the Traffic Manager Verify that a browser displays Greetings from Nepal, MSSERVERPRO web app Access from East Asia.

 

 

Summary:

You have completed configuration of the Traffic Manager profile with two endpoints including creation of Web Apps and the performance based routing method. Here, you can verify its normal operations and test the failover process by stopping Web App service in Southeast Asia and Web App service run from East Asia. This indicates global load balancing with Traffic Manager. I hope this article will help in Configuring Azure Traffic Manager using Performance Based Routing method.

 

4 comments

Leave a Reply

Your email address will not be published. Required fields are marked *