Why windows azure cloud service applications goes down automatically and randomly

Writing after long time..feeling good 🙂

Having used Windows Azure for couple of our applications, I had no clue on why my applications hosted in azure would go down for few minutes. This was happening randomly, atleast once in a month. The web monitoring tool I setup for applications would work perfectly (by sending us email alerts about downtime). For some period I really struggled to find out why they were going offline automatically. Some of my friends told me that it happens due to the maintenance Microsoft performs on Azure. But I didnt know what kind of maintenance it is actually until I came across some blog posts which talks about Azure OS updates (guest and host OS updates) . I started reading one article and then spent almost 2 hrs in reading various articles related to the topic. Feeling happy to know little more about Azure today 🙂

Before what those blog post says, you need to know about guest and host OS that I mentioned above. In simple words – guest OS is one which runs on the virtual machines and host OS is operating system which runs in the Windows Azure platform. You can find more information about it at http://msdn.microsoft.com/en-us/library/windowsazure/ff729422.aspx

Here is what one of the post says about downtime:
Windows Azure virtual machines goes down at least once a month for guest OS update and similarly Host OS update. Because of it the Windows Azure virtual machine, in which your application in running, will part of guest or host OS update and will be down for a few minutes per month during those update process. Besides these scheduled update it is possible your virtual machine may be down for other potential reasons. Generally guest OS updates are released atleast once per month and host OS updates are quarterly.

By default, these updates are set to automatic but you have option to change it to manual in the Configure option of windows azure cloud services. But microsoft recommends to keep it automatic to get all latest updates to azure instance.

Here are some recommended readings to understand more about OS updates :
http://blogs.msdn.com/b/kwill/archive/2012/09/19/role-instance-restarts-due-to-os-upgrades.aspx
http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/27/windows-azure-instance-uptime-and-instance-re-initialization.aspx
http://msdn.microsoft.com/en-us/library/windowsazure/ff729422.aspx