A closer look at Azure web sites: beware suspension

I am investigating moving this site to Windows Azure. The major benefit would be scalability. Currently it runs on a Linux VM which works very well, but in the event of a major spike in traffic (which is always possible with a news/comment site) it cannot scale.

Windows Azure web sites have nice scalability features. You can add and remove instances, or set up autoscaling based on a schedule or by CPU usage.

Unfortunately this does not come cheap. For autoscaling, you need a Standard web site, which starts at around £35 per month (1 core, 1.75GB RAM) for a Small instance, if you buy a 6 month plan.

Backtracking a little, Azure offers three levels of web site:

  • Free: Shared hosting, 1GB storage, 165MB per day outbound transfer
  • Shared: Shared hosting, 1GB storage, 5GB per day outbound transfer, up to 6 instances. In preview but currently around £7.00 per month per instance
  • Standard: Dedicated hosting, starts at £48 per month pay as you go, £35 per month 6 month plan.

For a quick test, I set up Brandoo WordPress from the Azure app gallery. Brandoo WordPress uses SQL Server rather than MySQL. MySQL on Azure is only available from a third party, ClearDB, which puts me off using it, unless you go a different route and use your own Windows or Linux VM to run it, losing the scalability benefit.

I started with a free web site. I have used free web sites in the past to prototype .NET applications, for which purpose they are excellent. The experience with WordPress was not so good. The site seemed to hang during the WordPress install wizard. My second go was successful, but the site was slow even just navigating the dashboard. Hopeless for any serious use beyond prototyping.

I converted the site to Shared hosting. The price is modest, and I wondered if the ability to scale manually up to 6 instances when needed might be sufficient. The performance improved markedly, compared to the free version. However I noticed these odd metrics in the dashboard: CPU time and Memory Usage, with notes like “Resets in 5 hours” or “Resets in 33 minutes”.

image

In particular, I noted that I had used nearly half of my allocated “Memory usage” just installing an empty WordPress site.

I am not familiar with measuring memory usage per hour and I am not even sure what it means. However, it seems that the consequences of exceeding either the CPU or the memory limit is extreme. The web site is suspended. See for example here:

Something strange happened today. My website on windowsAzure was suspended and inaccessible because my site had exceeded the CPU quotum. I am running the website in shared mode, but I had removed all quota. So why is my website suspended, I thought I would pay for the extra usage, not that my website would be suspended. What is happening here? And what should I do to prevent this from happening again?

See also Jonas Gauffin’s post Azure Failed Me (which has a more positive conclusion than you might expect from the title):

Today I were going to search my blog (http://blog.gauffin.org) about how to do a (almost) a generic type constraint for enums. But instead I got this screen: This site is currently not available. The scary thing is that I’ve got no notification what so ever about my site being down. So I browsed to the manage web site part of Azure and was greeted by the following screen: Suspended. As you see the CPU time has been consumed.

The same problem, I am guessing, hit this user, who has a tutorial on setting up a WordPress blog to Azure, but says at the end not to use it:

Also, even after perfect configuration of the website, Windows Azure was still showing some problems like this “This site is currently not available…” what a joke, the site is in cloud – global cloud – and not available, so when will?

though he apparently did not identify the reason.

It does not seem to me unreasonable that the free option suspends your site; it is free after all. The shared site is low-budget, but still paid for, and it seems to me that the problem of suspension should be spelt out more clearly. If you read:

A web site running in Shared mode benefits from high availability even with a single instance, but you can add up to 6 instances ("scale out") for even greater performance and fault tolerance.

you do not expect that the site will simply stop responding for up to a day if it exceeds CPU or memory limits that are often not easy to predict.

There are thousands of hosting services offering shared hosting or WordPress blogs at low prices, not least WordPress.com, and in general these sites do not get suspended because of exceeding CPU or memory limits.

The conclusion though is that if you want to use Azure for a site whose uptime you care about, you should plan to use no less than a Standard instance.