Skip to main content
QUICK REVIEW

[论文解读] Following the Data, Not the Function: Rethinking Function Orchestration in Serverless Computing

Minchen Yu, Tingjia Cao|arXiv (Cornell University)|Sep 28, 2021
Cloud Computing and Resource Management被引用 10
一句话总结

本文提出 Pheromone,一种以数据为中心的无服务器平台,通过围绕数据流而非函数调用依赖关系建模工作流,重新思考了函数编排。通过引入数据桶抽象和细粒度数据触发原语,Pheromone 实现了低延迟、高性能的函数交互——相比现有平台,交互延迟降低了数量级——同时通过显式的数据消费和优化的调度与数据传输机制,简化了复杂工作流的开发。

ABSTRACT

Serverless applications are typically composed of function workflows in which multiple short-lived functions are triggered to exchange data in response to events or state changes. Current serverless platforms coordinate and trigger functions by following high-level invocation dependencies but are oblivious to the underlying data exchanges between functions. This design is neither efficient nor easy to use in orchestrating complex workflows -- developers often have to manage complex function interactions by themselves, with customized implementation and unsatisfactory performance. In this paper, we argue that function orchestration should follow a data-centric approach. In our design, the platform provides a data bucket abstraction to hold the intermediate data generated by functions. Developers can use a rich set of data trigger primitives to control when and how the output of each function should be passed to the next functions in a workflow. By making data consumption explicit and allowing it to trigger functions and drive the workflow, complex function interactions can be easily and efficiently supported. We present Pheromone -- a scalable, low-latency serverless platform following this data-centric design. Compared to well-established commercial and open-source platforms, Pheromone cuts the latencies of function interactions and data exchanges by orders of magnitude, scales to large workflows, and enables easy implementation of complex applications.

研究动机与目标

  • 为解决当前无服务器平台在编排函数工作流时效率低下且复杂的问题,这些平台依赖于调用依赖关系,却未追踪实际的数据交换。
  • 降低无服务器函数链中累积的高交互延迟(数十毫秒),这些延迟在延迟敏感型工作负载中会阻碍性能。
  • 通过统一接口显式表达数据消费和可组合性,简化复杂工作流(如 MapReduce 和流处理)的开发。
  • 通过使用两级调度层次结构,将下游函数调度在输入数据附近,实现低延迟、可扩展的函数执行。
  • 通过牺牲持久性以换取性能,采用零拷贝共享内存对象存储和节点间直接数据传输,优化数据交换性能。

提出的方法

  • 引入数据桶抽象以存储中间函数输出,支持显式、可配置的数据消费和下游函数触发。
  • 采用两级调度层次结构:每个工作节点上的本地调度器通过数据桶管理工作流状态,并在可能时在本地调度函数;全局协调器在需要时处理跨节点调度。
  • 在节点内使用零拷贝共享内存对象存储,并通过节点间直接数据传输,最大限度减少数据交换延迟,以牺牲持久性换取性能。
  • 通过分片的全局协调器实现水平扩展,每个协调器管理一组不相交的工作流,避免瓶颈。
  • 提供低级数据触发 API 和高级函数导向接口,允许开发人员以是否显式管理数据桶的方式表达复杂工作流。
  • 通过诸如 DynamicGroup 和 ByTime 触发器等原语支持高级模式(如 MapReduce 和流处理),实现基于数据可用性的自动函数调用。

实验结果

研究问题

  • RQ1与基于函数依赖的模型相比,以数据为中心的函数编排方法是否能降低无服务器工作流中的交互延迟?
  • RQ2如何高效管理中间数据,以实现在无服务器环境中低延迟、高吞吐量的函数交互?
  • RQ3显式数据消费和触发原语在多大程度上能简化 MapReduce 和流处理等复杂工作流的实现?
  • RQ4具有本地与全局协调的两级调度层次结构是否能在保持低延迟的同时扩展至大规模、复杂的工作流?
  • RQ5在无服务器系统中,为实现更快的数据交换而牺牲短暂中间数据的持久性,可行的性能权衡是什么?

主要发现

  • 与商业和开源无服务器平台相比,Pheromone 将函数交互和数据交换延迟降低了数量级。
  • 该平台支持大规模工作流,具备低延迟调度和数据传输能力,可高效执行复杂、数据密集型应用。
  • 使用零拷贝共享内存对象存储和直接数据传输,分别降低了节点内和节点间的交换延迟。
  • Pheromone 中的垃圾回收机制通过在请求完成后及时驱逐未使用的内存数据对象,有效减少了内存占用。
  • 在 Pheromone 上实现的 Pheromone-MR(一个 MapReduce 框架)仅需 380 行 C++ 和 120 行 Python 代码,远少于 AWS Lambda 上的 PyWren(后者实现仅 map 操作需约 6,000 行代码)。
  • 函数导向接口使开发人员能够通过依赖关系表达工作流,而无需直接管理数据桶,同时仍可通过低级数据触发 API 支持复杂工作流。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。