The Function-as-a-Service (FaaS) execution model increases developer productivity by removing operational concerns such as managing hardware or software runtimes. Developers, however, still need to partition their applications into FaaS functions, which is error-prone and complex: Encapsulating only the smallest logical unit of an application as a FaaS function maximizes flexibility and reusability. Yet, it also leads to invocation overheads, additional cold starts, and may increase cost due to double billing during synchronous invocations. Conversely, deploying an entire application as a single FaaS function avoids these overheads but decreases flexibility. In this paper we present Fusionize, a framework that automates optimizing for this trade-off by automatically fusing application code into an optimized multi-function composition. Developers only need to write fine-grained application code following the serverless model, while Fusionize automatically fuses different parts of the application into FaaS functions, manages their interactions, and configures the underlying infrastructure. At runtime, it monitors application performance and adapts it to minimize request-response latency and costs. Real-world use cases show that Fusionize can improve the deployment artifacts of the application, reducing both median request-response latency and cost of an example IoT application by more than 35%.
翻译:函数即服务(Function-as-a-Service, FaaS)执行模型通过消除对硬件或软件运行时等运维问题的管理,提升了开发者的生产力。然而,开发者仍需将应用程序划分为多个FaaS函数,这一过程易出错且复杂:将应用中最小逻辑单元封装为FaaS函数可最大化灵活性与可重用性,但也会导致调用开销、额外冷启动,并可能因同步调用中的双重计费而增加成本。反之,将整个应用部署为单个FaaS函数虽可避免这些开销,却降低了灵活性。本文提出Fusionize框架,该系统通过自动将应用代码融合为优化的多函数组合,实现了对该权衡的自动化优化。开发者仅需遵循无服务器模型编写细粒度应用代码,而Fusionize将自动融合应用的不同部分为FaaS函数、管理其交互,并配置底层基础设施。在运行时,系统监控应用性能并动态调整,以最小化请求-响应延迟与成本。实际应用案例表明,Fusionize可优化应用的部署构件,使某物联网示例应用的中位请求-响应延迟与成本均降低超过35%。