Advantages of Azure WorkerRole vs. starting a new thread

北战南征 提交于 2019-12-11 11:08:18

问题


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


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/9916211/advantages-of-azure-workerrole-vs-starting-a-new-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!