如果 web 应用程序出现故障,Azure webjobs 是否会出现故障?
Will Azure webjobs be down if the web application goes down?
我想编写一个代码来将我的网站状态报告到状态页面,所以我想使用一个时间触发的作业,该作业从应用程序洞察中读取并每 5 分钟向状态页面报告一次。
唯一让我担心的是,如果网站出现异常,宕机了怎么办?我应该也可以报告。
我知道它们在同一个物理设备上 space 所以如果那是问题,两者都会关闭,但是正常的例外情况如何?
我找不到相关文档。
不,尽管 webjobs 运行 in the same sandbox 它们 运行 在同一 VM 上的不同进程中。他们不共享 webapp 的相同生命周期:
Azure WebJobs run within the sandbox of the web app. This means that they can access environment variables and share information, such as connection strings, with the web app. The job has access to the unique identifier of the machine that is running the job.
所以除非整个服务器宕机,否则你会没事的。
我想编写一个代码来将我的网站状态报告到状态页面,所以我想使用一个时间触发的作业,该作业从应用程序洞察中读取并每 5 分钟向状态页面报告一次。
唯一让我担心的是,如果网站出现异常,宕机了怎么办?我应该也可以报告。
我知道它们在同一个物理设备上 space 所以如果那是问题,两者都会关闭,但是正常的例外情况如何?
我找不到相关文档。
不,尽管 webjobs 运行 in the same sandbox 它们 运行 在同一 VM 上的不同进程中。他们不共享 webapp 的相同生命周期:
Azure WebJobs run within the sandbox of the web app. This means that they can access environment variables and share information, such as connection strings, with the web app. The job has access to the unique identifier of the machine that is running the job.
所以除非整个服务器宕机,否则你会没事的。