Category Archives: microsoft

X is for Xamarin: One company that is pleased to see Nokia X

Xamarin, which provides cross-platform development tools for targeting iOS and Android wtih C#, is not exhibiting here at Mobile World Congress in Barcelona, but does have a presence for meetings, and I caught up with Joseph Hill who is Director of Developer Relations.

Xamarin has just announced a joint SDK with SAP along with some SAP-specific support in its cloud testing service; but Monday’s announcement of Nokia X, Android smartphones from soon-to-be-Microsoft Nokia, was even bigger news from Hill’s perspective.

If you are a Windows Phone developer with apps written in C#, Xamarin gives you a way to port your code to Nokia X. Apparently Nokia itself has taken advantage of this to port Nokia Mix Radio, as described by Nokia’s developers here. Nokia also used MVVM Cross in order to take cross-platform abstraction beyond what Xamarin itself gives them (Xamarin is deliberately restricted to non-visual code).

Nokia states that it will do all future development using Microsoft’s Portable Class Libraries, and is also refactoring existing code:

The final step in our journey towards the common architecture is to throw out the legacy code from the Windows Phone and Windows 8 apps so they’re stripped back to existing PCL shared assemblies and then integrate them with our fully shared codebase. Now that the Nokia X has launched that’s the next major goal we’re striving towards and work begins now.

I imagine that Xamarin could prove useful in some of Microsoft’s other internal projects as it prepares for a world in which there is an official Microsoft Android platform.

As an aside, it seems to me unlikely that Microsoft will do anything other than run with Nokia X after the acquisition. Microsoft is supporting Nokia X with Skype and OneDrive, which is an indication of its attitude.

Samsung evolving KNOX into complete mobile device management solution

Samsung introduced KNOX at the 2013 Mobile World Congress (MWC). It is a secure app and data container for Samsung mobiles, backed by hardware, enabling businesses to run apps that are isolated from a user’s personal apps (which might include badly behaved or even malicious apps). Data is encrypted so that business secrets are safe if the device goes astray.

The core of Knox is a hardware process called TIMA (Trustzone Integrity Measurement). This checks for tampering in the core operating system (trusted boot) and sets a tamper bit if it detects a problem. The tamper bit cannot be set in software alone.

image

A device with KNOX activated can be flipped between personal and business (KNOX) personalities. It is like having two smartphones in one. Whether this is a desirable approach is up for debate, but it does secure business apps and data.

image

We did not hear much about KNOX after last year’s MWC. It was released a few months later, but snags included limited device support (only the latest Samsung devices), the need to prepare apps with a special KNOX wrapper before they could be used, and the need to hire a Samsung partner like Centrify to provide administration tools.

All that has changed following last night’s announcement of the next generation of KNOX. Highlights:

Most apps can now be installed in KNOX without any special wrapper

You can use a third-party container such as Good, Fixmo Safezone, or MobileIron AppConnect in place of the KNOX container, but still using KNOX hardware protection.

Two factor authentication (for example requiring a fingerprint swipe as well as a password to access a KNOX container)

KNOX supports Microsoft’s workplace join (a kind of lightweight domain join) for secure access to Microsoft network resources.

Samsung has introduced a cloud-based Mobile Device Management (MDM) tool called KNOX EMM (Enterprise Mobility Management). This runs on Microsoft’s Azure platform and integrates with Azure Active Directory (which can itself link to on-premise Active Directory) so that small businesses on Office 365, or large businesses which prefer a cloud tool, can manage both Knox and other devices. EMM is primarily aimed at SMEs but apparently can scale up without limit.

EMM will also support non-Samsung devices.

EMM includes an app marketplace allowing businesses to purchase and deploy apps. The example we were shown was the Box cloud storage service.

image

Availability is promised for the second quarter of 2014.

New features in Windows Azure, including web site backup, .NET mobile services

Microsoft has announced new features in Windows Azure, its cloud platform, described by VP Scott Guthrie on his blog.

Aside: I agree with this comment to his post:

Thank you Scott for update. I wish dozens of MS folks and MS representatives would have a clue about Azure roadmap to help businesses plan their release schedules / migration plans. Till that happens, this blog will remain the main source of updates and a hint of roadmap.

