DNS Geographic Routing: Azure Traffic Manager

Introduction

In order to reduce latency and resource cost, website maintainers usually deploy their web service on servers located in separate geographic areas. However, since it’s a relatively inconvenient task for users to manually decide which server they should connect to, developers might desire a solution which could automatically allocate users according to their location.

Recently, as the developer of Encrypted-DNS project, I’m using Azure Traffic Manager to address the concern I mentioned above because the latency of DNS queries plays an essential role in users’ experiences. For instance, my DNS service is currently running on two separate computing engines provided by Google Cloud Platform, which locate in both the United States and Taiwan. Therefore, for users located in Asia, all of their DNS queries will be directed to the server in Taiwan; for users in other areas, their queries will be sent to the server in the United States.

Setup Guide

Create a Traffic Manager profile

Go to Azure Portal, navigate to Traffic Manager profiles, and then click on ‘Add new’ button to create a routing profile. Provide a name for the profile, which will be added to the CNAME record of your domain, set ‘Routing method’ to ‘Geographic’, and set resource group and subscription.

Setup endpoint

After successfully creating the routing profile, navigate to Traffic Manager profile page and you will see the details. To add your server, select the profile you have added and click on ‘Add endpoint’. If your server is provided by Azure, you should set the type of the endpoint to ‘Azure endpoint’ and then select your service. By contrast, you may select ‘External endpoint’ and specify the domain name or IP address of your server.

Subsequently, you have to set the regional grouping of the server you selected above:

  1. World – any region
  2. Regional Grouping – Africa, Middle East, Australia/Pacific, etc.
  3. Country/Region – Ireland, Peru, Hong Kong SAR, etc.
  4. State / Province – USA–California, Australia–Queensland, Canada-British Columbia, etc. (Note:  This granularity level is supported only for states / provinces in Australia, Canada, UK, and USA)

Add DNS record

After creating all the endpoint, add a CNAME record of the name of your Traffic Manager profile such as ‘encrypted-dns.trafficmanager.net’ to your domain. To cost price, you should view the Traffic Manager Pricing page.

Published by

Siujoeng Lau

Liberty will never perish.

Leave a Reply

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