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?
"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,
*.azurewebsites.net
get redirected.To ensure Always On
works properly,
Make sure your custom domain is correctly set up and working with HTTPS if you use it, and that any redirects from the default Azure domain to your custom domain don’t interfere with health checks
Keep an eye on your App Service logs — if the pings show your custom domain in the host field, it means the app is being contacted as expected.
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.