The changes are significant. ExpressRoute offers connectivity to Azure without going through the public internet. Currently you have to use an Equinix datacentre, Level 3 cloud connect, or an AT&T MPLS (Multiprotocol Label Switching) VPN. For enterprises that can meet the requirements and who are wary about data passing through the internet, or who want better connectivity, it is an interesting option.

Next up is backup and restore for Azure web sites. Azure web sites are a way of deploying web applications, ranging from free to multi-instance with automatic scaling. You need at least a Standard site for serious use, as I explained here.

Now you can set up scheduled backup for both the web site and a supporting database. The feature is in preview but you can try it now using the Azure web management portal.

image

I noticed a couple of things. One is that the storage account used must be in the same subscription as the web site. I also spotted this warning:

image

which states that “frequent backups can increase you database costs by up to 100%”. Still, it is a handy feature.

Azure mobile services, designed to supply data to mobile apps, has been extended to support .NET code (previously you had to use Javascript). If you download the code, notes Guthrie, you find that it is  “simply an ASP.NET Web API project with additional Mobile Service NuGet packages included.”

Mobile Services also have new support for notification hubs and for PhoneGap (a way of building mobile apps using HTML and JavaScript).

Another feature that caught my eye is easy linking of third-party apps to Azure Active Directory (which is also used by Office 365). For example, if you are struggling with SharePoint and its poor clients for Windows, iOS and Android, you might consider using Dropbox for business instead. Now you can integrate Dropbox for Business with your Office 365 user directory by selecting  it from the Azure management portal.

image

Visual Studio license expired: not what you want to see just before boarding a flight

While waiting to board I fired up Visual Studio 2013 thinking I might tinker with the game I am working on during the flight.

image

I got this unwelcome message. “Your license has gone stale.” This is because I have an MSDN version which apparently is no longer a perpetual license.

Thanks to what looks like a beginner programming error, I am also informed that the license will expire in 2147483647 days.

The other factor here is that I only use Visual Studio on this machine when travelling. Although my subscription is still in date, the software has to call home once in a while or it stops working.

Fair enough for Microsoft to protect its rights but I wonder if this could be fine-tuned.

Microsoft OneDrive and Office Online is Office 365 lite

Microsoft has transitioned its cloud storage service name from SkyDrive to OneDrive.

Is OneDrive just cloud storage though? Not really. It is part of a suite of cloud applications. Go to OneDrive, drop down the Create menu, and you see this:

image

These links to Office document types open in Office Online, formerly Office Web Apps, which is a browser version of Microsoft Office, and now pretty good.

image

No offline functionality, and if you print you just generate a PDF, but not bad for free.

Drop down the OneDrive menu and there are the other apps in Microsoft’s consumer cloud suite, including Outlook.com, People and Calendar.

image

The functionality parallels that in Office 365, where you get Exchange online in place of Outlook.com and hosted SharePoint in place of OneDrive.

Microsoft also has Skype, which is the consumer version of Lync in Office 365.

It all looks rather coherent, though Microsoft has a bit of work to do under the covers. It makes little sense for OneDrive to use different technology than SharePoint for online storage, though frankly OneDrive beats SharePoint in some respects so it would be good to see some of the consumer tech migrating into the enterprise offering. Lync and Skype are also separate products though work is under way to bring them together.

Microsoft’s big problem is this. To what it extent can it continue to improve the browser-based apps before it threatens its desktop Office business? Its dilemma is that if it holds back the browser versions, it will cede market share to Google which has no qualms about crushing Microsoft Office.

Microsoft improves its web app builder for Windows Phone, but where is it going with this?

Microsoft has improved its browser-based Windows Phone App Studio beta and added the ability to generate Windows Store apps. The changes are described here.

First, a quick tour. App Studio is carefully described as a tool for building “content-based apps”. The personal use case is an app to show off your recent holiday, favourite band, movie or team, and for businesses, a showcase for your company or a menu for your restaurant.

I find this curious. What is the point of this kind of app? If I want to create a fan project, wouldn’t a mobile-friendly web site or blog be better? And for businesses, what is the value of an app that lacks intelligence? For example, a restaurant might want an app linked to a loyalty scheme where you collect points towards a free meal or qualify for offers, but how many will want an app just to check a menu, which they could easily do online?

Still, I like the idea of an app that will make it easier to read this blog on Windows Phone, so I went in and built an app.

