NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Optimizing Prediction Serving on Low-Latency Serverless Dataflow

Vikram Sreekanti, Harikaran Subbaraj, Chenggang Wu, Joseph E. Gonzalez, Joseph M. HellersteinarXiv 2020

Abstract

Cloudflow is a serverless dataflow system designed specifically for low-latency machine learning prediction serving. By providing a familiar dataflow API that treats models as "black boxes," it enables automatic structural optimizations like operator fusion and competitive execution. Our evaluation demonstrates that Cloudflow outperforms industry-standard systems like AWS Sagemaker by up to 2x in median latency and significantly reduces tail latency, making it a viable solution for complex, real-time ML pipelines.

Introduction

Deploying machine learning models for real-time use—known as prediction serving—is a unique systems challenge. Unlike training, which is throughput-oriented, serving must be interactive and often involves complex pipelines. For example, an image might be pre-processed, run through multiple models in parallel, and then have its results aggregated.

Existing solutions typically fall into two extremes: modular microservices (e.g., AWS Sagemaker) that suffer from high "data shipping" overhead due to lack of structural visibility, or "white-box" systems (e.g., Pretzel) that require developers to use restrictive, custom languages. Cloudflow targets the middle ground: a system that uses a high-level dataflow API to understand pipeline structure while allowing developers to use any standard ML library.

System Design and Methods

Cloudflow is built on top of Cloudburst, a stateful serverless platform, which utilizes the Anna low-latency key-value store. The core of Cloudflow is its Dataflow API, which uses relational-style operators (map, filter, join, union, groupby, agg) to define a Directed Acyclic Graph (DAG) of computation.

Cloudflow Dataflow API and corresponding execution DAG.

The system implements several key optimizations to achieve low latency:

  • Operator Fusion: Adjacent stages are "glued" into a single execution unit to avoid the cost of serializing data and sending it over the network.
  • Competitive Execution: To mitigate "stragglers," Cloudflow can launch multiple replicas of a model in parallel and accept the result from the first to finish.
  • Locality-aware Scheduling: Using "dynamic dispatch," Cloudflow moves computation to the specific server where required data (like large user-profile vectors) is already cached.
  • Fine-grained Autoscaling: As a serverless system, Cloudflow scales individual operators independently based on bursty demand.

Evaluation and Key Results

We evaluated Cloudflow using synthetic microbenchmarks and four real-world pipelines: Image Cascade (ImageNet), Video Streams (YOLOv3/ResNet-101), Neural Machine Translation (FAIRSEQ), and a data-intensive Recommender System.

Latency comparison between optimized and unoptimized Cloudflow across varying data sizes and function counts.

Key performance insights include:

  • Speedups: Operator fusion alone achieved up to a 4x latency decrease by eliminating data movement overhead.
  • Locality Benefits: For data-intensive tasks like the recommender system, Cloudflow was 15x to 22x faster than naive implementations by scheduling tasks near cached data.
  • Real-time Video: Cloudflow was the only system tested capable of consistently processing video streams in real-time (~685ms median latency), while Sagemaker and Clipper were significantly slower.
  • Tail Latency: In NMT tasks, adding competitive replicas reduced the 99th percentile latency by over 50%.

Discussion and Future Work

Cloudflow demonstrates that structural visibility is sufficient for massive performance gains in ML serving; one does not need to know the internal math of a neural network to optimize its placement in a pipeline. Furthermore, the stateful serverless model proves to be a natural fit for bursty, unpredictable prediction workloads.

Current limitations include the need for manual optimization selection. Future work will focus on building a cost-based optimizer to automatically select strategies like fusion or competitive execution. Additionally, we plan to implement explicit Service Level Agreement (SLA) management and data monitoring to detect "data drift" in real-time.

Summary updated

BibTeX
@misc{sreekanti2020optimizing,
  author = {Vikram Sreekanti and Harikaran Subbaraj and Chenggang Wu and Joseph E. Gonzalez and Joseph M. Hellerstein},
  title = {{Optimizing Prediction Serving on Low-Latency Serverless Dataflow}},
  year = {2020},
  eprint = {2007.05832},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.05832},
}
Figure