Introduction
Serverless computing, or Function-as-a-Service (FaaS), has revolutionized cloud deployment with its promise of fine-grained elasticity and a "pay-as-you-go" billing model. However, distributed data analytics engines like Apache Spark and Apache Drill have traditionally been considered a poor fit for these environments. These engines were designed for a "serverful" world characterized by long-running processes, persistent local state, and direct peer-to-peer network communication—features that commercial FaaS platforms like AWS Lambda intentionally restrict for the sake of isolation and scalability.
Previous attempts to bridge this gap have focused on building entirely new "serverless-native" engines or proposing fundamental changes to cloud infrastructure. This research, presented at CIDR 2024, proposes a more pragmatic "third way": a transparent interposition layer called Boxer that allows unmodified, off-the-shelf analytics engines to run directly on standard FaaS platforms with performance comparable to traditional virtual machines.
The Boxer Interposition Layer
The core innovation is the Boxer interposition layer, which sits between the query engine process and the Linux kernel within the Lambda function's microVM. Boxer intercepts standard C library calls (e.g., connect, gethostbyname) to provide the networking and coordination capabilities that the engines expect but that Lambda does not natively support.
Key Mechanisms
- Application Transparency: By intercepting system calls at the library level, Boxer allows Spark and Drill to operate without any code modifications. When an engine attempts to locate or connect to a worker node, Boxer provides the necessary networking information to facilitate the connection.
- NAT Hole-Punching: To overcome Lambda's networking isolation, Boxer employs NAT hole-punching techniques. This enables direct TCP connections between functions, allowing for the high-bandwidth "chatter" required for distributed joins and data shuffles.
- Zero Data-Plane Overhead: Boxer primarily manages the control plane (connection setup). Once a connection is established, data flows directly through the standard Linux networking stack, ensuring that the interposition layer adds virtually no overhead to actual query execution.
Experimental Evaluation
The researchers evaluated the system using the industry-standard TPC-H benchmark at scale factors up to SF-100 (approximately 100GB of data). The engines were deployed using standard Docker images on both AWS Lambda and equivalent AWS EC2 instances for comparison. Data was stored in Apache Parquet format on AWS S3.
Performance Parity and Scalability
The results demonstrate that serverless platforms can achieve performance remarkably similar to dedicated VM clusters. For many queries, the execution times on Lambda were within a small margin of the EC2 baseline. In some configurations with Apache Drill, the Lambda-based execution was actually faster than EC2 due to the high aggregate I/O bandwidth available to a large number of independent Lambda functions.
As shown in the performance data, Spark successfully completed all TPC-H queries on Lambda. While Spark exhibited slightly higher variance in execution times compared to EC2 (1.2x to 1.4x slower on average), Apache Drill achieved near-parity, often performing within 1.02x to 1.26x of the baseline. Furthermore, the system demonstrated linear scalability; increasing the number of Lambda workers from 8 to 32 yielded speedups consistent with those observed on traditional VM clusters.
Discussion and Limitations
While Boxer proves that off-the-shelf engines can run on serverless, some platform-specific challenges remain. "Cold starts"—the time required to initialize the function pool—take between 15 and 30 seconds, which is acceptable for batch processing but may hinder interactive use cases. Additionally, the 15-minute execution limit on AWS Lambda restricts the approach to queries that can be completed within that window or requires the implementation of complex checkpointing mechanisms.
Conclusion
By providing a transparent environment that mimics traditional clusters, Boxer demonstrates that the perceived incompatibility between serverless computing and heavy-duty data analytics is not a fundamental limitation of the FaaS model. This approach allows organizations to leverage the elasticity of serverless for big data tasks without the need to re-engineer their existing analytics stacks.
Summary updated