Microsoft is continuing its peculiar and infuriating aversion to proper documentation, but there is a a how to that is somewhat informative. “You can also create a custom action”, it says, but does not tell you what such an action can do or how to use it.

That said, the development environment is reasonably intuitive. There is no interface builder at the level of buttons and listboxes; rather, you drag high-level elements into sections and the user interface is built for you. For example, I added an RSS feed, entered the URL for this blog, and it built a UI to browse and read blog entries.

image

Everything is data bound, and the data can be stored either locally or else hosted by Microsoft, in which case you can amend it dynamically:

App Studio Data Services means the data is stored in App Studio and depends on an internet connection. If you update your data in App Studio, your app will automatically update. This allows you to create live apps that don’t need to be updated when you want to change data.

Large or sophisticated data sets are not the target here though. You could store a short list of addresses, for example.

You can also add elements including HTML text, RSS feeds, YouTube videos, Flickr photos, and Bing searches. You can add actions including initiating a phone call or email, searching Nokia music, or getting directions from Nokia HERE maps.

As you work, a live preview of the app appears alongside your work, a nice feature.

Once done, you can generate the app.

image

New in this version is the ability to generate a Windows Store App for Windows 8.1, as well as a phone app. Once in Visual Studio, you can do what you like, though there is no way back to the visual builder. Apps generated use XAML and C#.

image

App Studio also compiles a Windows Phone binary package (not yet for Windows Store apps) which you can install immediately, provided you have added the necessary certificate. You can install the app by scanning a QR code.

image

There is good work here, and if by any chance you do want to build a “content app” of the type envisaged, it is great.

I have a couple of reservations though.

First, it is too limited to be useful for real-world apps, unless you just use it as a starting point for a Visual Studio project. It needs the ability to write snippets of code, and the ability to link to business data sources like Azure Mobile Services and SQL Server. It also needs a login facility supporting at least Office 365 and Microsoft IDs.

Second, it seems to me that Microsoft is working simultaneously on several projects with overlapping purpose, which is to simplify app building.

Project Siena is a visual app builder implemented as a Windows 8 app; I looked at it here.

Visual Studio Lightswitch is a visual app builder in Visual Studio, which builds apps for Silverlight and HTML.

Access 2013 Web Apps let you build custom databases that hook into Office 365. I looked at these here. This is one easy app builder that really makes sense to me, allowing reasonably sophisticated data models and using Office 365 identities for log-in and permissions.

Windows Phone App Studio as described above.

Now, I appreciate that there are slightly different target markets in each of these. Lightswitch cannot build store apps, Access Web Apps require SharePoint or Office 365, Project Siena cannot build phone apps, and so on.

However, Microsoft needs to unify its development platform, and a proliferation of tools all going for the supposed non-technical app developer is not helping its cause. I also suspect that the demand for consumer “content-based apps” is vanishingly small.

Personally I think Microsoft should both improve and shout from the rooftops about the under appreciated Access 2013 web apps, scrap at least two of the other three, and integrate their functionality so that we have one easy to use app builder that can target Windows Store apps and Windows Phone apps.

Microsoft Office 365 and the battle for simplicity

Last week I reviewed a Google Chromebook. Next, I assisted a small business move from Office 365 to Office 365 – yes, Microsoft’s software as a service (SaaS) offering is divided into plans, such that if you want to move from certain plans to certain other plans you have to start again with a new account and copy your data across as best you can, which seems contrary to the smooth experience the cloud is meant to offer. The experience prompts some reflections.

image

Do not move between Office 365 plans then, you might argue; but this is not the only complication with Office 365. There are two reasons for its complexity:

1. Although it is SaaS, Office 365 uses a hybrid model in that users are expected to run desktop Office as well as having an Office 365 account. This is a strength in that Word, Outlook and especially Excel are mature and capable products which many users (myself included) find more productive than equivalent browser-based apps, though familiarity is a factor in this. It is also a weakness, since you have a traditional desktop installation working alongside cloud services. Further, if your PC is stolen, you cannot just pick up another PC, log in, and carry on where you left off. You need to install Office first.

Contrast this to the Chromebook, which adopts a pure cloud model. Technically, many browser apps do run locally, in that JavaScript, Flash applets or Google’s native client executes on your local machine just like Office. This is hidden from the user though, and any installations are tucked away in temporary internet files. If you sign into Chrome on another computer, your settings,  bookmarks, history, passwords and browser extensions are synched automatically.

