🤖 AI Summary
This work addresses the significant latency incurred by cold starts in cloud-native serverless functions, which adversely impacts application performance. The authors propose an initscripts mechanism that explicitly externalizes application initialization logic into scripts, executed in parallel by the cloud platform during environment preparation. The resulting state is injected into the runtime, effectively overlapping initialization with function startup without requiring any modifications to the application code. By orchestrating initialization through a scripted interface, parallelizing cold-start tasks, and injecting precomputed state, the approach achieves an average 1.67× speedup in cold-start latency across multiple Python applications on ServerlessBench, with image recognition workloads reaching up to 1.81× acceleration. The method also substantially improves startup efficiency for microservices such as etcd and memcached.
📝 Abstract
Serverless functions are a popular way of deploying cloud applications. Because many of these functions are short- running and experience frequent cold-starts, start latencies often dominate their execution latency. Start latency can be broken down into two components: setup and initialization. Setup involves steps the cloud platform takes when starting an application, such as downloading its binary and creating an isolated execution environment. Initialization involves steps the application takes after it has started running but before it can do useful work, such as connecting to other services, coordinating to claim work, and downloading inputs.
This paper contributes initscripts, which provide a script- able interface for developers to specify their application's initialization routine to the cloud platform. The platform can then run an application's initscript and reduce application start latency by overlapping setup and initialization steps. Once the application is up and running, the initscript bootstraps the application by transferring initialization results to it. Using initscripts, we were able to speed up cold-starts of several of the ServerlessBench Python applications by an average 1.67X with no modifications to the application. Initscripts also speed up start times for a serverless image recognition workload by 1.81X, and off-the-shelf microservices like etcd and memcached.