Create a Traffic Manager profile
You will learn how to create a Traffic Manager profile in this article. You’ll learn about two different web applications. They’re all running in various Azure regions. Based on endpoint priority, you’ll develop a Traffic Manager profile. The profile routes user traffic to the web application’s principal site. The web application is constantly monitored by Traffic Manager. It offers automated failover to the backup site if the primary site is unavailable.
Create a Traffic Manager profile
Create a Traffic Manager profile that prioritises endpoints and channels user traffic accordingly.
- On the upper-left side of the screen, select Create a resource > Networking > Traffic Manager profile.
- In the Create Traffic Manager profile, enter, or select these settings:TABLE 1SettingValueNameEnter a unique name for your Traffic Manager profile.Routing methodSelect Priority.SubscriptionSelect the subscription you want the traffic manager profile applied to.Resource groupSelect myResourceGroupTM1.LocationThis setting refers to the location of the resource group. It has no effect on the Traffic Manager profile that will be deployed globally.
- Select Create.
Add Traffic Manager endpoints
Add the East US website as the primary destination for all user traffic. Also, make the West European website a failover destination. Traffic is automatically routed to the failover endpoint when the primary endpoint is unavailable.
- In the portal’s search bar, enter the Traffic Manager profile name that you created in the preceding section.
- Furthermore, Select the profile from the search results.
- In Traffic Manager profile, in the Settings section, select Endpoints, and then select Add.
- Enter, or select, these settings:TABLE 2SettingValueTypeSelect Azure endpoint.NameEnter myPrimaryEndpoint.Target resource typeSelect App Service.Target resourceSelect Choose an app service > East US.PrioritySelect 1. All traffic goes to this endpoint when it’s healthy.
- Also, Select OK.
- Subsequently, To create a failover endpoint for your second Azure region, repeat steps 3 and 4 with these settings:TABLE 3SettingValueTypeSelect Azure endpoint.NameEnter myFailoverEndpoint.Target resource typeSelect App Service.Target resourceSelect Choose an app service > West Europe.PrioritySelect 2. All traffic goes to this failover endpoint if the primary endpoint is unhealthy.
- Finally, Select OK.
When you’re done finally adding the two endpoints, they’re displayed in Traffic Manager profile. Notice that their monitoring status is Online now.
Test Traffic Manager profile
The domain name of your Traffic Manager profile will be checked next. In addition, you’ll make the main endpoint inaccessible. Finally, you’ll see that the online app is still functional. Because Traffic Manager directs traffic to the failover endpoint, this is the case.
Clean up resources
Delete the resource groups, web apps, and any linked resources after you’re finished. To do so, go to your dashboard and pick each individual item, then click Delete at the top of each page.
Reference documentation – Quickstart: Create a Traffic Manager profile using the Azure portal