Microsoft has made great strides with its Office installer. Office 2013 installs in most cases using application virtualisation, based on Microsoft’s App-V technology, which means it runs in an isolated environment and is not prone to problems like dynamic library version conflicts or registry errors. The application streaming is also smart enough to let you run applications before they are fully downloaded, by downloading the essential features first and finishing off in the background. The speed with which you can get started with desktop Office, when downloaded as part of an Office 365 subscription, is impressive.

Nevertheless, Microsoft has not eliminated all the issues with desktop software. Outlook was tricky to migrate, for example, in the move with which I assisted. You have to go to the Mail applet in Control Panel, delete the Outlook profile, and create a new one. If you are not careful you can get a scenario where Outlook tries to start up, pauses for a while, and finally announces “Cannot open the Outlook window” and quits. Then you need a web search or a Windows expert to help you out. This kind of experience is less likely with a Chromebook or any pure cloud model where you simply log onto your cloud service.

The worst example of desktop complexity spoiling cloud simplicity is the SharePoint client confusingly called SkyDrive Pro. It is meant to synch SharePoint documents with your local computer but does not work reliably, and trying to fix it involves fiddly instructions to clear your cache, and subsequent re-download of lots of data (I recommend that you do not use SkyDrive Pro).

2. Office 365 is based on applications which were originally built to be managed by system administrators. The core of it is Exchange and SharePoint, both of which come with a myriad of dependencies and configuration options. In their Office 365 guise, these complications are somewhat hidden, and Microsoft has wrapped them with a decent web user interface, both for end users and Office 365 administrators. Nevertheless, the complexity remains, and there is not much in on-premise Exchange that is not also available in Office 365, particularly if you are willing to log on with PowerShell.

This is not a bad thing as such. For businesses with sophisticated Exchange setups it is a good thing, since the features they need are available in Office 365, and the tools with which to configure it are familiar.

However, it does mean that administering Office 365 is more demanding than perhaps it would have been if designed from the ground up as a cloud application. There are also odd limitations and overlapping features. Let’s say you want to have contacts shared between multiple users. Do you use a SharePoint list, or an Exchange public folder? If you use a public folder, why is it that a top-level public folder can only contain mail items whereas a sub-folder can contain contacts, tasks or calendar items? And if you use an Exchange public folder, don’t forget to go into Outlook and add it to public folder favorites, which enables magic like offline access, and to check the option to “Show as an Outlook address book” so you can select email addresses from it when sending an email – all knowledge which comes from experience of Exchange and Outlook, and which is not intuitive or obvious.

The battle of simplicity versus productivity and features

Considering how Office 365 was created, and Microsoft’s desktop heritage, the progress Microsoft has made in wrestling it into a comprehensive and relatively low-maintenance cloud platform is impressive; but more needs to be done before it comes close to Google’s offering in terms of ease of use and freedom from the hassles of maintaining PCs. Microsoft’s battle is to achieve Google-like simplicity of use but without losing the productivity and features which users value.

The question on Google’s side is how quickly it can offer enough of the features for which users and administrators value Microsoft’s platform to tempt more businesses to make the transition. That means the ability to work on documents and spreadsheets in Google’s browser apps without missing Word and Excel, as well as archiving, compliance and management features to match Exchange.

Many are already happy to work in Google apps, of course. I would be interested to hear from others what keeps them on Microsoft’s platform, or alternatively, why they have found Google (or another cloud provider) a satisfactory alternative.

Notes from the field: manually migrating between Office 365 plans

Microsoft’s Office 365, which provides hosted Exchange, SharePoint and other services, comes in a variety of flavours, some of which include a license to run desktop Office. In some cases it is even possible to mix and match plans. For example, you can have some of your users on Enterprise 1 (E1) (no desktop Office) and some on Enterprise 3 (E3) (includes desktop Office). It gets more awkward though if you want to switch between “families”: the small business family and the Enterprise family. A table here sets out which plans are eligible for switching.

But what if you do want to switch between families, for example to take advantage of the good value Office 365 Midsize Business, which gets you hosted services and desktop office for £9.80 or $15.00 per user/month, compared to E3 which costs £15.00 or $20.00 per user/month? There are some extra features in E3, like Exchange archiving and legal hold, but the cost saving is substantial.

