Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts

Thursday, May 19, 2016

Don't Let Your Free Azure Website Go To Sleep... Keep It Alive With Application Insights Web Tests

Anyone can register for a Microsoft Azure account and create 10 websites for free.  However, those are hosted such that they will occasionally take 3-10 seconds to respond if they sit idle for too long.

You can keep your website alive and responsive if you have visitors more often.  Or how about creating a task that will ping your website often enough to keep it awake?  An easy and free way to achieve this is to use another Microsoft Azure service, Application Insights.




This service allows you to gather telemetry from your desktop, mobile, or web application and monitor and report off of that data.  It is real simple to setup and requires injecting settings into your config files and/or adding a few lines of code to your project.

However, you don't need to do any of that.  You can install the resource in your Azure account and just use the Web Test feature without any client/server setup.  You can have this setup in under 5 minutes inside your Azure portal.
  1. Create a new resource group
  2. Add application insights
  3. Click on the availability tile
  4. Add a web test
  5. Use the URL ping test
    • Add a name
    • Supply the URL you want to keep alive
    • Choose at least one location (I only needed one since my goal is just to use this service as a keep-alive)
    • Configure the alert to email you if there are issues
Application Insights resource named Keep Azure Websites Alive

That's it!  A simple keep-alive system that is running in the cloud and doesn't cost you a penny.