Ensure high availability for a web application using Azure Front Door
Azure Front Door acts as an entry point for your web applications ensuring higher availability, low latency, scalability, and higher security. Users across the world will have fast, reliable, and secure access to your static and dynamic web applications with Microsoft’s global edge network through the Azure front door.
In this article, we will see how to set up Azure Front Door for high availability for a web application.
In this demo, we will create two instances of an application that runs in two different regions and add these two as backends to a front door we create. By default, the front door will direct all the traffic to the nearest server and in case of any failure on any of the locations, it will provide automatic failover to the next available site.
Step 1: Create two instances of a web app that runs in two different regions. Here I have already one app running in Central US and I have created a new one in West India. For demo purposes, I have added index files with the location details.
Step 2: Now let’s create the Font Door for the application. Click on Create a new resource, Search for and select Front Door and CDN profiles resource, and click on Create.
Step 3: From the Compare offerings, page, select Explore other offerings. Then select Azure Front Door (classic). Click Continue
Step 4: Select your Subscription, Resource Group, and Location and move to Next: Configuration Page
Step 5: In the Frontends/domains click on Add and add a unique Host Name and click on Add
Step 6: Now create the Backend pools by clicking on Add, providing the backend pool a name, and adding the backend one by one, here we will add our two app services. Once done Click on Add
Step 7: Now we have to Add a Routing rule by adding a name and leaving all others with the default value. Once done, click Review + Create
Step 8: Once the deployment is completed, you can access the website through the frontend host address. it will route your request to the nearest location from the backend pool.
Step 9: To test the failover, stop the app service that was showing to you on the first attempt and refresh the URL. Here you will be served the request from the next available server.
Recent Posts
- Implementing Azure Site Recovery for Disaster Recovery: A Step-by-Step Guide
- Import large amounts of data to Azure Storage by Azure Import/Export service
- Configuring a backup of Azure App Service
- How to test application performance with Load Testing
- How to configure Autoscale for App Services in Azure