>> Learn how to get started with
Azure Front Door in this edition of Azure Tips and Tricks.
You want your application to be globally
available performance and secure, right?
An easy way to do that in Azure is by using Azure Front Door.
This is a service that acts as
a load balancer and firewall in front of your application.
Here in the Azure Portal,
you can see that I have two web apps.
I've also deployed a very simple websites to
these web apps that we'll use to
demonstrate the power of Azure Front Door.
This web app is hosted in the West US Datacenter.
I've deployed a variation of my website in it that says,
"This app is in West US and the other one
is hosted in West Europe and says that it is hosted there."
Let's create an Azure Front Door.
We'll do that here and search for Azure Front Door,
and there it is.
By the way, you can create an Azure Front Door from
here and also from the Azure CLI.
Here we go. So, this looks good.
Let's pick my existing resource group.
Now, I can configure the Azure Front Door.
I can configure it here completely,
and I can also change this configuration once it is created.
We'll start by adding a frontend host.
This is the unique URL that we can
use to navigate to this Front Door.
This URL is tipsandtricks.azurefd.net.
Of course, you can also bind custom domain names to this URL.
Okay. That's the frontend host.
Now, we need to add at least one backend pool.
A backend pool is something that
Azure Front Door can send traffic to.
In our case, this backend will consists out of two web apps.
Through backend pool, probes the backends on
an interval to see if they are healthy.
It's important to set this interval to a small value,
so that Front Door knows quickly if a backend is
down and that it shouldn't routes traffic to that backend anymore.
So, after typing in a name,
I'll add a backend to this pool.
Here, I can even say that this backend is an App Service,
and then pick the right one.
I can configure more properties of the backend as
well including some things that can be used for routing.
Okay, let's add the other web app to the pool as well.
This is also an App Service,
and this needs to be the Europe web app.
All right, that's it.
Now for the last piece,
adding a routing rule.
This maps the frontend host URL to a backend.
You can also create custom routes if you want.
We'll leave this as is,
and add it. That's it.
Let's create the Azure Front Door.
This can take a while,
so I'll skip two when this is done.
All right, the deployment is
finished and here is the Azure Front Door.
Here, you can see the frontend host URL. Let's go to it.
This shows the Europe web app.
That is because I am in Europe and Front Door
routes me to the most performance application in the backend pool.
That's this one. So that works well.
All right, let's try something else.
I'll stop the Europe web app and see what Front Door does.
I can do that right here from the dashboard in the Azure Portal.
That's a pretty neat shortcut, right?
That stops the web app.
Let's go to the frontend URL again,
and see what it does.
There we go. Now, it routes me to the US web app.
As your Front Door routed me to the most performance web
app and routed me to a web app that was up and running.
This was very easy to set up. Go check it out.