we will configure the Traffic Manager to direct traffic to the closest instanced based on latency.
Step 1: Create a Traffic Manager Profile
- In the Azure portal, navigate to Traffic Manager
- Click Create a Traffic Manager Profile. or at the bottom of the portal click New, click Network Services, click Traffic Manager, then click Quick Createto begin configuring your profile.
- Configure the DNS prefix. Give your traffic manager profile a unique DNS prefix name. You can specify only the prefix for a Traffic Manager domain name. Select the appropriate subscription and select the load balancing method. Select the load balancing method. For more information about load balancing methods, see About Traffic Manager Load Balancing Methods. and Click “Create” to create your new profile.
- When the profile configuration has completed, you can find the newly created profile in the Traffic Manager pane in the Management Portal
Step 2: Add a Cloud Service or Website Endpoint to the Profile
- In the portal in the Traffic Manager page , click the Endpoints tab to view the endpoints
- At the bottom of the page, click Addto access the Add Service Endpoints dialogue box. It will lists the cloud services in your subscription under Service Endpoints. In our case we are running our App in VMs contained by Cloud Service. So we will select the cloud services in the list to enable them as endpoints for this profile. If we had Azure websites, we would click the Service Type dropdown, and then select Website.After you select the endpoints for this profile, click the checkmark on the lower right to save your changes.
- In the configure tab, you will find the DNS Name you gave your profile (in case you forgot what you entered)To point your company domain name to a Traffic Manager domain name, modify the DNS resource record on your Internet DNS server to use the CNAME record type, which maps your company domain name to the domain name of your Traffic Manager profile. for example:
www.contoso.com IN CNAME canitprocampapp.trafficmanager.net
Step 3: Test the Profile
To test our profile I connected to all my VMs and edited the logo on each server to show a specific tag
1 and 2 are the 2 instances in the “East US” zone, Central 1 and 2 are in the “Central US” zone.
from Ottawa, Ontario I opened a browser and navigated to http://CanITProCampApp.trafficmanager.net and got the following result:
I asked one of my coworkers in Vancouver BC to do the same and he got the following result:
No comments:
Post a Comment