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:
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
Anonymous
February 17, 2010
JD - this series is coming along very well! Keep posting! Good stuff!Anonymous
February 17, 2010
Thank you!Anonymous
February 19, 2010
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?Anonymous
February 19, 2010
@ 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/.Anonymous
February 21, 2010
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.Anonymous
February 22, 2010
@ RP Yes, I would be interested in the answer. Thank you.Anonymous
February 25, 2010
The comment has been removedAnonymous
February 26, 2010
The comment has been removedAnonymous
February 26, 2010
J.D., Thank you. How about load balancing between web role instances? is that done thru hardware? Thanks