0
votes

We have an asp.net application hosted on Azure App Services with Traffic Manager setup on the domain.

We enabled Azure Front Door as well on this domain. And While setting up the backend pool, we had to setup "Backend Host Name" to be the web app IP address or a custom DNS alias that points to the web app IP because if we set it to the host name of the web app, when we switch priorities in Traffic Manager and it points to Azure Front Door, it essentially become a loop.

And we always set "Backend Host Header" to the correct matching domain that's bound to the web app, so we can hit the right web app and our asp.net application gets the correct request hostname too. We are able to verify this by using Postman to making simple Get request with Host header to IP addresses.

However whenever this is setup with Azure Front Door, we only get 503 errors returned.

Does anyone know what's causing the issue? Or anyway to troubleshoot Azure Front Door and understanding why it's returning 503?

We turned on Diagnostic and went through the logs, it doesn't have any details of why it's returning 503, just recording a 503 error code there.

1
You could follow this doc to troubleshoot the 503 error.Nancy Xiong
@NancyXiong it's not the web app that's returning 503, it's just Azure front door. The web app is working fine during those setups.zhanke
What about if you change the backend host type= app service? What do you mean Azure App Services with Traffic Manager setup on the domain in these steps?Nancy Xiong
@NancyXiong when you change it to app service but setup a custom "Backend Host Header", it converts to custom host setup. You can see it by closing the blade and reopening it. Traffic manager meaning setup the endpoint to be the web app in Traffic Manager, then all of them become the aliases of each other which includes the traffic manager hostname and all hostnames bound to the web app.zhanke
@NancyXiong When 1. TM is pointing to web app and 2. Front Door is setup to use custom hostname of the web app(meaning it's tied with TM). Everything works including Front Door. But if now switch TM to point to Front Door alias, Front Door gives 503, which is understandable because it probably created a loop in Azure front door. That's why I tried to use IP addresses directly in Azure Front Door backend pool hostname, however it causes same 503 error. How do you normally setup Azure Front Door with TM enabled app services?zhanke

1 Answers

0
votes

From your last comment, I can reproduce your steps and the error message Our services aren't available right now. During my validation, I found that by default Azure front door only accepts the default hostname xxx.azurewebsites.net of Azure app service.

If you want to use the other custom DNS name as the Backend Host Header when you configure the backend pool. Before this, I suppose you have added a custom hostname in your Azure app service referring to this. Then, you could replace destination host with the default website name xxx.azurewebsites.net and in the routing rule of Azure front door.

The backend pool configuration

enter image description here

The routing rule configuration

enter image description here

Hope this could help you.