Using Application Insights to keep a site online

 
 
  • Gérald Barré

By default, web apps are unloaded if they are idle for a while. This lets the system conserve resources. If you have access to the IIS configuration, you can configure the idle time-out settings to 0 (details). If you are hosting your web app on Azure, you can enable the Always on option (details).

But, if you cannot remove the idle time-out, here's a nice tip to keep your website online. The idea is to make a request at regular intervals (more frequently than the idle timeout), so the site is never unloaded.

This is where Application Insights takes action. Indeed, one of the functionalities of Application Insights is to test the availability of a website. Great news, this is free and you'll get a nice report of the up-time of your website!

  1. Create a free Azure account

  2. Create a new Application Insights instance

  3. Add an availability test

Application Insights will query your website from 5 different locations every 5 minutes. This should be enough to prevent the web site from being unloaded 😃 As a bonus, you'll get nice availability and performance reports.

Do you have a question or a suggestion about this post? Contact me!

Follow me:
Enjoy this blog?Buy Me A Coffee💖 Sponsor on GitHub