一句话:提出并发感知的 Serverless 函数容器编排算法 CIDRE,降低冷启动比例与调用开销。
冷启动延迟是 FaaS 平台的主要痛点,常用策略是保留近期函数容器以实现热启动。本文指出,现有 keep-alive 策略忽略了并发调用的挑战:并发请求需在复用忙碌容器(延迟热启动)与冷启动之间权衡,并会导致容器淘汰不均衡,错误回收很快会被复用的容器。为此,作者提出编排算法 CIDRE,在并发驱动的伸缩下,利用容器级与并发信息推测性选择延迟热启动或冷启动,并均衡淘汰决策。基于两个生产级 FaaS 负载,CIDRE 相比最先进 keep-alive 策略将冷启动比例和平均调用开销分别最多降低 75.1% 和 39.3%。
Cold start delays are a main pain point for today's FaaS (Function-as-a-Service) platforms. A widely used mitigation strategy is keeping recently invoked function containers alive in memory to enable warm starts with minimal overhead. This paper identifies new challenges that state-of-the-art FaaS keep-alive policies neglect. These challenges are caused by concurrent function invocations, a common FaaS workload behavior. First, concurrent requests present a tradeoff between reusing busy containers (delayed warm starts) versus cold-starting containers. Second, concurrent requests cause imbalanced evictions of containers that will be reused shortly thereafter. To tackle the challenges, we propose a novel serverless function container orchestration algorithm called CIDRE. CIDRE makes informed decisions to speculatively choose between a delayed warm start and a cold start under concurrency-driven function scaling. CIDRE uses both fine-grained container-level and coarse-grained concurrency information to make balanced eviction decisions. We evaluate CIDRE extensively using two production FaaS workloads. Results show that CIDRE reduces the cold start ratio and the average invocation overhead by up to 75.1% and 39.3% compared to state-of-the-art function keep-alive policies.