Freigeben über


Speed Windows Azure Deployment with the Accelerator for Web Roles

One pain point I hear from Windows Azure developers is around deployment times.  To the end user, when you deploy an application in Windows Azure, you’re simply uploading a relatively small “package” (.cspkg) file containing the files of your web application. When you do this, it can sometimes take 10-15 minutes for your site to be deployed.  If you need to make even a minor change to the text on your site’s homepage, you modify the text, upload a new package file, and wait another 10-15 minutes to deploy.  10-15 minutes might be acceptable for the initial deployment of an application to Windows Azure, but if you want to do iterative development & deployment, subsequent deployments need to happen much much faster.

Why does this process take so long?  On any other Windows web host, you would FTP or WebDeploy the modifications and they would be “live” almost instantaneously!  The reason this process takes long on Windows Azure is because you’re not just uploading your modified “default.html” file to a live running web server.  Windows Azure’s “platform-as-a-service” offering provides a dedicated virtual machine for every application you deploy.

Every time you deploy a new package file to Windows Azure, the Azure Fabric performs several tasks, including: spin up a new virtual machine, configure the DNS settings, any load balancing, and then configure IIS to run your application.  There are likely other things that go on under the covers too that I’m not aware of, but I think you get the point:  Deploying a new package file takes time. 

Windows Azure Accelerator for Web Roles

WAAWebRolesWindows Azure 1.4 introduced the ability to have access to full IIS support earlier in 2011. This opened up the opportunity not only to host multiple web sites in a single web role, but also for a nifty solution to long deployment times.  On July 5, 2011, Nathan Totten announced a solution that will help speed up web deployments to Windows Azure, the Windows Azure Accelerator for Web Roles (from here on out, “WAAWR”).

WAAWR works by handling web application deployment differently in Windows Azure.  At the simplest level, WAAWR works by deploying a special web role that includes an administrative web site and a background service.  Your web site “package” is deployed to Azure’s blob storage.  The WAAWR background service running in the web role monitors the blob storage.  When it detects a “package” has been deployed to blob storage, it loads it into IIS in that web role.  From there on out, you can do iterative deployments to blob storage, and the WAAWR service will continue to load them into IIS.

Here are some things that I think are great about WAAWR:

  • The process of loading a site from blob storage into IIS takes 30 seconds on average!
  • The WAAWR administrative site makes it easier to manage & configure multiple sites running in the web role.
  • WAAWR works across multiple instances. Therefore, a single web application deployment to blob storage can quickly update all instances.
  • This is a durable process that will keep web role instances in sync, even if they are torn down and spun up from scratch.
  • This process also works for PHP web sites.

Here are a series of six blog posts out there that I read before writing this post.  I recommend you read through each of them if you’re interested in checking out WAAWR.

Of course, you can get the actual WAAWR bits up on Codeplex at: https://waawebroles.codeplex.com

This looks to be a promising solution for making web application deployment faster on Windows Azure.  Let me know what you think.