A web role is a Microsoft server VM running Internet Information Services (IIS). A worker role is a Microsoft server VM not running IIS.
The Windows Azure VM role lets you run a virtual hard disk image, store that image in the cloud and load and run it on demand. You understand benefits of cloud computing, the efficiencies to be gained, the ability to scale your infrastructure based on immediate need and make more strategic use of IT staff.
1 Answer. Web roles and Worker Roles are basically two types of Azure Cloud Services roles and the only difference between the two is how your role is hosted on the VMs. Web roles are the type of applications which are hosted in IIS. Also, it helps in the automated deployment and hosting of your application using IIS.
Web Role is a Cloud Service role in Azure that is configured and customized to run web applications developed on programming languages/technologies that are supported by Internet Information Services (IIS), such as ASP.NET, PHP, Windows Communication Foundation and Fast CGI.
EDIT 3/3/2013 - updated to reference UDP endpoints, Virtual Machines, and more languages
EDIT 6/6/2013 - updated to reflect the discontinuation of VM Role, and update to web/worker role baseline OS images to Windows Server 2012
Good link by @Vladimir. A bit more clarification: All roles (web, worker) are essentially Windows Server. Web and Worker roles are nearly identical:
To answer your question about what to do with these roles: The Platform Training kit (mentioned below) will give you lots of good ideas and samples, but here are some straightforward use cases:
With Web and Worker roles, the OS and related patches are taken care of for you; you build your app's components without having to manage a VM.
With VM roles, you build a complete Windows Server image, add the Azure hooks to it, and push the entire VM into the cloud (and then maintain the VM image over time).
With Virtual Machines, you simply pick an OS image from a gallery, which gets created for you and stored as a vhd in blob storage. You then RDP/ssh and set it up how you like.
Wearing the architect hat, this is where it gets fun and interesting. You can run web services in a Web Role or worker role (and be able to open ports in either); You can host Tomcat or other web servers in a Worker role. you can choose to combine a website plus services in a single role, or split them into multiple roles for different scalability needs.
For a good start, take a look at the Platform Training Kit and start walking through the exercises.
I ran across this SO question/answer several days ago and I found the answers provided a bit over my head (I'm new at Azure and Web). I found this summary in the Azure fundamentals tonight which I thought was a good high level overview of the core differences between the worker and web roles:
The main difference between the two is that an instance of a web role runs IIS, while an instance of a worker role does not. Both are managed in the same way, however, and it's common for an application to use both. For example, a web role instance might accept requests from users, then pass them to a worker role instance for processing. To scale your application up or down, you can request that Windows Azure create more instances of either role or shut down existing instances. And similar to Windows Azure Virtual Machines, you're charged only for the time that each web or worker role instance is running.
If you're new at Azure development I highly recommend reading the full article here: Intro to Windows Azure
I hope this helps someone as much as it helped turn the light bulb on for me.
Web roles in Windows Azure are special purpose, and provide a dedicated Internet Information Services (IIS) web-server used for hosting front-end web applications. You can quickly and easily deploy web applications to Web Roles and then scale your Compute capabilities up or down to meet demand.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With