normalian blog

Let's talk about Microsoft Azure, ASP.NET and Java!

Let's utlize Azure Front Door to route requests globally

Azure Front Door is useful feature to manage and monitor your web traffics with global routing. Azure Front Door enables you to manage and optimize your global(multi-regions) customers easily. I believe readers of my blog want to acquire practical knowledge, so let's start to try!

At first, you need to note that Azure Front Door is global resource as you can confirm on Azure Portal below. This means you're no longer to be bothered by regional perspective at least for Azure Front Door.
f:id:waritohutsu:20200705041348p:plain

What's resources we can setup on Azure Front Door?

Azure Front Door can choose various types of resources like below. You are also possible to route requests out of Azure Platform with "Custom Host" and setup FQDNs. In this post, you can acquire knowledge how to use "Storage", "Public IP Address" and "Custom Host"
f:id:waritohutsu:20200705045658p:plain

Setup a sample scenarios

Here is an example architecture which I have setup as a sample for Azure Front Door.
f:id:waritohutsu:20200705050415p:plain

After creating your Azure Front Door instance, choose "Front Door designer" and add your owned domain on Azure Portal like below.
f:id:waritohutsu:20200705050628p:plain

Next, you can add your backend resources on "Backend pools" menu like below.
f:id:waritohutsu:20200705050804p:plain

You can add "Microsoft Cloud Workshop" site like below by setting up as "Custom host".
f:id:waritohutsu:20200705050950p:plain

Finally, you can setup rules how to forward or redirect HTTP/HTTPS requests into backend pools. In this example, all requests match with "/storage01/*" will be forwarded to my Azure Storage account into "/" path. Don't forget to specify as "/storage01/*" not ""/storage01/"
f:id:waritohutsu:20200705051353p:plain

Access a sample with Azure Front Door

You can confirm each request routings like below.
f:id:waritohutsu:20200705052118p:plain