Question

I was under the impression that a Web Service that should be run under a worker role. I just found out that a web service can be setup using the web role. What are the advantages to using one role over the other ?

Was it helpful?

Solution

I answered a similar question here. Note that, even with a Web Role, you'll have your choice of hosting your web service via IIS or on your own with a Service Host.

Back in March, there was an update to input port handling, so now you can spread your input ports out across your roles in any fashion you like, even having up to 25 in one role. This mitigates issues related to single-role deployments with RDP enabled (since in that case, RDP consumes 2 input ports). See my blog post here for more info about port allocation, as it really opens up options for you when setting up service-hosting.

OTHER TIPS

If you use the Web Role, your service will be hosted in a full IIS, and you can for exemple co-host it with your Web site, and use all of IIS features.

If you go for a Worker Role, you will have to new up a ServiceHost to host your service. You will not run within IIS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top