Azure Website 101: Make your site always warm

When we host a website in azure generally what happens is that if that particular site does not get any hit i.e remains idle for some times (20 minutes timeout) the site gets unloaded.  After that next time when again someone hit that site they are left waiting for it to compile, render and present itself. Azure did this by default to lets the system conserve resources. In one sense it is indeed good and seems obvious why they make this as default behavior. But from another point of view this could create a bad impression of your website.

To overcome this situation azure offer “Always On” feature.  Always On causes Azure to automatically ping your site periodically to ensure that it remains in a running state. Although there is no additional cost for enabling “Always On” option itself but this setting itself comes with a cost. Your site should have a minimal hosting plan(WHP) of basic or standard.

Web Performance Tips: If your web application is not very frequently accessed by users,  enable “Always On” setting to increases application responsiveness.

As soon someone enable AlwaysOn feature on for his/her website, that particular site root will get hit within a few seconds. In other word, Azure starts pinging your Site regularly to ensure that the Web Site is always active. This also make sure the site is up and running on all the worker process (if you have configured auto scale option or such). After that, if some point the worker process crashes, Always On feature makes sure that it comes back up again.

Note: You cannot control the endpoint that AlwaysOn hits !

Scenario where you have to run background code within it irrespective of whether it is actively processing external HTTP customer requests, you should enable Always On feature else your web jobs might not run reliably.

In order to restore your content first navigate to azure portal and then go to Settings>Application Settings option to open the Web App Settings blade.

Azure Website 101_AlwaysOn_01

Once you are in Web app settings blade, set Always On feature ON.

Azure Website 101_AlwaysOn_02

Enabling this feature is just that easy! This setting is somewhat similar to “Idle Time-out” setting on IIS application pool. You can bing it for details.

Some good read:

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s