DOWNLOAD DEMO
Current Version: 2.3.8.1 2012-01-26
Need a hand? Join the community.

Overview of the Windows Azure Platform

Windows Azure is the cloud hosting environment from Microsoft. It consists of a number of related components. There is SqlAzure for the database, Azure Blob Storage for storage of files as well as storage of objects in tables like other NoSql databases, Azure Web Roles and Worker Roles, as well as facilities for AppFabric Caching and Service Busses.

Understanding Web Roles

You can think of a Web Role as being a VM (Virtual Machine) with IIS running on it and with your web application installed in it. When you deploy your application as a Web Role the application is part of the virtual machine image. It allows scaling because more copies of the VM can be brought online and the load of traffic can be spread among the different instances of the Web Role by load balancing. However, an important thing to understand is that when a VM is taken offline or brought online it is exactly as it was when you first deployed it as a web role. That means if you uploaded any files using your web application those files won't be part of the image and therefore will not be there when the VM is rebooted nor will new instances of the VM have the file. So when you make file changes to your web application, even simple things like changing settings in Web.config you have to redeploy the entire app to the web role again (which is basically like re-defining the VM Image). To make it easier to manage Azure Web Role deployments, there are various Azure Accelerators that have been posted to codeplex. I would describe them as Synchronization frameworks, that make things a bit easier. We've modified one of these Azure Accelerators to be more generic so it can be used with mojoPortal. See Using a Synchronization Framework to Run mojoPortal on Azure.

Understanding Worker Roles

Worker Roles are also virtual machines but they are not meant for running IIS, they are more akin to Windows Services. They are not the same thing as Windows Services but are very similar in concept and their use in cloud hosting would be for things that you would typically think of using a Windows Service for. See this article which presents an example of migrating a Windows Service to an Azure Worker role.

Understanding SqlAzure

SqlAzure works very much like SQL Server though there are a few limitations on the maximum size of a database and other compatibility issues. The mojoPortal data layer for SQL Server works just fine with SqlAzure, so you just set your connection string to the SQLAzure database and it should just work.

Azure Pricing

Azure is a high end hosting environment, it is rather expensive and not something to use for the average web site. In my experience having a test site setup with a database and a storage account was running about $3-4/day even when it was not being used and getting zero traffic. There is an Azure Pricing Calculator that can help you estimate the costs of Azure hosting, and you can find some more details in this blog post.

Created 2011-09-27 by Joe Audette