Serverless platforms typically adopt an early-binding approach for function sizing, requiring developers to specify an immutable size for each function within a workflow beforehand. Accounting for potential runtime variability, developers must size functions for worst-case scenarios to ensure service-level objectives (SLOs), resulting in significant resource inefficiency. To address this issue, we propose Janus, a novel resource adaptation framework for serverless platforms. Janus employs a late-binding approach, allowing function sizes to be dynamically adapted based on runtime conditions. The main challenge lies in the information barrier between the developer and the provider: developers lack access to runtime information, while providers lack domain knowledge about the workflow. To bridge this gap, Janus allows developers to provide hints containing rules and options for resource adaptation. Providers then follow these hints to dynamically adjust resource allocation at runtime based on real-time function execution information, ensuring compliance with SLOs. We implement Janus and conduct extensive experiments with real-world serverless workflows. Our results demonstrate that Janus enhances resource efficiency by up to 34.7% compared to the state-of-the-art.
翻译:无服务器平台通常采用早期绑定的方式进行函数规模设定,要求开发者在工作流中预先为每个函数指定不可变的资源规模。考虑到潜在的运行时可变性,开发者必须为最坏情况配置函数规模以确保服务水平目标(SLOs),这导致了显著的资源低效。为解决此问题,我们提出了Janus——一种面向无服务器平台的新型资源适配框架。Janus采用晚期绑定方法,允许根据运行时条件动态调整函数规模。主要挑战在于开发者与提供商之间的信息壁垒:开发者无法获取运行时信息,而提供商缺乏关于工作流的领域知识。为弥合这一鸿沟,Janus允许开发者提供包含资源适配规则与选项的提示信息。随后,提供商依据这些提示,基于实时函数执行信息在运行时动态调整资源分配,从而确保满足SLOs要求。我们实现了Janus系统,并利用真实无服务器工作流进行了大量实验。结果表明,相较于现有最优方案,Janus最高可提升34.7%的资源效率。