TL;DR
DataFlower is a novel serverless orchestration scheme that replaces the traditional centralized control-flow paradigm with a decentralized data-flow paradigm. By decoupling computation from communication and enabling direct, streaming data transfers between functions, it reduces tail latency by up to 35.4% and boosts throughput by up to 3.8X.
What Problem Does This Paper Address?
In the world of serverless computing, complex applications are built as "workflows"—chains of small, independent functions. Currently, these workflows rely on a control-flow paradigm. A central orchestrator (like AWS Step Functions) manages the state and tells Function B to start only after Function A finishes.
This approach has three major "performance killers":
- Double Data Transfer: To pass data, Function A writes to remote storage (like S3), and Function B reads it back. This creates massive I/O overhead.
- Sequential Resource Usage: Containers sit with an idle CPU while waiting for data to download, and an idle network while computing.
- Orchestrator Lag: Centralized controllers add significant scheduling overhead (averaging ~63ms per step) and can't trigger functions until a predecessor is 100% complete, even if the necessary data was ready earlier.
Methods
The authors propose DataFlower, which shifts the logic from "wait for a command" to "run when data arrives." Key components include:
- FLU/DLU Abstraction: They split the function container into two units: the Function Logic Unit (FLU) for computation and the Data Logic Unit (DLU) for asynchronous communication. This allows a function to start sending output data while it is still computing.
- Decentralized Workflow Engine: Instead of one central brain, every worker node has a local engine that parses the data-flow graph. It triggers functions locally as soon as the required input data arrives.
- Host-Container Collaborative Communication: Since a destination container might not be "warm" (started) when data arrives, DataFlower uses a Data Sink on the host node to cache incoming data. It uses "Pipe Connectors" for high-performance streaming.
- Pressure-aware Scaling: A unique mechanism that monitors the DLU. If the data-producing rate of the FLU exceeds the network's ability to send it (backpressure), the system automatically scales out more containers to prevent bottlenecks.
Datasets
The researchers evaluated DataFlower on a 5-node cluster using four production-level serverless benchmarks:
- vid: Video processing using FFmpeg.
- img: Machine Learning-based image processing.
- svd: Singular Value Decomposition (math-heavy).
- wc: WordCount (data-intensive).
They compared DataFlower against state-of-the-art systems: FaaSFlow (decentralized control-flow) and SONIC (which uses local storage for data passing).
Key Insights and Ideas
- Decoupling is the "Aha!" Moment: By separating communication into a daemon process (the DLU), the system can overlap I/O and computation. This effectively hides the "data tax" that usually plagues serverless workflows.
- Data-Availability Triggering: In a data-flow model, functions are self-scheduling. This eliminates the "late triggering" problem where an orchestrator waits too long to start the next step.
- Solving the "Cold Start" Data Gap: One of the biggest hurdles for direct function-to-function communication is that the receiver might not exist yet. The "Data Sink" acts as a temporary landing zone, allowing the sender to dump data and move on, while the host handles the eventual delivery once the receiver wakes up.
Key Results
- Latency: DataFlower reduced the 99th-percentile (tail) latency of applications by 5.7% to 35.4% compared to FaaSFlow.
- Throughput: It improved peak throughput by 1.03X to 3.8X.
- Resource Efficiency: Because functions finished faster and data was proactively released from memory, DataFlower reduced container memory usage by up to 69.3%.
- Bursty Loads: In tests with sudden spikes in traffic, DataFlower maintained much lower average latencies than SONIC or FaaSFlow because its pressure-aware scaling could react to networking bottlenecks, not just CPU usage.
Limitations and Future Work
- Developer Effort: While the paper provides a pseudocode example for defining data flows, moving to a data-flow paradigm requires developers to explicitly declare data dependencies, which is a shift from traditional imperative programming.
- Pre-warming Strategy: The authors note that while DataFlower triggers functions when data is ready, a future improvement would be to use the data-flow graph to pre-warm containers (start them before data arrives) to eliminate cold-start delays entirely.
- Fault Tolerance: The system uses Kafka-based pipe connectors and checkpoints for reliability, but the overhead of managing state in a purely decentralized, high-speed data-flow environment remains a complex area for further optimization.
Summary updated