The answer is that you have to switch manually. Microsoft helpfully remarks:

Switching plans manually involves purchasing a new plan, reassigning the licenses, and then cancelling your old plan … If you have a custom domain, you’ll have to remove it from Office 365 and then add it again after you’ve switched plans. This will require some downtime of your services. If you’re switching to a plan in a different service family, you’ll need to back up all of your company’s information before switching plans.

Put another way, you are pretty much on your own. In Active Directory terms (Microsoft’s directory service), it means a new directory and therefore a new cloud identity for all your users. Any other services linked to that directory, such as Intune for PC and device management, will also need replacing.

I helped a small business make this change, so here are a few notes from the field.

The first step is to create the new Office 365 site. You can use a trial and purchase licenses later. It cannot have the name as the old site, for obvious reasons. Every Office 365 is part of the onmicrosoft.com domain. If your old site is mydomain.onmicrosoft.com, you can call the new site mydomain1.onmicrosoft.com.

These onmicrosoft.com subdomains are useful, since they are not affected when you move the custom domain (eg mydomain.com) from one site to the other. You can still use the old onmicrosoft.com domain to access the old site.

Then set up the users. In this case the business is so small it can easily be done manually.

1. Migrating SharePoint

Moving a SharePoint document store from site to another is painful if you cannot do what you would normally do, that is, backup the content database and reattach to a different SharePoint site. Microsoft does not provide any bulk export feature, though you can write your own code. There are third-party migration tools like Sharegate which probably works fine, but for a very small business it is not cheap, starting at $995 for a one-year subscription to the “Lite” version.

I found a quick and dirty solution using an Azure virtual machine. Create an Azure VM running Server 2012 R2, log in using Remote Desktop and install the Desktop Experience. Then navigate to the old SharePoint site, add sites to trusted sites as necessary, and “Open in Explorer” to use WebDAV and view the documents in Windows Explorer. Copy all the documents to a local directory. Then connect to the new site and do the same in reverse.

Why Azure? The idea is to benefit from fast connectivity between Office 365 and Windows Azure. This worked well and the documents copied much more quickly than I could achieve when connecting from my own network.

You do lose document history using this technique. Further, all documents will now be “last modified” on the date the copy is made.

Timing is a problem. In order to minimise downtime, you want users to be able to keep working on the old site for as long as possible. However, during this time they might add or edit documents in SharePoint. I did two passes, once before the cut-off point to get the bulk of them copied, and once after, using Search in Explorer to identify the documents added or changed.

2. Migrating Exchange

Exchange migration is also tricky. Office 365 includes Exchange migration tools but they are designed for moves on-premise to Office 365, not for moving between families. It may be possible to make them work, though this official advice is not promising:

Since they are different service family, and we cannot use such as  Cutover migration to achieve this goal, we just can use export and import pst. Moreover, we cannot parallel 2 user accounts which have the same domain in both 2 tenants, so the service may be impacted. Sorry for the inconvenience.

This support person is suggesting using Outlook to move a mailbox by exporting and importing data. It is an ugly procedure, especially if you are trying to do this without involving the users much. You would have to impersonate each user, connect in Outlook, download the entire mailbox, export it, and then connect Outlook to the new mailbox and import.

I used a third-part cloud service, MigrationWiz, instead. This connects to each hosted Exchange using either impersonation (an Exchange feature which lets a user connect to a mailbox as if they were the mailbox owner) or a user with full control permission on all mailboxes, and copies all the items across.

Unlike Sharegate, MigrationWiz is priced per mailbox, at $11.99 each for a multi-pass license. This make it affordable for a business of any size.

I found MigrationWiz excellent. It was not entirely trouble-free and I got some time-out errors on my first attempt, but these may well be the fault of Office 365 itself. The user interface is good with plentiful statistics on how your migration is going. It did not create any duplicate items.

The worst thing about MigrationWiz is that you have to give your mailbox administrator credentials to a third-party. In some cases that might rule it out; but the company says:

Mailbox credentials are stored using AES encryption. Once credentials are submitted by either the administrator or end-user, the credentials cannot be retrieved or seen. The credentials are immediately purged from the system once you delete the corresponding configuration to which it is associated.

