VMs for Web and Worker Roles in Windows Azure

This is my current mental model for Virtual Machines (VMs) for Web and Worker Roles in Windows Azure:

VMs for Web and Worker Roles in Windows Azure v2

On Windows Azure, you run your application in Web and Worker Roles.  Each instance of a Web or Worker Role runs in a VM.  You define how many instances of each Web or Worker role you want to run.  Windows Azure then spins up a VM for each instance.  You can choose from 4 flavors of VMs: one core, two core, four core, and eight core.

Here is a summary of the key components:

  • Web Role - includes Internet Information Services (IIS) and can accept HTTP and HTTPS Requests.  A Web Role talks to a Worker Role indirectly through a queue, or you can talk directly using WCF.
  • Worker Role – is not configured with IIS and is primarily for background processing, such as queuing, monitoring, or ticket-system scenarios.
  • Windows Azure Agent – each VM has an agent that lets your application talk to the Windows Azure Fabric using an API.

The load balancer spreads the incoming HTTP or HTTPS requests across your Web Role instances.

For a higher-level view, see my related post, Windows Azure Platform at a Glance.