A Cloud Native Platform for Stateful Streaming

Scott Schneider, Xavier Guerin, Shaohan Hu, Kun-Lung WuarXiv 2020

Introduction

High-performance stream processing systems like IBM Streams, Flink, and Storm were traditionally designed as independent platforms. Developed before the era of modern container orchestration, these systems implemented their own stacks for compute node management, task scheduling, and fault tolerance. However, in a cloud-native ecosystem, maintaining a "platform-within-a-platform" is redundant and inefficient. Researchers at IBM have re-architected IBM Streams to treat Kubernetes as the "distributed system kernel," offloading core management functions to the orchestrator.

Comparison of the legacy host-based architecture versus the Kubernetes-native architecture.

Architectural Design Patterns

The transition from a monolithic management layer to a decentralized, event-driven architecture relied on four key design patterns integrated with Kubernetes Custom Resource Definitions (CRDs):

  1. Controllers: Standard control loops that reconcile the actual state of a single resource type (e.g., a "Job") with its desired state.
  2. Conductors: Higher-level state machines that observe multiple resource types to manage complex workflows, such as ensuring configuration dependencies are met before launching processing elements.
  3. Coordinators: Synchronous command queues that enforce a single-writer model to prevent race conditions during resource modification.
  4. Causal Chains: Deterministic sequences of actions triggered across multiple actors by a single resource modification.
The Controller, Conductor, and Coordinator patterns used to manage state and workflows.

Key Insights: Kubernetes as a State Management Service

A major architectural shift was moving from persisting the entire system state to only persisting the "intent" and re-computing the intermediate state on the fly. Instead of using external tools like ZooKeeper for metadata storage, the system utilizes Kubernetes’ own etcd via CRDs. This makes the platform’s state "discoverable" using standard tools like kubectl, simplifying recovery logic and enhancing observability.

The authors also emphasized "Deterministic Asynchrony." By composing controllers and conductors, they built a deterministic system out of an inherently asynchronous distributed environment. However, this abstraction comes with costs; the overhead in networking and DNS propagation remains a challenge for high-performance, low-latency streaming.

Implementation and Results

By mapping streaming concepts like "Parallel Regions" and "Processing Elements" directly to CRDs, the system offloads scheduling to the Kubernetes scheduler and name resolution to CoreDNS. This architectural shift resulted in a 75% reduction in platform code (from ~570k to ~148k lines).

Performance evaluations using synthetic workloads and over 2,400 legacy system tests showed that the cloud-native version offers faster job submission and dynamic scaling. However, a "Kubernetes tax" was observed in networking: for small data packets (< 8KB), throughput was lower due to the overhead of virtual interfaces and packet filtering. Additionally, the system showed higher sensitivity to oversubscription compared to the legacy host-controller model.

Conclusion and Future Work

While Kubernetes serves as an adequate replacement for bespoke management platforms, specialized stateful workloads still face bottlenecks in networking latency and DNS propagation. Future improvements may involve user-space networking or specialized CNI plugins to bypass kernel overhead, ensuring that high-performance streaming can fully leverage the benefits of a generic orchestrator without significant performance trade-offs.

Summary updated

BibTeX
@misc{schneider2020cloud,
  author = {Scott Schneider and Xavier Guerin and Shaohan Hu and Kun-Lung Wu},
  title = {{A Cloud Native Platform for Stateful Streaming}},
  year = {2020},
  eprint = {2006.00064},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.00064},
}
Figure