Serverless is an attractive computing model that offers seamless scalability and elasticity; it takes the infrastructure management burden away from users and enables a pay-as-you-use billing model. As a result, serverless is becoming increasingly popular to support highly elastic and bursty workloads. However, existing platforms are supported by bloated virtualization stacks which, combined with bursty and irregular invocations, leads to high memory and latency overheads. To reduce the virtualization stack bloat, we propose Hydra, a virtualized multi-language serverless runtime capable of handling multiple invocations of functions written in different languages. To measure its impact in large platforms, we build a serverless platform that optimizes scheduling decisions to take advantage of Hydra by consolidating function invocations on a single instance, reducing the total infrastructure tax. Hydra improves the overall function density (ops/GB-sec) by 4.47$\times$ on average compared NodeJS, JVM, and CPython, the state-of-art single-language runtimes used in most serverless platforms. When reproducing the Azure Functions trace, Hydra reduces the overall memory footprint by 2.1 $\times$ and reduces the number of cold starts between 4 and 48 $\times$.
翻译:无服务器计算是一种极具吸引力的计算模型,它提供了无缝的可扩展性和弹性,将基础设施管理负担从用户手中移除,并实现了按使用付费的计费模式。因此,无服务器计算正日益流行,以支持高度弹性和突发性的工作负载。然而,现有平台依赖于臃肿的虚拟化技术栈,加之突发且不规则的函数调用,导致了高昂的内存和延迟开销。为了减少虚拟化技术栈的臃肿,我们提出了Hydra,一个虚拟化的多语言无服务器运行时,能够处理用不同语言编写的函数的多次调用。为了衡量其在大型平台中的影响,我们构建了一个无服务器平台,该平台通过将函数调用整合到单个实例上以利用Hydra的优势,从而优化调度决策,降低总体的基础设施开销。与NodeJS、JVM和CPython(当前大多数无服务器平台使用的先进单语言运行时)相比,Hydra平均将整体函数密度(ops/GB-sec)提高了4.47倍。在复现Azure Functions跟踪时,Hydra将整体内存占用减少了2.1倍,并将冷启动次数降低了4至48倍。