April 27-May 1, 2024 | Hanfei Yu, Rohan Basu Roy, Christian Fontenot, Devesh Tiwari, Jian Li, Hong Zhang, Hao Wang, Seung-Jong Park
**RainbowCake: Mitigating Cold-starts in Serverless with Layer-wise Container Caching and Sharing**
**Authors:** Hanfei Yu, Rohan Basu Roy, Christian Fontenot, Devesh Tiwari, Jian Li, Hong Zhang, Hao Wang, Seung-Jong Park
**Abstract:**
Serverless computing has emerged as a promising cloud computing paradigm, offering ease of management, cost efficiency, and auto-scaling. However, it suffers from severe cold-start issues, where starting containers incurs significant latency. While full container caching is widely used to mitigate cold-starts, it has been outperformed by partial container caching and container sharing techniques. Partial container caching effectively handles burstiness but leaves cold-start mitigation incomplete, while container sharing reduces cold-starts by enabling containers to serve multiple functions but suffers from excessive memory waste due to over-packed containers.
This paper introduces RainbowCake, a layer-wise container pre-warming and keep-alive technique that effectively mitigates cold-starts with minimal memory waste. RainbowCake leverages structured container layers and sharing-aware modeling to robustly handle invocation bursts. It breaks the container startup process into three stages and manages different container layers individually. A sharing-aware algorithm makes event-driven layer-wise caching decisions in real-time, achieving high tolerance to burstiness.
**Key Contributions:**
- RainbowCake identifies three natural decoupling points in the container initialization process, enabling layer-wise partial container caching and sharing.
- It proposes a layer-wise sharing-aware algorithm to mitigate cold-starts with minimal memory waste by proactively pre-warming and adaptively keep-alive containers.
- Extensive experiments with industrial traces and real-world applications show that RainbowCake reduces 68% function startup latency and 77% container memory waste compared to state-of-the-art solutions.
**Introduction:**
Serverless computing has revolutionized application deployment by simplifying resource management and providing auto-scaling. However, serverless functions are latency-sensitive, and cold-starts can significantly increase response times. RainbowCake addresses this issue by combining partial container caching and sharing techniques to achieve both low function end-to-end latency and minimal memory cost.
**Background and Motivation:**
The paper discusses the cold-start problem in serverless computing and existing mitigation techniques, highlighting the need for a joint design of partial container caching and sharing to balance cold-start mitigation and memory wasting.
**Problem Formulation:**
The system model considers a workload with functions served by a serverless platform. Each function has specific user deployment packages and language runtimes, and each invocation requires a container. RainbowCake aims to minimize the unified cost of startup overhead and wasted resources.
**Implementation:**
RainbowCake is implemented in Apache OpenWhisk, an open-source, distributed serverless platform. It modifies the container system to enforce layer-wise policy and includes HTTP handlers, container proxies, and a container pool for managing container lifecycles.
**Evaluation:**
Experiments on a three-node Open**RainbowCake: Mitigating Cold-starts in Serverless with Layer-wise Container Caching and Sharing**
**Authors:** Hanfei Yu, Rohan Basu Roy, Christian Fontenot, Devesh Tiwari, Jian Li, Hong Zhang, Hao Wang, Seung-Jong Park
**Abstract:**
Serverless computing has emerged as a promising cloud computing paradigm, offering ease of management, cost efficiency, and auto-scaling. However, it suffers from severe cold-start issues, where starting containers incurs significant latency. While full container caching is widely used to mitigate cold-starts, it has been outperformed by partial container caching and container sharing techniques. Partial container caching effectively handles burstiness but leaves cold-start mitigation incomplete, while container sharing reduces cold-starts by enabling containers to serve multiple functions but suffers from excessive memory waste due to over-packed containers.
This paper introduces RainbowCake, a layer-wise container pre-warming and keep-alive technique that effectively mitigates cold-starts with minimal memory waste. RainbowCake leverages structured container layers and sharing-aware modeling to robustly handle invocation bursts. It breaks the container startup process into three stages and manages different container layers individually. A sharing-aware algorithm makes event-driven layer-wise caching decisions in real-time, achieving high tolerance to burstiness.
**Key Contributions:**
- RainbowCake identifies three natural decoupling points in the container initialization process, enabling layer-wise partial container caching and sharing.
- It proposes a layer-wise sharing-aware algorithm to mitigate cold-starts with minimal memory waste by proactively pre-warming and adaptively keep-alive containers.
- Extensive experiments with industrial traces and real-world applications show that RainbowCake reduces 68% function startup latency and 77% container memory waste compared to state-of-the-art solutions.
**Introduction:**
Serverless computing has revolutionized application deployment by simplifying resource management and providing auto-scaling. However, serverless functions are latency-sensitive, and cold-starts can significantly increase response times. RainbowCake addresses this issue by combining partial container caching and sharing techniques to achieve both low function end-to-end latency and minimal memory cost.
**Background and Motivation:**
The paper discusses the cold-start problem in serverless computing and existing mitigation techniques, highlighting the need for a joint design of partial container caching and sharing to balance cold-start mitigation and memory wasting.
**Problem Formulation:**
The system model considers a workload with functions served by a serverless platform. Each function has specific user deployment packages and language runtimes, and each invocation requires a container. RainbowCake aims to minimize the unified cost of startup overhead and wasted resources.
**Implementation:**
RainbowCake is implemented in Apache OpenWhisk, an open-source, distributed serverless platform. It modifies the container system to enforce layer-wise policy and includes HTTP handlers, container proxies, and a container pool for managing container lifecycles.
**Evaluation:**
Experiments on a three-node Open