Home > Software design >  Azure Front Door - How to create Routing Rules?
Azure Front Door - How to create Routing Rules?

Time:11-15

I know about the front door designer, but I am not sure how to add a Routing Rule.

How can I do this in Azure Front Door?

CodePudding user response:

A routing rule maps your frontend host to the backend pool.

  1. In Create a Front Door, in Routing rules, select to configure a routing rule.
  2. In Add a rule, for Name, enter LocationRule. Accept all the default values, then select Add to add the routing rule. OR
  • Select the protocol and frontend that Front Door should accept for this routing rule.
  • If needed, configure a path for granular control. In this scenario I will just use “/*” to accept all incoming traffic.

enter image description here

  • Next we need to define the route type.

Forward > This is the normal route type that is used to forward traffic to a backend. This is what I will use for now.

Redirect > Using this route type, incoming requests can be redirected to another URL. This is also helpful, if you want incoming http traffic to be redirected to https. I will cover that later in this post.

  • Next we select the backend pool for our routing rule and select the forwarding protocol which is again HTTPS in this example.

URL Rewrite > This allows the change of the URL of the original request before it is sent to the backend.

Caching > Caching allows Front Door to cache static content in the POPs which makes the experience for the consumers better. Azure Front Door uses the same POPs that are used by Azure CDN.

enter image description here

And that’s it. We are finally ready to complete the configuration and start the deployment. This will take a minute or two to complete.

Test Azure Front Door

Now let’s have a look at out new Front Door resource. Almost everything we initially configured in the wizard can be mofidied any time. But let’s first check if the connection works by using the Front Door URL we selected during the deployment.

enter image description here

There are many routing methods to configure front-end door with your backend pool, to decide which is useful on different kind of scenarios, please refer Structure of a Front Door route configuration and Front Door routing methods.

  • Related