Azure 持久函数维护什么状态?

What state is maintained in Azure Durable functions?

在查看 Azure Durable 函数时,他们提到我们可以编写有状态函数。有状态是什么意思,维持什么状态?我们是在谈论函数的 运行 状态吗?

有状态函数是具有状态的函数,也就是说,一些数据与函数相关联。在我们的具体案例中,我们谈论的是:

  • 管理工作流程的状态(我们在哪一步)
  • 创建进度检查点(到达检查点时,状态会改变)
  • 保留执行历史记录
  • 正在安排activity

来自docs

Durable Functions is an extension to the Azure Functions runtime that enables the definition of stateful workflows in code. By breaking down workflows into activities, the Durable Functions extension can manage state, create progress checkpoints, and handle the distribution of function calls across servers. In the background, it makes use of an Azure Storage account to persist execution history, schedule activity functions and retrieve responses. Your serverless code should never interact with persisted information in that storage account, and is typically not something with which developers need to interact.