[论文解读] Serverless Workflows with Durable Functions and Netherite
本文提出了 Durable Functions,一种无服务器编程模型,使开发人员能够使用任何编程语言的标准代码编写复杂、有状态的工作流,以及 Netherite,一种分布式执行引擎,可高效扩展这些工作流。Netherite 通过使用分区、恢复日志、异步快照和推测性通信,实现低延迟和高吞吐量,在关键工作负载中相比现有无服务器工作流解决方案性能提升数个数量级。
Serverless is an increasingly popular choice for service architects because it can provide elasticity and load-based billing with minimal developer effort. A common and important use case is to compose serverless functions and cloud storage into reliable workflows. However, existing solutions for authoring workflows provide a rudimentary experience compared to writing standard code in a modern programming language. Furthermore, executing workflows reliably in an elastic serverless environment poses significant performance challenges. To address these, we propose Durable Functions, a programming model for serverless workflows, and Netherite, a distributed execution engine to execute them efficiently. Workflows in Durable Functions are expressed as task-parallel code in a host language of choice. Internally, the workflows are translated to fine-grained stateful communicating processes, which are load-balanced over an elastic cluster. The main challenge is to minimize the cost of reliably persisting progress to storage while supporting elastic scale. Netherite solves this by introducing partitioning, recovery logs, asynchronous snapshots, and speculative communication. Our results show that Durable Functions simplifies the expression of complex workflows, and that Netherite achieves lower latency and higher throughput than the prevailing approaches for serverless workflows in Azure and AWS, by orders of magnitude in some cases.
研究动机与目标
- 解决现有无服务器工作流解决方案在可编程性和性能方面的局限性。
- 使开发人员能够使用熟悉的编程原语表达复杂、有状态的工作流,而非使用声明式或非结构化组合方式。
- 构建一个可扩展、可靠的执行引擎,支持弹性扩展,同时将持久状态的存储 I/O 成本降至最低。
- 提供强大且开发人员可理解的可靠性保证——因果一致提交——确保依赖工作流步骤的原子性。
- 通过引入高效、批量化和推测性的状态管理机制,减少每个工作流状态持久化的性能瓶颈。
提出的方法
- Durable Functions 将工作流转换为宿主语言(如 C#、Python 或 JavaScript)中的细粒度、有状态通信进程。
- 该系统采用包含两种原语的计算模型:无状态任务和有状态实例,将编程模型与执行解耦。
- Netherite 使用分区技术将状态分布在多个节点上,实现弹性扩展。
- 它利用恢复日志确保进度持久性,并在故障后实现快速重启。
- 异步快照通过在任务完成后才延迟检查点操作,降低状态持久化的成本。
- 推测性通信允许在状态完全持久化前就开始消息传递,从而提高吞吐量并降低延迟。
实验结果
研究问题
- RQ1如何以一种既可编程又可组合的方式,使用标准编程语言表达无服务器工作流?
- RQ2何种执行模型能够实现有状态无服务器工作流的高效、弹性扩展,同时最小化存储 I/O 开销?
- RQ3如何在无服务器环境中高效实现强可靠性保证(如因果一致提交)?
- RQ4与 AWS Step Functions 和 Azure Durable Functions 等现有无服务器工作流系统相比,性能可提升多少?
- RQ5分区、推测性通信和异步快照是否能共同降低有状态无服务器执行的延迟并提高吞吐量?
主要发现
- Durable Functions 使开发人员能够使用熟悉的控制流构造和语言生态系统编写复杂、有状态的工作流,相比声明式或非结构化模型,可编程性显著提升。
- Netherite 在延迟和吞吐量方面优于现有无服务器工作流解决方案,在某些工作负载中性能提升达数个数量级。
- 使用分区和推测性通信可减少端到端延迟,通过在状态完全持久化前并发处理消息实现。
- 异步快照和恢复日志降低了持久状态持久化的 I/O 成本,支持在大规模集群中高效扩展。
- 因果一致提交保证确保了依赖步骤的原子性,即使在发生故障时也能防止部分或不一致的状态变更。
- 端到端评估表明,Netherite 在高负载下仍能高效扩展,相比基线系统保持低延迟和高吞吐量。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。