Using Application Insights to keep a site online

  • Azure

By default, web apps are unloaded if they are idle for some period of time. 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 web site online. The idea is to make a request at a 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 functionality 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

  1. Add an availability test

Application Insights will query your website from 5 differents 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.

Follow me:
Enjoy this blog?Buy Me A CoffeeDonate with PayPal

Leave a reply