Abstract
Serverless computing, particularly Function-as-a-Service (FaaS), has revolutionized cloud-native development through its "pay-as-you-go" model and seamless auto-scaling. However, the underlying architecture remains complex and often opaque. This paper presents a comprehensive, bottom-up survey of serverless computing, proposing a four-layer architectural stack: Virtualization, Encapsule, System Orchestration, and System Coordination. By analyzing the trade-offs between isolation, startup latency, and resource efficiency, we provide a technical roadmap for the next generation of serverless infrastructure.
Introduction
While serverless computing has exploded in popularity, it remains a "black box" for many practitioners. Traditional Infrastructure-as-a-Service (IaaS) deployments often suffer from low resource utilization, typically averaging around 10%. Serverless promises to solve this, yet it introduces significant technical hurdles, including the "cold start" problem, performance interference in multi-tenant environments, and state management difficulties. Existing literature often treats these issues at a high level; this survey addresses the need for a systematic, layered framework to explain how these systems are constructed and where research bottlenecks persist.
A Four-Layer Architectural Taxonomy
The core contribution of this work is a novel four-layer taxonomy that decouples the serverless ecosystem into manageable functional blocks.
- Virtualization Layer: The foundation of the stack, focusing on the "sandbox" (e.g., Docker, gVisor, Firecracker, Unikernels). This layer manages the critical tension between security isolation and sub-millisecond startup times.
- Encapsule Layer: This layer handles environment initialization and "prewarming" strategies. It explores the trade-offs between one-to-one and one-for-all instance pools and the use of "sidecars" to decouple business logic from platform-specific services.
- System Orchestration Layer: Acting as the system's "brain," this layer manages scheduling and load balancing across three levels: resource-level (CPU/Memory adjustment), instance-level (container scheduling), and application-level (managing complex Directed Acyclic Graph workflows).
- System Coordination Layer: This layer encompasses Backend-as-a-Service (BaaS) components, such as specialized databases, triggers, and API gateways, enabling stateless functions to interact with external systems.
Key Insights: The Virtualization Trilemma
A fundamental challenge in serverless design is the "Virtualization Trilemma"—the inherent trade-off between Flexibility (F), Startup Latency (S), and Isolation Level (I).
As illustrated in the radar charts above, different technologies prioritize different axes. For instance, Unikernels offer exceptional speed and security but lack development flexibility. Conversely, standard Docker containers provide high flexibility but suffer from "weak" isolation and slower startup times compared to specialized serverless sandboxes.
Beyond sandboxing, the "cold start" phenomenon is often misunderstood. It is not merely the time required to boot a container; it encompasses network setup, language runtime initialization (e.g., JVM startup), and the loading of user libraries. These latter stages often dwarf the actual container boot time. To combat this, predictive prewarming using Long Short-Term Memory (LSTM) networks has emerged as a promising strategy to anticipate function calls and minimize latency without excessive resource waste.
Performance Analysis and Benchmarking
The survey evaluates major providers—AWS Lambda, Google Cloud Functions, Azure Functions, and IBM OpenWhisk—revealing distinct performance profiles. AWS Lambda generally leads in GFLOPS and concurrent throughput, while Azure Functions, despite higher cold start latencies, offers superior integration for .NET-based workflows.
A critical finding is the impact of language choice and memory allocation. Compiled languages (e.g., C) can start up to 10x faster than interpreted languages (e.g., Python) during cold starts. Furthermore, increasing memory from 128MB to 256MB significantly reduces startup latency, though benefits plateau rapidly beyond that point, justifying the 256MB industry standard.
The paper also critiques current research methodologies, noting that 75% of studies rely on over-simplified micro-benchmarks (e.g., ServerlessBench, PyWren) that fail to capture the complexity of production-grade, stateful workflows.
Limitations and Future Directions
Despite its growth, FaaS faces several persistent limitations:
- Statelessness: The stateless nature of functions complicates heavy-duty database operations and long-running tasks.
- Memory Fragmentation: Orchestrators often struggle with "scheduling fragmentation," where idle resources cannot be effectively utilized due to mismatched function requirements.
- Vendor Lock-in: Tight coupling with provider-specific BaaS (like AWS S3) makes cross-platform migration difficult.
Future research should focus on Accelerator-aware scheduling (GPUs/FPGAs for AI workloads), heterogeneous hardware support, and a shift from "data-shipping" to "code-shipping" to improve data locality and reduce I/O bottlenecks.
Summary updated