In the previous article in this series I introduced the Windows Azure Platform and described the three basic components of Windows Azure, the Compute and Storage services and the Fabric Controller.

Let’s now take a look at how Windows Azure scales out.

The windows Azure Compute Service can run many kinds of applications.  The primary purpose, however, of the Windows Azure Platform is to support applications that have large numbers of simultaneous users.  After a while scaling-up, using bigger and bigger machines to support more and more users, is no longer possible.  So Windows Azure is designed to support applications that scale out, using multiple instances of the same code running on multiple machines.

To accomplish this, a Windows Azure application can have multiple instances, with each instance executing in its own virtual machine (VM). Each VM is provided by a hypervisor (based on Hyper-V) that’s been modified for use in Microsoft’s cloud, and it provides a Windows interface to the instance it contains.

Figure 1: A typical Windows Azure Application Running on Multiple Virtual Machines
Azure_Dev_11

Windows Azure currently supports two instance types – a Web Role Instance and a Worker Role instance (Figure 1).

As its name suggests a Web Role can receive incoming HTTP or HTTPS requests and a Web Role instance includes IIS7 to provide this support.  Developers can use ASP.NET in the Web Role but they are not restricted to this technology – PHP or other web technologies can also be used.

Worker roles are similar to Web Roles but they do not have IIS7 installed and so they cannot receive Web requests (HTTP or HTTPS) directly.  They are usually used to process background tasks.

A Windows Azure Application can consist of all Web Roles or all Worker Roles but typically will be a combination of the two.  If an applications load increases more instances can be launched, depending on the load this may mean more Web Role instances, more Worker Role instances or both.  If the load then decreases the extra instances can be stopped.

In a production environment this is managed through the Windows Azure Portal.  In a development environment the developer can configure the initial configuration by modifying the properties of the Cloud Service.

If we go back to the “Hello Cloud” Application we created in the first article, we can see that in the HelloCloudService project there is a Roles folder which contains a single “Role” – the Hello Cloud Web Role, that is the other project in the solution (Figure 2)

Figure 2: The Hello Cloud Solution in Solution Explorer
Azure_Dev_5

If we right-click on the HelloCloud role in the Roles folder, and select Properties, we can configure this Role.

Figure 3: Configuring the Hello Cloud Web Role
Azure_Dev_12

We can set the size of the VM and the number of instances to launch, when first deployed.  The VMs can be Small, Medium, Large or Extra Large.  Each type has a different number of CPU cores, system RAM and local Storage – see http://msdn.microsoft.com/en-us/library/ee814754.aspx for the exact configuration of the available VMs.

In a multi-Role Application, each Role can be separately configured and customized for the expected demand, and once launched the Windows Azure Portal can be used to add or delete running instances according to demand.

In the next article we will take a look at the Storage Service and how that can be used in Windows Azure applications.


In the previous article in this blog series on Windows Azure, I showed how you can download the tools that Microsoft provides to develop your own Windows Azure application and we developed our very first “Hello Cloud” application.

So far – so good.  But what is Windows Azure and why should we care?

Lets first look at what Microsoft says on its Windows Azure site.

The Windows Azure platform offers a flexible, familiar environment for developers to create cloud applications and services. With Windows Azure, you can shorten your time to market and adapt as demand for your service grows.

There are a number of key words and phrases in this marketing statement.

  • Platform – Windows Azure is a platform – as a platform it will provide a number of key services.
  • Cloud Applications and Services – Windows Azure allows developers to create cloud applications and services.  ie it is not for writing desktop applications or even simple web sites
  • Shorten … Time to Market – As Windows Azure is based on technologies that we already know it can reduce the time it takes developers to create Azure applications
  • Adapt as Demand .. Grows – Windows Azure provides easy configurable scalability which allows you to scale your application to meet demand.  This can be scaling up to meet increasing demand AND equally scaling back to meet reduced demand.

There are four major components that make up the Windows Azure Platform.

  • Windows Azure – the windows Azure Operating System
  • SQL Azure – A cloud service based on the familiar SQL Server.
  • AppFabric – Services which allow you t “connect” cloud services with “on-premise” applications
  • Codenamed “Dallas” – A standards based information marketplace

This is summarized in Figure 1 (from www.windowsAzure.com)

Figure 1: The Windows Azure Platform
 Azure_Dev_8

 

Windows Azure

Windows Azure is the backbone of the Windows Azure Platform.  windows Azure runs on machines in Microsoft Data Centres.  Rather than an Operating System that can be installed on an individual PC, Windows Azure is a service that runs in the cloud.  While ii is not strictly an Operating System (OS), users can install applications that run on Windows Azure, so in many respects it looks like an OS.

Figure 2: Windows Azure runs in Microsoft Data Centres
Azure_Dev_9

