Blog Post

Apps on Azure Blog
2 MIN READ

Understanding 'Always On' vs. Health Check in Azure App Service

Samiksha's avatar
Samiksha
Icon for Microsoft rankMicrosoft
Apr 02, 2025

Always On vs. Health Check: Do We Need Both?

 

            The 'Always On' feature in Azure App Service helps keep your app warm by ensuring it remains running and responsive, even during periods of inactivity with no incoming traffic. As this feature pings to root URI after every 5 minutes.

             On Other hand Health-check feature helps pinging configured path every minute to monitor the application availability on each instance.

 

What is 'Always On' in Azure App Service?

The Always On feature ensures that the host process of your web app stays running continuously. This results in better responsiveness after idle periods since the app doesn’t need to cold boot when a request arrives.

How to enable Always On:

  1. Navigate to the Azure Portal and open your Web App.
  2. Go to ConfigurationGeneral Settings.
  3. Toggle Always On to On.

What is Health Check in Azure App Service?

Health check increases your application's availability by rerouting requests away from instance where application is marked unhealthy and replacing instances if they remain unhealthy.

How to enable Health-Check:

  1. Navigate to the Azure Portal and open your Web App.
  2. Under Monitoring, select Health check.
  3. Select Enable and provide a valid URL path for your application, such as /health or /api/health.
  4. Select Save.

 

So, is it still necessary to enable the 'Always On' feature when Health Check is already pinging your application every minute?

-> Yes, please find below explanation for the same.

 

Test App scenario:

  1. Health Check enabled (pointing to /health_check path) and Always On disabled.
  2. Started the app and sent some user requests.

Observations from the Test:

  • After the application starts up, health check pings begin following the end user's request.
  • Please find below table representing Health-check pings following user's request to root URI.

Time Bucket

URL

Status

Request Count

2025-03-20 07:00:00.0000000

/

200

6

2025-03-20 07:00:00.0000000

/health_check

200

30

2025-03-20 07:30:00.0000000

/health_check

200

30

 

  • Subsequent Health-check pings will continue, even in the absence of user requests.
  • However, after restarting the app and in the absence of any user requests, we observed that Health Check requests were not initiated.
  • This indicates that Health Check does not start automatically unless application is actively running and serving requests.

Conclusion:  

  • Always On ensures that the app is proactively kept warm by sending root URI pings, even post-restart.
  • The health-check feature is useful for monitoring application availability when the application is active. However, after a restart, if the application isn't active due to a lack of requests, Health-check pings won't initiate.
  • Therefore, it is highly recommended to enable Always On, particularly for applications that need continuous availability and to avoid application process unload events.

 

Recommendation: Enable Always On alongside Health Check to ensure optimal performance and reliability.

Updated Apr 02, 2025
Version 3.0
No CommentsBe the first to comment