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%.
翻译:函数即服务(FaaS)执行模式通过消除管理硬件或软件运行时等运维负担,提升了开发者的生产效率。然而,开发者仍需将应用程序划分为多个FaaS函数,这一过程容易出错且复杂:若仅将应用程序的最小逻辑单元封装为FaaS函数,虽能最大化灵活性与可复用性,但也会引入调用开销、额外的冷启动问题,并可能因同步调用中的双重计费而增加成本。反之,将整个应用程序部署为单一FaaS函数虽能避免这些开销,却会降低灵活性。本文提出Fusionize框架,该框架通过自动将应用程序代码融合为优化的多函数组合,实现对上述权衡关系的自动化优化。开发者仅需遵循无服务器模式编写细粒度应用代码,Fusionize即可自动将应用程序的不同部分融合为FaaS函数、管理其交互并配置底层基础设施。在运行时,系统监控应用性能并动态调整以最小化请求-响应延迟与成本。实际用例表明,Fusionize能够优化应用程序的部署方案,在示例物联网应用中使请求-响应延迟中位数与成本均降低超过35%。