We will create 3 web apps & host on 3 difference datacenter or region. With the help of traffic manager we will associate all 3 web app. User will type web app address in browser at that time in backend traffic manager automatically will check all the possibility & run the web app according to methods.
Step 1: Navigate to Azure Management Portal & Sign in with Azure Subscription credentials.
Step 2: Click on +New -> COMPUTE -> WEB APP -> QUICK CREATE
Enter URL like webappname-region for understanding purpose only.
Ex.wa-eastus
First Web App in East US is created successfully
Step 3: Now Download the Publish Profile of this website upload one index page on Azure. Here we will upload one image & one html page.
1st Web App – East Us – index.html
http://wa-eastus.azurewebsites.net
For uploading html or any file on Azure different options available like any FTP Client(FileZilla) or File Explorer also will work here.
After uploading image & html web app will display like as below:
Step 4: Now again create second web app with new app service plan & new region or location.
2nd Web App - Japan West - index.html
http://wa-japanwest.azurewebsites.net/
Step 5: Same as second please create 3rd Web App in North Europe region or location.
3rd Web App – North Europe – index.html
http://wa-northeurope.azurewebsites.net/
Step 6: Click on first web app change select SCALE tab. Change the App Service Plan Tier from FREE TO STANDARD & save the settings.
Same steps perform for all 2 remaining web app.
Note: Only Standard web app are eligible for Traffic Manager.
Step 7: Scroll down the Azure feature & select TRAFFIC MANAGER. Create a new Traffic Manager profile.
+ New -> NETWORK SERVICES -> TRAFFIC MANAGER -> QUICK CREATE -> EnterDNS prefix of traffic manager & choose LOAD BALANCING METHODS. Currently 3 load balancing methods available: Performance, Round Robin / Priority, Failover.
Available Traffic Manager Profiles
Performance – Use this method when your endpoints are deployed in different geographic locations and want to use the one with the lowest latency. When this method is used, ATM will send users to the region where he or she will get the best performance. This prevents situations where, for example, a user who is in the Central US region is directed to a site running in West Europe.
Round Robin /Weighed – Use this method when you want to distribute traffic equally across a set of endpoints. This method will evenly distribute traffic across the endpoints configured in your ATM profile using a round robin load balancing methodology. You can use this method, for example, to “ramp up” traffic to a particular endpoint without allowing it to receive all of your traffic immediately. (In the future, ATM will include enhanced functionality to make this kind of scenario even easier to configure.)
Failover – Use this method when a primary endpoint is selected to serve all the traffic but backups are required in case the primary or the backup endpoint go offline. The endpoints can be in the same data center or in different data centers. This method will redirect traffic to a secondary region if there is a problem in the primary region. For example, you may have a site in a “backup” region that doesn’t handle any traffic unless your primary site is offline for some reason.
Traffic Manager current status will be inactive because we cannot setup any Endpoint.
Step 8: Open traffic manager then choose ENDPOINTS tab & click on ADD ENDPOINTS.
Change Service Type to Web App because we are working with Web App. If you have created Cloud Service, then select Cloud Service as a service type.
All Standard tier web apps listed here. Select Service endpoints.
Wait for few minutes to configure all endpoints or refresh the page after some time.
Step 9: Now open traffic manager url dnsname.trafficmanager.net in browser.
Ex. wa-atm.trafficmanager.net
We selected Performance load balancing methods so it will check all the options & then one of the web app with region name will open.
Another way for testing Traffic manager how it will work. Open https://www.whatsmydns.net/