The company is based on Microsoft’s doorstep in Kirkland, Washington, and given how detrimental a security breach would be to the company’s reputation I figured that the risk is small.

3. Moving the domain

How do you move your company domain from one Office 365 account to another? MigrationWiz has a help document on this which is mostly helpful. You do have to accept some email downtime. I did what MigrationWiz suggests, which is to point the MX records for the custom domain at an unreachable site, temporarily. You can do this in the middle of the night or at the weekend to minimise the inconvenience.

However, I did not like this advice:

Delete all users, contacts and groups from the source Office 365 account.  This step is important to ensure that no object reference the domain.  Just removing the email address from objects is not sufficient.

I am cautious and wanted to keep the old site intact with its mailboxes until the business says it is confident that everything has been transferred successfully. Therefore I tried doing this the way Microsoft suggests:

  • Remove all references to the custom domain from the old site. This includes making sure it is not the default domain, and removing any email addresses which reference it, not only from users, but also from mail-enabled groups or resources in Exchange. If you have a public web site using the custom domain, remove it from there as well.
  • Remove the custom domain from the old site.
  • Add the custom domain to the new site, verify it, and amend the DNS records as needed.

I was successful and moved the custom domain without having to delete the old user accounts.

4. Reconfiguring Outlook

What happens when users now run Outlook? Might Outlook prompt for the new password (presuming you changed user passwords), connect to the new site, and upload the contents of its old mailbox to the new mailbox, duplicating the work of MigrationWiz and leaving users with two of everything?

Apparently it does not do this, though my recommendation is to delete the old Outlook profile (mail applet in control panel) and create a new one before attempting to connect to the new account. Outlook will have to re-download the mailbox, though it is smart about downloading new and recent emails first.

5. Migrating Intune

If you also use Intune, you have to set up a new Intune account linked to the new Office 365 domain (even if the custom domain is the same), and remove PCs from the old Intune account. You do this by “retiring” them in the Intune portal. This is meant to set up a scheduled task on the client PCs which removes the Intune client. Then you can join the client PC to the new Intune account by running the Intune client setup from the Intune portal.

If this does not work, and the client PC remains stubbornly enrolled to the old Intune account, you can use this procedure:

  1. Open an admin command prompt
  2. Navigate to C:\Program Files\Microsoft\OnlineManagement\Common
  3. Run "ProvisioningUtil /UninstallAgents /WindowsIntune"

It will create a scheduled task and shortly uninstall all the agents. (be patient)

For more information on removing the Intune client, see http://douwevanderuit.wordpress.com/2014/01/30/removing-windows-intune-client/.

There is a downside to this. Imagine you have used Intune to suppress some update that breaks something on your client PCs. When the Intune client is removed, the PC will revert to using Microsoft Update until it is re-enrolled in the new Intune. During that time it may install the update you were trying to suppress.

Note:

On one machine we got this error when reinstalling the Intune client:

image

“The software cannot be installed. The account certificate must be in the same folder as the installer, or the user account must already be authorized to use Windows Intune”

My guess is that the new Intune setup is fining the old Intune account certificate and therefore failing. The fix is to download the setup manually from the Intune Admin portal. This setup is a zip which includes the account certificate (the .exe download is different and does not include the certificate – you must use the zip setup). This setup ran successfully and rejoined the machine to Intune.

6. Why is this necessary?

Everything worked and while it is not entirely pain-free, with relatively little inconvenience for the users.

However, how difficult would it be for Microsoft to adapt its “switch plans” wizard to accommodate this kind of switch, subject to the proviso that anything which depends on a feature that does not exist in the target plan would not be migrated?

In fact, I am not sure why it is necessary to have so many plans at all. Why not have it so that you can mix and match licenses from any plan?

Something that needs fixing in Office 365: sometimes you cannot log out

Microsoft is notorious for asking users to log in multiple times, even when you check “Keep me signed in”.

Now we have the opposite problem. Here I am in Office 365, logged in as the admin user:

image

I need a break and want to stay secure, so I drop-down the menu top right and choose Sign out:

image

Lo, I am still signed in:

image

And no, it is not just a browser cache issue or similar. You can still do administrative tasks.

I have seen references to the bug in Microsoft support forums, so it is known, but unfixed for ages.

I do not publicise this sort of stuff because of any antipathy towards Microsoft. Rather, I do it because it needs to be improved.

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.