Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple worker roles on the same instance

How can I setup Windows Azure to multiple worker roles is running on the same instance? Is it possible?

like image 547
Tomas Avatar asked May 31 '12 06:05

Tomas


1 Answers

I think you misunderstand what a Worker Role is. Web and Worker Roles are Window Server VMs, the main difference being Web Roles have IIS running. You may have multiple instances of each.

There's really no such thing as "multiple worker roles in the same instance." Think of Worker Role as a template for your virtual machine: the startup scripts and the event-handling code to deal with messages such as startup and shutdown, along with the code you write that gets packaged and run inside the virtual machine.

From the OnStart() or Run(), you may run pretty much any code you want. Kick off multiple threads, run server code (like Tomcat), etc. Whatever code you have will run in each instance. As you scale out to multiple instances, this same VM template is used on each of those instances.

Please see this answer as well, where I provide a bit more detail.

like image 67
David Makogon Avatar answered Sep 21 '22 21:09

David Makogon