Vince
Vince

Reputation: 615

Advantages of Azure WorkerRole vs. starting a new thread

Can someone please summarize the advantages of creating an Azure WokerRole vs. simply starting a new thread?

Upvotes: 1

Views: 367

Answers (3)

Simon Opelt
Simon Opelt

Reputation: 6211

I assume you mean starting a new thread from an IIS-hosted service/app in a WebRole. My main concern would be recycling of IIS app pools and memory consumption. Depending on the type of application, load on your application and IIS settings you don't have a lot of control over the lifecycle and resources of the process your thread will be living in.

Upvotes: 0

BrentDaCodeMonkey
BrentDaCodeMonkey

Reputation: 5513

The primary advantages IMHO are that you create a seperation of concerns as well as the ability to dependently scale the capacity of the background process and front end.

Upvotes: 3

Zoltan
Zoltan

Reputation: 165

By starting a new worker role instance you have all of the memory and CPU available to that instance size vs. when creating threads you'd be sharing the resources of one role for that instance size.

I would say that it also depends on what you're processing. Also, I think that threading or any parallel processing only makes sense when you're using a Medium instance and up where you have 2 or more cores.

Upvotes: 3

Related Questions