Nov 12, 2020

Azure Traffic Manager failover on websites

Azure Traffic Manager is a DNS-based load balancer. In this blog post, we show how Traffic Manager can be configured to provide resilience and high-availability to Azure Wep Apps.

Azure Traffic Manager is a DNS-based load balancer. In this blog post, we show how Traffic Manager can be configured to provide resilience and high-availability to Azure Wep Apps.

In summary, here’s how Azure Traffic Manager works normally.

  1. Alice browse to a domain name URL https://example.azurewebsites.net
  2. Browser resolves domain name to IP address using DNS service
  3. DNS service checks with Azure Traffic Manager - what is the IP Address of example.azurewebsites.net?
  4. Azure Traffic Manager responds with IP Address and flows back to browser.
  5. Browser fetches page from application server.
  6. Alice sees the rendered page on the browser.

Azure Traffic Manager periodically polls for web app health. Upon detection of degradation of performance, Traffic Manager will direct traffic to the healthy web app.

Create Azure Traffic Manager and Endpoints

Testing the failover

  1. Stop app service failover-1

2. Confirm app-service stopped.

3. Traffic Manager WORKS - page works normally.

4. Traffic Manager WORKS - DIG shows traffic manager resolves to failover-2.

Notes

  1. Expect slight seconds of delay between the failover between appservice by Traffic Manager.
  2. All browsers cache DNS resolution results; thus end-users will continuously experience failed site until the DNS resolution cache is cleared. DNS resolution cache duration differs between all major browsers.



Interested in hearing more?
Lets connect.