azurehttp-redirecthttp-headersazure-appserviceazure-load-balancer

Azure App Service Always On feature functionality - Clarification


We use Azure App Service and we use custom domain for that Azure App service Web App.

As per docs I see the meaning of Always On feature is:

Always On: Keeps the app loaded even when there's no traffic. When Always On is not turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

I am trying to understand the meaning of "the front-end load balancer sends a GET request to the application root every five minutes."

As mentioned we have custom domain, when the front-end load balancer sends a GET request to the application which one is used? The default domain URL or the Custom Domain URL?

As I am checking the AppServiceHTTPLogs I see the custom domain URL (CsHost). So can I come to a conclusion if the App is designed to use custom domain, the Always On feature uses Custom domain?


Solution

  • "Can I come to a conclusion that if the App is designed to use custom domain, the Always On feature uses Custom domain?"

    Yes, if your logs always show the custom domain in the cs-host for Always On requests and your custom domain is set up correctly, it means Azure is using your custom domain to keep the app running.

    By default, Azure uses the *.azurewebsites.net domain to send Always On pings. But if your app is set to redirect to a custom domain, those pings get redirected to the custom domain. That’s why you see the custom domain in the cs-host field of the AppServiceHTTPLogs.

    The reason you see the custom domain in the logs is,

    To ensure Always Onworks properly,

    This Msdoc discusses how apps are often set up to redirect *.azurewebsites.net to a custom domain, which is why the Always On requests show the custom domain in the logs.