Adaptive Warm-State Retention for Serverless Cold-Start Mitigation: Treating Keep-Alive Time as an Online Control Parameter
Abstract
Serverless platforms are easy to operate but pay a recurring price in cold starts: when a function is called after sitting idle, its execution environment must be rebuilt before the request can run, and latency suffers. The usual fix keeps idle environments alive for a fixed window, but a single value rarely fits a changing workload: too high wastes idle capacity, too low causes avoidable cold starts. We argue the keep-alive window should not be a fixed deployment constant; instead we treat it as a per-function runtime parameter, adjusted online from what the system observes, kept separate from how many replicas to run. We build an external retention controller for OpenFaaS/faasd that needs no platform changes, driven by two simple agents: a reactive AIMD (Additive-Increase Multiplicative-Decrease) rule and a UCB1 multi-armed bandit. Against fixed-timeout baselines and a predictive histogram keep-alive, on steady, bursty, and trace-derived workloads (Huawei Serverless 2023), the bandit cuts the aggregate cold-start rate from 63% under immediate scale-to-zero to 3%, holds P95 tail latency at the level of the longest-retention fixed baseline, and uses about 13% less accumulated warm time than that baseline, while also beating the predictive baseline. No fixed timeout is best on every metric, whereas the adaptive agents reach a favorable operating point without manual tuning; on the bursty workload at a converged horizon the bandit's advantage is statistically significant. On a multi-node Kubernetes cluster under the platform's own Horizontal Pod Autoscaler, the controller coexists with an autoscaler it does not control: the replica count follows load identically across policies, and retention independently governs warm time.
Create a lesson
Related papers
Fast Serverless LLM Cold Starts by Sharing and Prewarming Startup Work
Shared title terminology · Hongjin Kim, Igjae Kim, Kwanghoon Choi et al.
SHADOWPREFILL: Keeping Your Next Model Warm for Per-Step Model Routing in Agentic LLM Serving
Shared title terminology · Haoran Qiu, Rohan Mahapatra, Rodrigo Fonseca et al.
Adapting Multi-Stage Distributed Real-Time Systems Design to Vehicular Edge Computing
Shared title terminology · Niraj Kumar, Anant Gautam
CCAMoE: Cache-Conditioned Adaptive Inference for Offloaded MoE
Shared title terminology · Xuan Zhang, Haisheng Tan, Han Tian et al.
Weave: Routing-Adaptive Runtime Warp Scheduling for MoE Megakernels
Shared title terminology · Ziyu Huang, Yangjie Zhou, Chenhao Zhu et al.
Asynchronous Byzantine Lattice Agreement with Logarithmic Response Time and Optimal Resilience
Shared title terminology · Hagit Attiya, Yao David Kolegain, Arnaud Labourel et al.