Skip to main content
QUICK REVIEW

[Paper Review] Partial Key Grouping: Load-Balanced Partitioning of Distributed Streams

Muhammad Anis Uddin Nasir, Gianmarco De Francisci Morales|arXiv (Cornell University)|Oct 26, 2015
Cloud Computing and Resource ManagementComputer Science27 references8 citations
TL;DR

This paper proposes Partial Key Grouping (pkg), a novel stream partitioning scheme that applies the 'power of two choices' principle to distributed stream processing by combining key splitting and local load estimation. pkg achieves near-perfect load balancing under data skew, reducing imbalance by orders of magnitude and improving throughput by up to 175% and latency by up to 45% on real Storm clusters, with integration into Apache Storm v0.10.

ABSTRACT

We study the problem of load balancing in distributed stream processing engines, which is exacerbated in the presence of skew. We introduce Partial Key Grouping (PKG), a new stream partitioning scheme that adapts the classical "power of two choices" to a distributed streaming setting by leveraging two novel techniques: key splitting and local load estimation. In so doing, it achieves better load balancing than key grouping while being more scalable than shuffle grouping. We test PKG on several large datasets, both real-world and synthetic. Compared to standard hashing, PKG reduces the load imbalance by up to several orders of magnitude, and often achieves nearly-perfect load balance. This result translates into an improvement of up to 175% in throughput and up to 45% in latency when deployed on a real Storm cluster. PKG has been integrated in Apache Storm v0.10.

Motivation & Objective

  • To address load imbalance in distributed stream processing engines (DSPEs) caused by skewed key distributions in real-world workloads.
  • To design a scalable, decentralized partitioning scheme that improves upon key grouping (which suffers from single-choice hashing) and shuffle grouping (which lacks key semantics and increases memory use for stateful processing).
  • To enable practical load balancing without global coordination or per-key state tracking, ensuring low overhead and high throughput.
  • To evaluate the effectiveness of local load estimation and key splitting in achieving near-optimal load balance in a streaming, distributed environment.

Proposed method

  • Introduces Partial Key Grouping (pkg), a new stream partitioning strategy that allows each key to be processed by two candidate processing element instances (PEIs), relaxing the strict one-PEI-per-key constraint of traditional key grouping.
  • Employs key splitting to distribute messages of the same key across two randomly selected PEIs, enabling the use of the 'power of two choices' without requiring coordination or routing table maintenance.
  • Uses local load estimation, where each source independently monitors the load of downstream PEIs, avoiding the need for global load knowledge and reducing coordination overhead.
  • Applies the power of two choices paradigm: for each key, the system selects the less loaded of two randomly chosen PEIs, using local estimates to guide routing decisions.
  • Implements the scheme with minimal code overhead—less than 20 lines of code and a single function when deployed on Apache Storm.
  • Employs a randomized selection mechanism for replica assignment, which can be enhanced with consistent hashing for stability, while maintaining low memory and coordination costs.

Experimental results

Research questions

  • RQ1Can the 'power of two choices' principle be effectively applied in a distributed, streaming environment without global coordination?
  • RQ2Can key splitting and local load estimation jointly achieve near-optimal load balancing in the presence of key skew?
  • RQ3Is it possible to maintain good load balance while preserving the key grouping semantics for stateful stream processing?
  • RQ4How does local load estimation compare to global load knowledge in terms of load balancing performance?
  • RQ5What is the trade-off between memory usage, coordination cost, and load balance in stream partitioning schemes?

Key findings

  • Partial Key Grouping reduces load imbalance by up to several orders of magnitude compared to standard hash-based key grouping.
  • pkg improves throughput by up to 175% and reduces latency by up to 45% when deployed on a real Storm cluster under skewed workloads.
  • Local load estimation performs nearly as well as a global load oracle, making it a practical and scalable alternative in distributed systems.
  • Key splitting enables the use of the power of two choices without requiring coordination or per-key state tracking, significantly improving scalability.
  • pkg achieves near-perfect load balance in practice, even under high skew, by effectively balancing load across PEIs using minimal coordination.
  • The scheme has been successfully integrated into Apache Storm v0.10, demonstrating its practicality and production readiness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.