[论文解读] Apiary: A DBMS-Integrated Transactional Function-as-a-Service Framework
Apiary 引入了一种与数据库管理系统(DBMS)集成的无服务器框架,将函数执行与数据管理在分布式数据库引擎内统一部署,通过将 DBMS 作为函数、数据和日志的统一运行时,消除了传统无服务器平台(FaaS)在性能和一致性方面的开销。与现有 FaaS 平台相比,Apiary 在微服务工作负载上实现了 2–68 倍的性能提升,通过降低通信延迟并支持端到端事务保证的高效、容错的函数组合,显著提升了性能。
Developers increasingly use function-as-a-service (FaaS) platforms for data-centric applications that perform low-latency and transactional operations on data, such as for microservices or web serving. Unfortunately, existing FaaS platforms support these applications poorly because they physically and logically separate application logic, executed in cloud functions, from data management, done in interactive transactions accessing remote storage. Physical separation harms performance while logical separation complicates efficiently providing transactional guarantees and fault tolerance. This paper introduces Apiary, a novel DBMS-integrated FaaS platform for deploying and composing fault-tolerant transactional functions. Apiary physically co-locates and logically integrates function execution and data management by wrapping a distributed DBMS engine and using it as a unified runtime for function execution, data management, and operational logging, thus providing similar or stronger transactional guarantees as comparable systems while greatly improving performance and observability. To allow developers to write complex stateful programs, we leverage this integration to enable efficient and fault-tolerant function composition, building a frontend for orchestrating workflows of functions with the guarantees that each workflow runs to completion and each function in a workflow executes exactly once. We evaluate Apiary against research and production FaaS platforms and show it outperforms them by 2--68x on microservice workloads by reducing communication overhead.
研究动机与目标
- 解决现有 FaaS 平台将应用逻辑与数据管理分离所导致的性能与一致性限制。
- 消除传统 FaaS 中因函数与数据存储在物理和逻辑上分离而产生的通信与协调开销。
- 在无服务器执行模型中提供强事务保证,例如精确一次执行和原子工作流组合。
- 在保持低延迟和高吞吐量的同时,实现高效、容错的有状态函数组合。
- 通过单一 DBMS 运行时统一函数执行、数据管理与操作日志,提升可观测性与系统一致性。
提出的方法
- Apiary 将分布式 DBMS 引擎作为核心运行时,利用其执行函数、管理数据并记录操作,构建一个统一且一致的系统。
- 它利用 DBMS 的 ACID 特性与内部日志机制,原生支持具有精确一次语义的无服务器函数事务执行。
- 函数组合通过工作流前端实现,负责编排函数序列,确保每个函数仅执行一次,且整个工作流具备原子提交保证。
- 系统将函数执行与数据访问统一部署在 DBMS 所在的同一物理节点上,最大限度减少网络 I/O 与延迟。
- 它利用 DBMS 的多版本并发控制(MVCC)与日志基础设施,实现容错与崩溃一致性,无需外部协调。
- 该架构通过将函数状态与中间结果直接持久化在 DBMS 中,减少了对外部存储的访问,从而实现高效的有状态计算。
实验结果
研究问题
- RQ1是否可以通过原生 DBMS 执行模型消除传统 FaaS 平台中函数与数据存储解耦所导致的性能与一致性瓶颈?
- RQ2在无服务器环境中,如何高效地强制实施强事务保证,例如精确一次执行与原子工作流组合?
- RQ3统一的 DBMS 运行时在多大程度上可以减少通信开销,并提升有状态、事务性微服务的性能?
- RQ4将函数执行、数据管理与日志记录统一集成在单一 DBMS 引擎中,是否能提升系统可观测性与容错能力?
- RQ5在分布式数据库系统中,将函数执行与数据存储共置,能够带来多大的性能与可扩展性提升?
主要发现
- Apiary 在微服务工作负载上相比研究与生产级 FaaS 平台实现了 2–68 倍的性能提升,通过最小化组件间通信并利用内存内数据访问实现。
- 通过将函数执行与数据存储共置,系统显著降低了端到端延迟,消除了函数与数据库服务之间的网络往返。
- Apiary 确保工作流中所有函数均实现精确一次执行语义,并在多次函数调用间提供原子提交保证。
- 与 DBMS 的集成通过原生日志与 MVCC 机制,实现了高效的容错与崩溃恢复能力。
- 由于 DBMS 内部统一的日志记录与事务追踪,可观测性显著提升,简化了调试与监控。
- 该框架在性能衰减极小的情况下支持复杂有状态工作流,展示了在类生产工作负载中强大的可扩展性与一致性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。