Wednesday, November 18, 2009

I Want To Like Microsoft Azure

I want to like Microsoft Azure. I really do. I've been using Google App Engine for more than a year now (Puzzazz, SeattleTechCalendar and the FriendMosaic front end run on it). I'm also familiar with Amazon's Elastic Computing Cloud or EC2 (the FriendMosaic back end runs on it). Both have advantages and disadvantages.

Google App Engine is a wonderfully scalable system that requires programming to a very specific, narrow API and use of Google's BigTable database rather than a more traditional SQL database. It's super easy to get going (literally, you can have an app running in the cloud within minutes of installing the SDK). Scaling is completely, totally automatic, and you pay for the capacity you use, when you use it. But, App Engine isn't appropriate for apps that require a lot of processing power, and you can't easily take the application elsewhere.

In contrast, EC2 is very flexible. You can run Unix, Linux, or Windows on virtual machine instances and you get pretty complete control of these instances, as if they were real servers. And, if you grow big enough to afford your own servers, its easy to move those instances to your own physical boxes. But, it's much more of a pain to get going and scaling is awkward. You have to allocate complete instances of different sizes as if you're deploying real hardware and to change your capacity to respond to changing needs, you have to add or remove instances. If an instance crashes, you lose any local storage on the machine. And, you pay for active instances even if they are sitting there doing nothing.

When I first heard about Azure, I thought it was a brilliant way to split the difference and get the advantages of both systems -- a wonderfully scalable system with great flexibility. Sadly, Microsoft has produced the exact opposite -- a poorly scalable system which requires developing to a special API that limits flexibility. In other words, the disadvantages of both systems.

Azure uses instances, just like EC2, which means that scaling is by instance, not automatic. At launch, apparently you'll be able to configure this to happen semi-automatically, but it's still the case that you have to run an entire instance even if you have no traffic for it and you have to decide when additional instances get added and what capacity they have, instead of having it just work, as Google has done with App Engine. And, Azure isn't Windows. You can't just take a Windows application and plop it onto the box. In fact, you don't control the virtual box. You can't install helper applications on it. Instead, you have to program to the Azure APIs, meaning can't easily take an Azure-based app elsewhere (or take a non-Azure app and just have it work, like you can with EC2).

It's not too late. Azure does have some of the advantages of both App Engine and EC2 (a simple model, flexible, powerful), plus Azure has some nice advantages all its own. The way they've defined roles is very nice (especially if they clean up the definition of the worker role, which I'm assuming they will) and potentially more flexible than the App Engine way of doing everything through a URL. A certain amount of sandboxing can be a good thing. And, of course, C# can be a joy to program in, with the best IDE and debugger on the planet (I'm still waiting for a decent Python debugger).

And, really, there's only one (big) change necessary. Azure needs to automatically scale, so developers just create code for the roles and everything else works, with as much hardware as necessary allocated on demand (and not allocated when you don't need it). With their architecture, Azure could accomplish this really well, if they choose to do so. Then they can add additional role types with different feature, performance, and scaling properties. But, if they don't do this, I don't know why anybody would use it over the competition.

Update: Microsoft has created a new site MyGreatWindowsAzureIdea tbat's worth taking a look at. It's a voting site using UserVoice. The current top votegetter is "Make it less expensive to run my very small service on Windows Azure," with twice as many votes as the runner-up.


Anonymous said...

The absense of automatic scaling was afaik a business decision based on the risk of incurring astronomical costs if traffic suddenly became astronomical. Think DDoS attacks on a cloud hosted website ... I agree with you however, a simple "maximum instance" setting and automatic scaling within those bounds would have been pure win.

Roy Leban said...

@Q: Excellent point. Automatic scaling doesn't have to mean infinite scaling. There are lots of ways they could do it where that wouldn't be an issue.

Unknown said...

Azure will be supporting a virtual machine role very soon - you will be able to run anything in the cloud like you can on Amazon. You will very much be able to take applications not currently on Azure and run them on there with little to no changes required, and vice versa. The tooling MS are providing for all this looks fantastic, especially with the introduction of AppFabric for Windows Server which will provide the same application platform on-premise as you can get in the cloud, making interchanging between the two even easier.

Craig said...

I think the lock in to the Azure platform is a bit overstated. That major applications such as Wordpress can easily be run on Azure tells me the the story. Do you think they rewrote Wordpress to make it run on Azure?

Roy Leban said...

@Luke: Microsoft and WordPress did that demo after I wrote this post, but that doesn't really matter. The ability to run arbitrary apps puts them in more competition with EC2 rather than differentiating them. And you still don't "own" the box. That turns into a price war, not a feature or power war. Microsoft might win but price wars frequently produce two losers.

I think Microsoft has the chance to be a significant player in this space, but only if they provide something better that plays up to their strengths.

Anonymous said...

I think you are confusing too many parts of Azure. You can ignore most of the Azure API.

You have control over the Virtual machines, so you can go and install Tomcat, apache, etc. on them now. Base line the image, and deploy your application to instances of that VM.

If you do it that way, then it will scale as well as the same app on EC2.

If being locked into "Azure" and not being able to go from your on premise to Azure, then look at the "App fabric" (as dublin) that will now let you deploy the same app to both places.

Craig said...

I would have liked to have seen them be more like App Engine, with the auto-scaling capability. I don't wan't to spend $90/month for IIS to sit there and listen for connections that don't come in, and a worker process that doesn't have anything to do. However, when those processes do have something to do, I then have no problem possibly paying a bit of a premium for that time. As it is now, it strikes me as a little bit harder to use version of EC2, so why would I bother?

Roy Leban said...

NOTE: I forgot to release the second comment above by Craig (and the two Craigs are different people). My response above directed @Luke was actually intended to be @Craig. Sorry for any confusion.

Post a Comment