TL;DR
Serverless computing is great for many tasks, but data-intensive workflows suffer from slow inter-function communication via object storage. Floki introduces a proactive system that uses pipes and sockets for direct, point-to-point data forwarding, dramatically improving performance and reducing resource usage compared to traditional object storage methods.
What Problem Does This Paper Address?
Serverless computing offers a compelling model for building and running applications by abstracting away infrastructure management. Developers can decompose complex tasks into small, containerized functions, leaving scaling and operations to the cloud provider. However, for data-intensive workloads, which often involve complex Directed Acyclic Graphs (DAGs) with substantial intermediate data transfers, serverless platforms face a significant bottleneck: inter-function communication. Current serverless architectures typically force functions to communicate through shared object storage (like S3). While this provides durability and recovery benefits, object storage introduces high latency, making data-intensive tasks orders of magnitude slower than on traditional infrastructure. Existing solutions to this problem often involve domain-specific optimizations, require data duplication, break the serverless scaling model, or rely on non-serverless components. This paper addresses the need for a transparent, efficient, and serverless-native solution for direct inter-function data exchange.
Methods
Floki tackles the object storage bottleneck by implementing a proactive data forwarding system that enables direct, point-to-point communication between serverless functions. It leverages two primary mechanisms:
- Pipes and Sockets: For intra-node communication, Floki uses local pipes. For inter-node communication, it employs TCP sockets. This allows data to flow directly from a producer function to a consumer function.
- Forwarding Agent: A dedicated agent runs on each node, acting as the central orchestrator for data forwarding. This agent proactively sets up the necessary communication channels (pipes and sockets) based on the workflow's DAG and function-to-node mapping. It manages the flow of data, ensuring that producer functions can send data and consumer functions can receive it without relying on intermediate object storage.
- Volatile Data Transfer: Floki focuses on volatile data transfer, meaning data is not persisted to object storage after each hop. This significantly reduces latency and resource overhead.
- Proactive Setup: The system automatically creates and configures the communication infrastructure (pipes, sockets, forwarding agents) as soon as the workflow is submitted, ensuring that data is ready to flow as soon as functions are scheduled.
Datasets
The paper does not mention specific datasets used for training. Instead, it focuses on evaluating Floki's performance using synthetic data transfers of varying sizes (from 1MB to 16GB) across different communication patterns common in distributed systems.
Key Insights and Ideas
- Object Storage is a Major Bottleneck: The paper strongly reinforces that for data-intensive serverless workloads, relying on object storage for inter-function communication is a significant performance inhibitor.
- Direct Communication is Key: By enabling direct, point-to-point communication via pipes and sockets, Floki bypasses the latency introduced by object storage, leading to substantial speedups.
- Proactive Orchestration Pays Off: The "proactive" nature of Floki's forwarding agent, which sets up communication channels in advance based on the workflow definition, is crucial for achieving low latency.
- Volatile Data is Faster: Shifting from persistent object storage to volatile in-memory (via pipes/sockets) data transfer for intermediate results dramatically reduces overhead.
- Serverless Benefits Preserved: Floki aims to provide these performance gains without sacrificing the core serverless advantages like fine-grained scaling and transparency.
Key Results
Floki demonstrates significant improvements over the object storage baseline:
- End-to-End Time Performance: Up to 74.95x faster in the one-to-one pattern.
- Reduced Data Sharing Time: The largest data sharing time was reduced from 12.55 minutes to 4.33 minutes for a 16GB dataset.
- Resource Usage Reduction: Requires up to 50,738x fewer disk resources, leading to a release of up to 96GB of space.
- Scalability: Floki shows consistent performance gains across various data sizes (1MB to 16GB) and communication patterns (one-to-one, fan-out, fan-in, all-to-all).
Limitations and Future Work
The authors acknowledge several limitations and outline future directions:
- Fault Tolerance and Data Recovery: Floki currently lacks robust fault tolerance. In case of component failure, intermediate data would need to be re-computed by re-running the entire workflow. Per-function data recovery is suggested as a future research area.
- Multi-Tenancy: While Floki indirectly contributes to security in a multi-tenant environment, explicit mechanisms for hard multi-tenancy require further effort.
- Workflow Framework Integration: The current implementation requires explicit input of the workflow DAG and function-to-node mapping. Future work includes porting Floki to Kubernetes-based workflow frameworks like Argo and integrating it with Knative. This would involve enabling Knative functions to mount local volumes and potentially developing a more general workflow CRD.
- Interface Adaptation: For applications that don't natively support batching writes to pipes, a simple library function API would be needed to adapt existing write functions without altering the programming model.
Summary updated