There are three main components to Windows Azure.

  • Compute – The Compute service runs Windows Azure applications
  • Storage – The Storage service stores data in Blobs, Tables and Queues
  • Fabric – The Fabric service provides a common way to manage and monitor applications
Figure 3: The three main components of Windows Azure
Azure_Dev_10

This has been a very brief overview of what Windows Azure is.  In the next, article I will look more deeply at the Compute Service and how windows Azure scales out.


Posted in: Azure  Tags: , ,

I am learning Windows Azure so I can present a session at my local .NET User Group.  Presenting is a good way to learn a new topic.

As I work my way through the material I am going to present, I have decided to blog about it as I go.

Windows Azure is Microsoft’s answer to Elastic Cloud Computing - the ability to run applications in a hosted Data Center, paying only for what you need, when you need.  For example if I have a site that has a steady amount of traffic for most of the week, but one day a week I receive 2-3 times as much traffic, I do not want to have to pay for resources and bandwidth to serve the peak load every day.  It would be much more economical to run with the resources I need for the rest of the week and just load extra resources when needed.  This is what Elastic Cloud Computing does and Windows Azure is Microsoft’s solution to the problem.

My first topic is all about getting started.

First we need to install the Windows Azure Tools for Visual Studio.  This package include both the Visual Studio Tools for working with Azure as well as the SDK (Software Development Kit) which also includes a local implementation of the Azure.

Browse to www.windowsazure.com or www.microsoft.com/windowsazure and you will be presented with the home page for Windows Azure.

Figure 1: The Windows Azure Home Page
Azure_Dev_1

To obtain the Development Tools click on the “Get Tools and SDK” link on the right hand side.

Figure 2: The Download Page for Windows Azure Tools

Azure_Dev_2

Click download to download the tools to your local machine (see Figure 2)

When you have downloaded,  run the executable to install the tools and SDK.

Once installed you will be able to create a new “Windows Azure Cloud Service” project (see Figure 3). For my examples I will be using Visual Studio 2010, but if you are using Visual Studio 2008 the tools work in pretty much the same way.

Figure 3: Creating a new Azure Cloud Service Project in Visual Studio 2010
Azure_Dev_3

Once you have filled in the information for the Name of the Cloud Service Project and Solution and chosen where to save the files, you will be prompted to add Cloud Service projects (see Figure 4)

Figure 4: Adding a Web Role to the Solution
Azure_Dev_4

You can add more than one project at once, but for this example we will click OK to add the Hello Cloud Service and ASP.NET Web Role.

Figure 5: The resulting solution in Solution Explorer
Azure_Dev_5

The Add Cloud Service Wizard created two Visual Studio projects (see Figure 5).

  1. HelloCloudService – this project contains configuration information for Windows Azure
  2. HelloCloud – a standard ASP.NET 3.5 Web Application Project

Even though ASP.NET 4 was released earlier this week (April 12th, 2010), as of the time of writing Windows Azure only supports ASP.NET 3.5 (it is expected that .NET 4 support will come soon).

To complete our first (Hello Cloud) Application lets edit the Default.aspx page to display “Hello Cloud”.

Listing 1: The edited Default.aspx file
   1:  <html xmlns="http://www.w3.org/1999/xhtml">
   2:  <head runat="server">
   3:      <title>Hello Cloud</title>
   4:  </head>
   5:  <body>
   6:      <form id="form1" runat="server">
   7:      <div>
   8:          Hello Cloud
   9:      </div>
  10:      </form>
  11:  </body>
  12:  </html>

Now we are ready to run our first Windows Azure Application.  Ensure that the Cloud Service is the Start-Up project and, just like any Visual Studio project click F5 to run.

The Cloud Service will launch the Windows Azure Development Fabric and initialize the Development Storage service.  By default, the Windows Azure Development Fabric assumes that the Development Storage should use the default instance of SQL Server Ex press ie .\SQLExpress.  If you want to use SQL Server, as I did, there is a command-line tool in the Azure SDK (DSInit.exe) that you can use.  Browse to [install disk]:\Program Files\Windows Azure SDK\v1.1\bin\devstore (the version number will vary depending on the version of the Azure SDK) and execute the command line – dsInit /sqlInstance:<NamedInstance> – using “.” for the default instance (Figure 6).

Figure 6: Configuring Development Storage for use on a default instance of SQL Server 2008
Azure_Dev_6

When you click F5, instead of the Visual Studio Web Development Server (aka Cassini) launching and displaying the Default.aspx page, the Windows Azure Development Fabric launches to display the page (Figure 7)

Figure 7: Hello Cloud running on the Windows Azure Development Fabric
Azure_Dev_7

Congratulations you have created your first Windows Azure Application.  In the next part of this series we will spend a little time on how this all fits together.  We will then look at how we make our applications scale.


Posted in: Azure  Tags: ,

 Search Blog

 Adsense

 Calendar

«  September 2010  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
View posts in large calendar

 Tags

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Thoughts from the Wet Coast