Configure priority traffic routing method in Traffic Manager
Regardless of the website mode, Azure Websites already provide failover functionality for websites within a datacenter (also known as a region). Traffic Manager provides failover for websites in different datacenters.
A common pattern for service failover is to send traffic to a primary service and provide a set of identical backup services for failover. The following steps explain how to configure this prioritized failover with Azure cloud services and websites:
To configure the priority traffic routing method
- From a browser, sign in to the Azure portal. If you don’t already have an account, you can sign up for a free one-month trial.
- In the portal’s search bar, search for the Traffic Manager profiles and then click the profile name that you want to configure the routing method for.
- In the Traffic Manager profile blade, verify that both the cloud services and websites that you want to include in your configuration are present.
- In the Settings section, click Configuration, and in the Configuration blade, complete as follows:
- For traffic routing method settings, verify that the traffic routing method is Priority. If it is not, click Priority from the dropdown list.
- Set the Endpoint monitor settings identical for all every endpoint within this profile as follows:
- Select the appropriate Protocol, and specify the Port number.
- For Path type a forward slash /. To monitor endpoints, you must specify a path and filename. A forward slash "/" is a valid entry for the relative path and implies that the file is in the root directory (default).
- At the top of the page, click Save.
- In the Settings section, click Endpoints.
- In the Endpoints blade, review the priority order for your endpoints. When you select the Priority traffic routing method, the order of the selected endpoints matters. Verify the priority order of endpoints. The primary endpoint is on top. Double-check on the order it is displayed. all requests will be routed to the first endpoint and if Traffic Manager detects it be unhealthy, the traffic automatically fails over to the next endpoint.
- To change the endpoint priority order, click the endpoint, and in the Endpoint blade that is displayed, click Edit and change the Priority value as needed.
- Click Save to save change the endpoint settings.
- After you complete your configuration changes, click Save at the bottom of the page.
- Test the changes in your configuration as follows:
- In the portal’s search bar, search for the Traffic Manager profile name and click the Traffic Manager profile in the results that the displayed.
- In the Traffic Manager profile blade, click Overview.
- The Traffic Manager profile blade displays the DNS name of your newly created Traffic Manager profile. This can be used by any clients (for example, by navigating to it using a web browser) to get routed to the right endpoint as determined by the routing type. In this case all requests are routed to the first endpoint and if Traffic Manager detects it be unhealthy, the traffic automatically fails over to the next endpoint.
- Once your Traffic Manager profile is working, edit the DNS record on your authoritative DNS server to point your company domain name to the Traffic Manager domain name.