azure - 如果 Web 应用程序出现故障,Azure Webjobs 也会出现故障吗?

标签 azure azure-webjobs

我想编写一段代码来将我的网站状态报告到状态页面,因此我正在考虑使用时间触发的作业,每 5 分钟从应用程序洞察中读取一次并向状态页面报告。

唯一让我担心的是,如果网站出现异常并且宕机了怎么办?我也应该能够报告这一点。

我知道它们位于同一物理空间,因此如果这是问题,两者都会出现故障,但是正常的异常(exception)情况又如何呢?

我找不到相关文档。

最佳答案

不,虽然 webjobs 运行 in the same sandbox它们在同一虚拟机上的不同进程中运行。它们不具有相同的 web 应用生命周期:

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.

所以除非整个服务器宕机,否则一切都会好起来的。

关于azure - 如果 Web 应用程序出现故障,Azure Webjobs 也会出现故障吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51855070/

相关文章:

azure - 如何使用 "Output File Tracing"功能将 NextJs (SSR) 部署到 Azure 应用服务?

在 Terraform 中使用时,Azure 服务主体获取 "Authorization_RequestDenied"

azure - 我应该使用一个还是多个 CloudBlobContainer 来存储图像?

sql - 如何在 SQL 中为具有多个关系的相关地址创建新的标识符?

c# - 使用 Microsoft.Azure.WebJobs.Extensions.ServiceBus 5.5.1 以编程方式设置连接字符串

azure - 如何获取连续 Azure WebJob 调用的详细信息

Azure Web 作业、Azure 服务总线队列触发器防止消息被删除

.net - HTTP 错误 400。请求 header 的大小太长

Azure WebJobs 连接字符串配置(AzureWebJobsDashboard??)

c# - 从应用程序服务调用 Azure Webjob