IS Azure Webjobs have its own memory allocation?

断了今生、忘了曾经 提交于 2019-12-13 14:41:12

问题


I am new to Azure web-jobs. When I am working with web-jobs I have come up with an question that whether web-job have its own memory allocation like process?

we are creating web-jobs under website(web app) so for website a separate memory will get created.And then we are creating multiple web-jobs under that website in azure.

so if static class gets instanciated under azure website instance.then web-jobs which uses that static class concurrently,will leads to data loss? like this

eg:

website --> static class1 memory instance get created.     
In webjob1 --> uses above created class1.      
In webjob2 --> uses above one class1.  

Webjobs uses only reference(shallow copy)

or

since webjob working as a process,it will create static class instance on its own memory?

eg:

In webjob1 memory --> static class1 memory instance get created inside webjob1's allocated memory.    
In webjob2 memory --> static class1  memory  instance get created inside webjob1's allocated memory.etc...   
both have its own static class like(deep copy)

Can anyone explain how it works? thanks in advance


回答1:


Each WebJob runs in its own process, which is distinct from the WebApp's process (w3wp). So they will each have their own copy of static variables.



来源:https://stackoverflow.com/questions/38121776/is-azure-webjobs-have-its-own-memory-allocation

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