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.

Comments (9)

  1. anutthara says:

    JD – this series is coming along very well! Keep posting! Good stuff!

  2. J.D. Meier says:

    Thank you!

  3. RP says:

    Love your stuff!  

    The question I have is with the Worker Roles and exposing a socket interface externally (bypassing the Web Role altogether).  Is this supported?  Can it be supported without using WCF?  Assuming it is supported, what would be the story for load balancing then?

  4. J.D. Meier says:

    @ RP

    Thank you.   I think the Worker Role can make outbound calls, but can’t accept inbound calls on the Web.  I think the main scaling is adding VMs, but you should check out Manuvir Das’s video interview – http://channel9.msdn.com/posts/Charles/Manuvir-Das-Introducing-Windows-Azure/.

  5. RP says:

    Thanks JD.  When you hear about Worker Roles you hear the analogy of Windows Services.  With that analogy in mind, it is natural to assume that one could host a socket listener either using System.Network.Sockets or using WCF…  It looks like I will have to just open an account with Azure and dig in to find out.  I will let you know what I find if interested.

  6. J.D. Meier says:

    @ RP

    Yes, I would be interested in the answer.

    Thank you.

  7. Mohammad says:

    Can you please illustrate more on how the load balancing is done? what’s the technology used? is it a piece of software (maybe IIS?) or hardware?

    Is there load balancing done to distribute load between worker role instances?


    Mohammad Hajjat

  8. J.D. Meier says:

    @ Mohammad

    – the worker role is not load balanced

    – You balance the work simply through queuing (background processing) and allocating more worker roles as needed

    – if your worker role happens to make an outbound TCP or HTTP call, then that outbound call is routed through the load balancer

  9. Mohammad says:


    Thank you. How about load balancing between web role instances? is that done thru hardware?


Skip to main content