3
votes

I am new to Windows Azure and confused about web / worker roles and instances. I plan on deploying a web application that uses WCF services for the back end. I have a few questions:

  1. Am I correct in saying that I need one web role to host the web app and another secondary web or worker role to host internal WCF services?
  2. How many instances of each should I start with? Is it a good idea to have two instances of each web / worker role i.e. incase one is unavailable?
  3. I would imagine having more than one instance also allows for automatic load balancing?
1

1 Answers

2
votes

Am I correct in saying that I need one web role to host the web app and another secondary web or worker role to host internal WCF services?

Yes. Web Roles are suitable for hosting web applications (websites, web services etc.) and Worker Roles are suitable for hosting background applications which does not require user interaction (think of them as hosting Services like applications running on your local computer).

How many instances of each should I start with? Is it a good idea to have two instances of each web / worker role i.e. in case one is unavailable?

Yes. In fact to get SLA guarantee from Microsoft, you would need to have 2 instances of your role running.

I would imagine having more than one instance also allows for automatic load balancing?

Yes. By default all web role instances are load-balanced using round-robin load balancing. AFAIK, worker role instances are not load balanced.