Configure Azure Front Door for a highly available global web application

Configure Azure Front Door for a highly available global web application

What is Azure Front Door?

According to the official MS Docs (Azure Front Door | Microsoft Learn) Azure Front Door helps us deliver higher availability, lower latency, greater scale, and more secure experiences to our users.

Azure Front Door (classic) is a global entry-point which can help us create highly available and secure web applications. For more information on Azure Front Door (classic) I suggest you read the following official MS Docs (Azure Front Door (classic) | Microsoft Learn).


Preparing the App Services

For this example, I have already created two App Services in Azure.

The first App Service name is webapptech01 while the second App Service name is webapptech02. The configuration for both is the same except that webapptech01 is in the North Europe region while webapptech02 is in the West Europe region.

No alt text provided for this image

Now let’s see how we can implement Azure Front Door and access our App Services through it.


Setting up Azure Front Door

Go to the Azure portal and search for 'Front Door'.

No alt text provided for this image

Click on the 'Create front door and CDN profiles' button.?

No alt text provided for this image

Next select the 'Explore other offerings' option and from below choose the 'Azure Front Door (classic)' option to start creating the Front Door.

No alt text provided for this image

In the 'Basics' section fill in the details as below:

No alt text provided for this image

Next, go to the 'Configuration' tab. You will see the next setup:

No alt text provided for this image

Click on the button to add Frontends/domains.?

No alt text provided for this image

Fill in the following information:

No alt text provided for this image

The next step is to add Backend pools. Click on the + button.?

No alt text provided for this image

Here we need to add our two App Services to the backends. To do this click on '+ Add a backend' button and do the same for both of the applications.?

No alt text provided for this image
No alt text provided for this image

After adding the backends we should end up with the following configuration:?

No alt text provided for this image

The last thing to do is to add Routing rules. Click on the button to add a new rule:

No alt text provided for this image

Fill in the details as below:

No alt text provided for this image

The final state of our configuration should look like the following:

No alt text provided for this image

Finish creating the Front Door resource.

No alt text provided for this image

Now let’s go to our Front Door resource.

No alt text provided for this image

Click on the Frontend host URL and observe that everything is working as expected.

No alt text provided for this image

Now let’s do a couple of tests to demonstrate how all of this works.

Go to the webapptech01 and stop the service.

No alt text provided for this image

After a few minutes, we will see that our service (webapptech01) is no longer running.

No alt text provided for this image

Refresh the page where we opened the Frontend host URL. You will see that it’s still working correctly. That is because our webapptech02 is still running and we’re being redirected to it.

No alt text provided for this image

Now let’s stop webapptech02 as well.

No alt text provided for this image

Visit webapptech02 URL and confirm that it is no longer running.

No alt text provided for this image

Refresh the page where we opened the Frontend host URL. Observe that now it is not working. That is because we stopped both of our services.

No alt text provided for this image

Return to webapptech01 and start the App Service again.

No alt text provided for this image

Open the Frontend host URL again and observe that it started working again. That’s because one of our services is running, so it redirects us to that service.

No alt text provided for this image

Perfect. Our Azure Front Door is working as expected and is redirecting us to the service that is running when the other one isn't which makes us have a highly available global web application.

Thanks for sticking to the end of another article from?"Iliev Talks Tech".?#ilievtalkstech

Next steps:

要查看或添加评论,请登录

Dimitar Iliev ??的更多文章

社区洞察

其他会员也浏览了