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.
翻译:摘要:开发人员越来越多地将函数即服务平台用于以数据为中心的应用,这些应用需对数据进行低延迟和事务性操作,例如微服务或Web服务。遗憾的是,现有函数即服务平台对这类应用的支持较差,原因在于它们在物理和逻辑上分离了在云函数中执行的应用逻辑和通过访问远程存储的交互式事务完成的数据管理。物理分离损害了性能,而逻辑分离则给高效提供事务保障和容错能力带来了困难。本文介绍了Apiary,一个新型数据库管理系统集成的函数即服务平台,用于部署和组合具备容错能力的事务函数。Apiary通过封装分布式数据库管理系统引擎并将其用作函数执行、数据管理和操作日志的统一运行时,实现了函数执行与数据管理的物理共置和逻辑集成,从而在显著提升性能和可观测性的同时,提供了与同类系统相当甚至更强的事务保障。为了允许开发人员编写复杂的有状态程序,我们利用这种集成实现了高效且容错的函数组合,构建了一个用于编排函数工作流的前端,确保每个工作流都能完整执行且工作流中的每个函数仅执行一次。我们将Apiary与研究和生产环境中的函数即服务平台进行了评估,结果表明,在微服务工作负载中,通过减少通信开销,其性能优于对比平台2至68倍。