After my TechDays’ presentation I was asked why we prefer to use Azure Virtual Machines for our web site hosting instead of Azure Web Roles. Here’s a little more structured answer to that question.
Let’s start by going through our requirements for the web site hosting platform. The main things we hope to have are:
- Ease of deployment
- Support for running ASP.NET and Node.js sites
- Support for custom certificates
The problem with Azure Web Sites
Even though the original question didn’t touch Azure Web Sites, I thought about covering that option too. The Azure Web Sites is a great platform but it has a one big glaring problem, making it unsuitable for the production usage: The lack of support for custom certificates.
Other than that, Azure Web Sites offer really fast and easy deployment options and also the Node.js is supported.
Almost there with Azure Web Roles
The Azure Web Roles provide the support for custom certificates and for Node.js, making it ready for production usage. But the platform lacks in the ease of deployment. By default, updating a site is slow and it’s hard to run multiple applications in the same Web Role. The last bit is especially true if one wants to run both Node.js and ASP.NET apps on the same role.
The Azure Web Role platform pushes the developer into the “one app, one service” direction. This causes problems when you have limited resources (money).
Flexibility with Azure Virtual Machines
If you want to combine the Azure Web Site''s’ ease of deployment with Azure Web Roles’ readiness for production usage, the Azure Virtual Machines offer a good solution. Even though it takes some time to set things up, there’s plenty of good documentation available. We’ve setup our web servers using the following tools:
- DFSR to keep the web servers in sync
- IIS configured to use “shared configuration” and “Centralized Certificate Store”.
- Web Deploy enabled on one of the servers (provides the options to “Push” web sites from Visual Studio)
- IISNode for running Node.js
- FTP-deploy for static sites and Node.js apps
- Load Balancing is handled by Azure’s built-in load balancer
Here’s our requirements and the hosting options collected into a single table.
|Feature / Platform||Azure Web Sites||Azure Web Roles||Azure Virtual Machines|
|Ease of Deployment||X||X|
Windows Azure Accelerator for Web Roles
Windows Azure Accelerator for Web Roles deals with the deployment problem of the platform. Unfortunately, the original project is now deprecated. Fortunately, robdmoore’s fork of the project is been actively developed.
The Azure Web Sites Private edition
The tools for running a private Azure Web Sites platform are available from the Web Platform Installer (Windows Azure / Service Management…). It seems that these tools support custom certificates. More info about this solution is available through the Microsoft.com/hosting.