SlideShare a Scribd company logo
1 of 25
The Power of Both Choices
Practical Load Balancing for Distributed Stream
Processing Engines
Muhammad Anis Uddin Nasir, Gianmarco De Francisci Morales, David Garcia-Soriano
Nicolas Kourtellis, Marco Serafini
International Conference on Data Engineering (ICDE 2015)
Stream Processing Engines
• Streaming Application
– Online Machine Learning
– Real Time Query Processing
– Continuous Computation
• Streaming Frameworks
– Storm, Borealis, S4, Samza, Spark Streaming
2The Power of Both Choices
Stream Processing Model
• Streaming Applications are represented by
Directed Acyclic Graphs (DAGs)
Worker
Worker
Worker
Source
Source
3The Power of Both Choices
Data Stream
Operators
Data Channels
Stream Grouping
• Key or Fields Grouping
– Hash-based assignment
– Stateful operations, e.g., page rank, degree count
• Shuffle Grouping
– Round-robin assignment
– Stateless operations, e.g., data logging, OLTP
4The Power of Both Choices
Key Grouping
5The Power of Both Choices
• Key Grouping
• Scalable ✔
• Low Memory ✔
• Load Imbalance ✖
Shuffle Grouping
6The Power of Both Choices
• Shuffle Grouping
• Load Balance ✔
• Memory O(W) ✖
• Aggregation O(W) ✖
Problem Formulation
• Input is a unbounded sequence of messages from a key
distribution
• Each message is assigned to a worker for processing
• Load balance properties
– Memory Load Balance
– Network Load Balance
– Processing Load Balance
• Metric: Load Imbalance
The Power of Both Choices 7
Power of two choices
• Balls-and-bins problem
• Algorithm
– For each ball, pick two bins uniformly at random
– Assign the ball to least loaded of the two bins
• Issues
– Distributed ✖
– Consensus on Keys ✖
– Skewed distribution ✖
– Continuous Data✖
– Load Information ✖
8The Power of Both Choices
Img source: http://s17.postimg.org/qqctbpftr/Galton_prime_box.jpg
Partial Key Grouping (PKG)
• Key Splitting
– Split each key into two server
– Assign each instance using power of two choices
• Local Load Estimation
– each source estimates load on
– using the local routing history
9The Power of Both Choices
Partial Key Grouping (PKG)
• Key Splitting
• Local Load Estimation
The Power of Both Choices 10
Source
Source
Worker
Worker
Worker
2 0 1
1 0 2
2 0 2
Partial Key Grouping (PKG)
• Key Splitting
– Distributed
– Stateless
– Handle Skew
• Local load estimation
– No coordination among sources
– No communication with workers
11The Power of Both Choices
Partial Key Grouping
The Power of Both Choices 12
• PKG
• Load Balance ✔
• Memory O(1) ✔
• Aggregation O(1) ✔
Analysis: Chromatic Balls and Bins
• Problem Formulation
– If messages are drawn from a key distribution where
probabilities of keys are p1≥p2≥p3….. ≥pn
– Each key has d choices out of n workers
• Minimize the difference between maximum
and average workload
The Power of Both Choices 13
Analysis
• Necessary Condition: If pi represents the probability
of occurrence of a key i
• Bounds:
The Power of Both Choices 14
Streaming Applications
• Most algorithms that use Shuffle Grouping can
be expressed using Partial Key Grouping to
reduce:
– Memory footprint
– Aggregation overhead
• Algorithms that use Key Grouping can be
rewritten to achieve load balance
The Power of Both Choices 15
Streaming Examples
• Naïve Bayes Classifier
• Streaming Parallel Decision Trees
• Heavy Hitters and Space Saving
The Power of Both Choices 16
Stream Grouping: Summary
Grouping • Pros • Cons
Key Grouping • Scalable
• Memory
• Load Imbalance
Shuffle Grouping • Load Balance • Memory O(W)
• Aggregation O(W)
Partial Key Grouping • Scalable
• Load Balance
• Memory O(1)
• Aggregation O(1)
The Power of Both Choices 17
Experiments
• What is the effect of key splitting on POTC?
• How does local estimation compare to a
global oracle?
• How does PKG perform on a real deployment
on Apache Storm?
The Power of Both Choices 18
Experimental Setup
• Metric
– the difference of maximum and the average load of the workers
at time t
• Datasets
– Twitter, 1.2G tweets (crawled July 2012)
– Wikipedia, 22M access logs
– Twitter, 690K cashtags (crawled Nov 2013)
– Social Networks, 69M edges
– Synthetic, 10M keys
19The Power of Both Choices
Effect of Key Splitting
The Power of Both Choices 20
Local Load Estimation
The Power of Both Choices 21
Real deployment: Apache Storm
The Power of Both Choices 22
0
200
400
600
800
1000
1200
1400
1600
0 0.2 0.4 0.6 0.8 1
Throughput(keys/s)
(a) CPU delay (ms)
PKG
SG
KG
1000
1100
1200
0.10
0
2.10
6
4.10
6
6.10
6
(b) Memory (keys)
10s
10s
30s
30s 60s
60s
300s
300s
600s
600s
PKG
SG
KG
Conclusion
• Partial Key Grouping (PKG) reduces the load imbalance by
up to seven orders of magnitude compared to Key
Grouping
• PKG imposes constant memory and aggregation overhead,
i.e., O(1), compared to Shuffle Grouping that is O(W)
• Apache Storm
– 60% improvement in throughput
– 45% improvement in latency
• PKG has been integrated in Apache Storm ver 0.10.
23The Power of Both Choices
Future Work
• Load Balancing for Stateful Operators using
key migration
• Adaptive Load Balancing for highly skewed
data
• Load Balancing for graph processing systems
The Power of Both Choices 24
The Power of Both Choices
Practical Load Balancing for Distributed Stream
Processing Engines
Muhammad Anis Uddin Nasir, Gianmarco De Francisci Morales, David Garcia-Soriano
Nicolas Kourtellis, Marco Serafini
International Conference on Data Engineering (ICDE) 2015

More Related Content

What's hot

GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesDataWorks Summit/Hadoop Summit
 
Improved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleImproved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleDataWorks Summit/Hadoop Summit
 
Probabilistic algorithms for fun and pseudorandom profit
Probabilistic algorithms for fun and pseudorandom profitProbabilistic algorithms for fun and pseudorandom profit
Probabilistic algorithms for fun and pseudorandom profitTyler Treat
 
Databricks clusters in autopilot mode
Databricks clusters in autopilot modeDatabricks clusters in autopilot mode
Databricks clusters in autopilot modePrakash Chockalingam
 
Streams processing with Storm
Streams processing with StormStreams processing with Storm
Streams processing with StormMariusz Gil
 
Realtime Analytics with Storm and Hadoop
Realtime Analytics with Storm and HadoopRealtime Analytics with Storm and Hadoop
Realtime Analytics with Storm and HadoopDataWorks Summit
 
Slide #1:Introduction to Apache Storm
Slide #1:Introduction to Apache StormSlide #1:Introduction to Apache Storm
Slide #1:Introduction to Apache StormMd. Shamsur Rahim
 
Storm 2012-03-29
Storm 2012-03-29Storm 2012-03-29
Storm 2012-03-29Ted Dunning
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalCodemotion Tel Aviv
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureP. Taylor Goetz
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Jen Aman
 
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPDiscretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPTathagata Das
 
codecentric AG: Using Cassandra and Clojure for Data Crunching backends
codecentric AG: Using Cassandra and Clojure for Data Crunching backendscodecentric AG: Using Cassandra and Clojure for Data Crunching backends
codecentric AG: Using Cassandra and Clojure for Data Crunching backendsDataStax Academy
 
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013Sonal Raj
 
Storm@Twitter, SIGMOD 2014 paper
Storm@Twitter, SIGMOD 2014 paperStorm@Twitter, SIGMOD 2014 paper
Storm@Twitter, SIGMOD 2014 paperKarthik Ramasamy
 

What's hot (20)

GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
 
Improved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleImproved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as example
 
Probabilistic algorithms for fun and pseudorandom profit
Probabilistic algorithms for fun and pseudorandom profitProbabilistic algorithms for fun and pseudorandom profit
Probabilistic algorithms for fun and pseudorandom profit
 
Databricks clusters in autopilot mode
Databricks clusters in autopilot modeDatabricks clusters in autopilot mode
Databricks clusters in autopilot mode
 
Apache Storm Tutorial
Apache Storm TutorialApache Storm Tutorial
Apache Storm Tutorial
 
Streams processing with Storm
Streams processing with StormStreams processing with Storm
Streams processing with Storm
 
Realtime Analytics with Storm and Hadoop
Realtime Analytics with Storm and HadoopRealtime Analytics with Storm and Hadoop
Realtime Analytics with Storm and Hadoop
 
Apache Storm Internals
Apache Storm InternalsApache Storm Internals
Apache Storm Internals
 
Slide #1:Introduction to Apache Storm
Slide #1:Introduction to Apache StormSlide #1:Introduction to Apache Storm
Slide #1:Introduction to Apache Storm
 
Storm 2012-03-29
Storm 2012-03-29Storm 2012-03-29
Storm 2012-03-29
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, Tikal
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm Architecture
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
 
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPDiscretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
 
Introduction to Apache Storm
Introduction to Apache StormIntroduction to Apache Storm
Introduction to Apache Storm
 
codecentric AG: Using Cassandra and Clojure for Data Crunching backends
codecentric AG: Using Cassandra and Clojure for Data Crunching backendscodecentric AG: Using Cassandra and Clojure for Data Crunching backends
codecentric AG: Using Cassandra and Clojure for Data Crunching backends
 
Spark Streaming into context
Spark Streaming into contextSpark Streaming into context
Spark Streaming into context
 
ACM 2013-02-25
ACM 2013-02-25ACM 2013-02-25
ACM 2013-02-25
 
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
 
Storm@Twitter, SIGMOD 2014 paper
Storm@Twitter, SIGMOD 2014 paperStorm@Twitter, SIGMOD 2014 paper
Storm@Twitter, SIGMOD 2014 paper
 

Viewers also liked

Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
Office 365 Tip: Create a team site on SharePoint
Office 365 Tip: Create a team site on SharePointOffice 365 Tip: Create a team site on SharePoint
Office 365 Tip: Create a team site on SharePointMicrosoft India
 
SharePoint & The Road Ahead: SharePoint 2016 & Office 365
SharePoint & The Road Ahead: SharePoint 2016 & Office 365 SharePoint & The Road Ahead: SharePoint 2016 & Office 365
SharePoint & The Road Ahead: SharePoint 2016 & Office 365 Richard Harbridge
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialhadooparchbook
 
Distributed Stream Processing - Spark Summit East 2017
Distributed Stream Processing - Spark Summit East 2017Distributed Stream Processing - Spark Summit East 2017
Distributed Stream Processing - Spark Summit East 2017Petr Zapletal
 
Real-time Stream Processing with Apache Flink
Real-time Stream Processing with Apache FlinkReal-time Stream Processing with Apache Flink
Real-time Stream Processing with Apache FlinkDataWorks Summit
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformconfluent
 
How Big Data and Hadoop Integrated into BMC ControlM at CARFAX
How Big Data and Hadoop Integrated into BMC ControlM at CARFAXHow Big Data and Hadoop Integrated into BMC ControlM at CARFAX
How Big Data and Hadoop Integrated into BMC ControlM at CARFAXBMC Software
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingRobert Metzger
 
Big Data & Hadoop Tutorial
Big Data & Hadoop TutorialBig Data & Hadoop Tutorial
Big Data & Hadoop TutorialEdureka!
 
Hadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersHadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersRahul Jain
 

Viewers also liked (15)

Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 1: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
Office 365 Tip: Create a team site on SharePoint
Office 365 Tip: Create a team site on SharePointOffice 365 Tip: Create a team site on SharePoint
Office 365 Tip: Create a team site on SharePoint
 
SharePoint & The Road Ahead: SharePoint 2016 & Office 365
SharePoint & The Road Ahead: SharePoint 2016 & Office 365 SharePoint & The Road Ahead: SharePoint 2016 & Office 365
SharePoint & The Road Ahead: SharePoint 2016 & Office 365
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorial
 
Distributed Stream Processing - Spark Summit East 2017
Distributed Stream Processing - Spark Summit East 2017Distributed Stream Processing - Spark Summit East 2017
Distributed Stream Processing - Spark Summit East 2017
 
Hadoop Summit 2016 San Jose ストリーム処理関連の報告 #streamctjp
Hadoop Summit 2016 San Jose ストリーム処理関連の報告 #streamctjpHadoop Summit 2016 San Jose ストリーム処理関連の報告 #streamctjp
Hadoop Summit 2016 San Jose ストリーム処理関連の報告 #streamctjp
 
Real-time Stream Processing with Apache Flink
Real-time Stream Processing with Apache FlinkReal-time Stream Processing with Apache Flink
Real-time Stream Processing with Apache Flink
 
RHadoop, R meets Hadoop
RHadoop, R meets HadoopRHadoop, R meets Hadoop
RHadoop, R meets Hadoop
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platform
 
How Big Data and Hadoop Integrated into BMC ControlM at CARFAX
How Big Data and Hadoop Integrated into BMC ControlM at CARFAXHow Big Data and Hadoop Integrated into BMC ControlM at CARFAX
How Big Data and Hadoop Integrated into BMC ControlM at CARFAX
 
Beginners SharePoint introduction
Beginners SharePoint introductionBeginners SharePoint introduction
Beginners SharePoint introduction
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer Checkpointing
 
Big Data & Hadoop Tutorial
Big Data & Hadoop TutorialBig Data & Hadoop Tutorial
Big Data & Hadoop Tutorial
 
Hadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersHadoop & HDFS for Beginners
Hadoop & HDFS for Beginners
 

Similar to The Power of Both Choices: Practical Load Balancing for Distributed Stream Processing Engines

Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...
Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...
Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...Rafael Ferreira da Silva
 
Harnessing OpenCL in Modern Coprocessors
Harnessing OpenCL in Modern CoprocessorsHarnessing OpenCL in Modern Coprocessors
Harnessing OpenCL in Modern CoprocessorsUnai Lopez-Novoa
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and ApplicationsApache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and ApplicationsThomas Weise
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications Comsysto Reply GmbH
 
Tsinghua University: Two Exemplary Applications in China
Tsinghua University: Two Exemplary Applications in ChinaTsinghua University: Two Exemplary Applications in China
Tsinghua University: Two Exemplary Applications in ChinaDataStax Academy
 
Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Vincenzo Gulisano
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...John Gunnels
 
Taskerman - a distributed cluster task manager
Taskerman - a distributed cluster task managerTaskerman - a distributed cluster task manager
Taskerman - a distributed cluster task managerRaghavendra Prabhu
 
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화NAVER Engineering
 
The data streaming processing paradigm and its use in modern fog architectures
The data streaming processing paradigm and its use in modern fog architecturesThe data streaming processing paradigm and its use in modern fog architectures
The data streaming processing paradigm and its use in modern fog architecturesVincenzo Gulisano
 
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...Data Con LA
 
Machine learning at Scale with Apache Spark
Machine learning at Scale with Apache SparkMachine learning at Scale with Apache Spark
Machine learning at Scale with Apache SparkMartin Zapletal
 
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache ApexHadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache ApexApache Apex
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging EnvironmentsPaul Groth
 
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache ApexApache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache ApexApache Apex
 
"Stateful app as an efficient way to build dispatching for riders and drivers...
"Stateful app as an efficient way to build dispatching for riders and drivers..."Stateful app as an efficient way to build dispatching for riders and drivers...
"Stateful app as an efficient way to build dispatching for riders and drivers...Fwdays
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale SupercomputerSagar Dolas
 

Similar to The Power of Both Choices: Practical Load Balancing for Distributed Stream Processing Engines (20)

Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...
Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...
Characterizing a High Throughput Computing Workload: The Compact Muon Solenoi...
 
Harnessing OpenCL in Modern Coprocessors
Harnessing OpenCL in Modern CoprocessorsHarnessing OpenCL in Modern Coprocessors
Harnessing OpenCL in Modern Coprocessors
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and ApplicationsApache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications
 
Exascale Capabl
Exascale CapablExascale Capabl
Exascale Capabl
 
Tsinghua University: Two Exemplary Applications in China
Tsinghua University: Two Exemplary Applications in ChinaTsinghua University: Two Exemplary Applications in China
Tsinghua University: Two Exemplary Applications in China
 
Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
 
Taskerman - a distributed cluster task manager
Taskerman - a distributed cluster task managerTaskerman - a distributed cluster task manager
Taskerman - a distributed cluster task manager
 
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화
대용량 데이터 분석을 위한 병렬 Clustering 알고리즘 최적화
 
The data streaming processing paradigm and its use in modern fog architectures
The data streaming processing paradigm and its use in modern fog architecturesThe data streaming processing paradigm and its use in modern fog architectures
The data streaming processing paradigm and its use in modern fog architectures
 
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
 
try
trytry
try
 
Machine learning at Scale with Apache Spark
Machine learning at Scale with Apache SparkMachine learning at Scale with Apache Spark
Machine learning at Scale with Apache Spark
 
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache ApexHadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging Environments
 
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache ApexApache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
 
"Stateful app as an efficient way to build dispatching for riders and drivers...
"Stateful app as an efficient way to build dispatching for riders and drivers..."Stateful app as an efficient way to build dispatching for riders and drivers...
"Stateful app as an efficient way to build dispatching for riders and drivers...
 
data-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptxdata-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptx
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale Supercomputer
 

More from Anis Nasir

Gossip based partitioning and replication for Online Social Networks
Gossip based partitioning and replication for Online Social NetworksGossip based partitioning and replication for Online Social Networks
Gossip based partitioning and replication for Online Social NetworksAnis Nasir
 
Scaling Online Social Networks: extended SPAR using Gossip Learning
Scaling Online Social Networks: extended SPAR using Gossip LearningScaling Online Social Networks: extended SPAR using Gossip Learning
Scaling Online Social Networks: extended SPAR using Gossip LearningAnis Nasir
 
Pushing the cap
Pushing the capPushing the cap
Pushing the capAnis Nasir
 
Final presentation survey p2p-videostreamingwmn
Final presentation survey p2p-videostreamingwmnFinal presentation survey p2p-videostreamingwmn
Final presentation survey p2p-videostreamingwmnAnis Nasir
 

More from Anis Nasir (8)

Gossip based partitioning and replication for Online Social Networks
Gossip based partitioning and replication for Online Social NetworksGossip based partitioning and replication for Online Social Networks
Gossip based partitioning and replication for Online Social Networks
 
Scaling Online Social Networks: extended SPAR using Gossip Learning
Scaling Online Social Networks: extended SPAR using Gossip LearningScaling Online Social Networks: extended SPAR using Gossip Learning
Scaling Online Social Networks: extended SPAR using Gossip Learning
 
Pushing the cap
Pushing the capPushing the cap
Pushing the cap
 
Mesos
MesosMesos
Mesos
 
NaaS
NaaSNaaS
NaaS
 
NaaS
NaaSNaaS
NaaS
 
Final presentation survey p2p-videostreamingwmn
Final presentation survey p2p-videostreamingwmnFinal presentation survey p2p-videostreamingwmn
Final presentation survey p2p-videostreamingwmn
 
RESTvsSOAP
RESTvsSOAPRESTvsSOAP
RESTvsSOAP
 

Recently uploaded

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 

Recently uploaded (20)

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 

The Power of Both Choices: Practical Load Balancing for Distributed Stream Processing Engines

  • 1. The Power of Both Choices Practical Load Balancing for Distributed Stream Processing Engines Muhammad Anis Uddin Nasir, Gianmarco De Francisci Morales, David Garcia-Soriano Nicolas Kourtellis, Marco Serafini International Conference on Data Engineering (ICDE 2015)
  • 2. Stream Processing Engines • Streaming Application – Online Machine Learning – Real Time Query Processing – Continuous Computation • Streaming Frameworks – Storm, Borealis, S4, Samza, Spark Streaming 2The Power of Both Choices
  • 3. Stream Processing Model • Streaming Applications are represented by Directed Acyclic Graphs (DAGs) Worker Worker Worker Source Source 3The Power of Both Choices Data Stream Operators Data Channels
  • 4. Stream Grouping • Key or Fields Grouping – Hash-based assignment – Stateful operations, e.g., page rank, degree count • Shuffle Grouping – Round-robin assignment – Stateless operations, e.g., data logging, OLTP 4The Power of Both Choices
  • 5. Key Grouping 5The Power of Both Choices • Key Grouping • Scalable ✔ • Low Memory ✔ • Load Imbalance ✖
  • 6. Shuffle Grouping 6The Power of Both Choices • Shuffle Grouping • Load Balance ✔ • Memory O(W) ✖ • Aggregation O(W) ✖
  • 7. Problem Formulation • Input is a unbounded sequence of messages from a key distribution • Each message is assigned to a worker for processing • Load balance properties – Memory Load Balance – Network Load Balance – Processing Load Balance • Metric: Load Imbalance The Power of Both Choices 7
  • 8. Power of two choices • Balls-and-bins problem • Algorithm – For each ball, pick two bins uniformly at random – Assign the ball to least loaded of the two bins • Issues – Distributed ✖ – Consensus on Keys ✖ – Skewed distribution ✖ – Continuous Data✖ – Load Information ✖ 8The Power of Both Choices Img source: http://s17.postimg.org/qqctbpftr/Galton_prime_box.jpg
  • 9. Partial Key Grouping (PKG) • Key Splitting – Split each key into two server – Assign each instance using power of two choices • Local Load Estimation – each source estimates load on – using the local routing history 9The Power of Both Choices
  • 10. Partial Key Grouping (PKG) • Key Splitting • Local Load Estimation The Power of Both Choices 10 Source Source Worker Worker Worker 2 0 1 1 0 2 2 0 2
  • 11. Partial Key Grouping (PKG) • Key Splitting – Distributed – Stateless – Handle Skew • Local load estimation – No coordination among sources – No communication with workers 11The Power of Both Choices
  • 12. Partial Key Grouping The Power of Both Choices 12 • PKG • Load Balance ✔ • Memory O(1) ✔ • Aggregation O(1) ✔
  • 13. Analysis: Chromatic Balls and Bins • Problem Formulation – If messages are drawn from a key distribution where probabilities of keys are p1≥p2≥p3….. ≥pn – Each key has d choices out of n workers • Minimize the difference between maximum and average workload The Power of Both Choices 13
  • 14. Analysis • Necessary Condition: If pi represents the probability of occurrence of a key i • Bounds: The Power of Both Choices 14
  • 15. Streaming Applications • Most algorithms that use Shuffle Grouping can be expressed using Partial Key Grouping to reduce: – Memory footprint – Aggregation overhead • Algorithms that use Key Grouping can be rewritten to achieve load balance The Power of Both Choices 15
  • 16. Streaming Examples • Naïve Bayes Classifier • Streaming Parallel Decision Trees • Heavy Hitters and Space Saving The Power of Both Choices 16
  • 17. Stream Grouping: Summary Grouping • Pros • Cons Key Grouping • Scalable • Memory • Load Imbalance Shuffle Grouping • Load Balance • Memory O(W) • Aggregation O(W) Partial Key Grouping • Scalable • Load Balance • Memory O(1) • Aggregation O(1) The Power of Both Choices 17
  • 18. Experiments • What is the effect of key splitting on POTC? • How does local estimation compare to a global oracle? • How does PKG perform on a real deployment on Apache Storm? The Power of Both Choices 18
  • 19. Experimental Setup • Metric – the difference of maximum and the average load of the workers at time t • Datasets – Twitter, 1.2G tweets (crawled July 2012) – Wikipedia, 22M access logs – Twitter, 690K cashtags (crawled Nov 2013) – Social Networks, 69M edges – Synthetic, 10M keys 19The Power of Both Choices
  • 20. Effect of Key Splitting The Power of Both Choices 20
  • 21. Local Load Estimation The Power of Both Choices 21
  • 22. Real deployment: Apache Storm The Power of Both Choices 22 0 200 400 600 800 1000 1200 1400 1600 0 0.2 0.4 0.6 0.8 1 Throughput(keys/s) (a) CPU delay (ms) PKG SG KG 1000 1100 1200 0.10 0 2.10 6 4.10 6 6.10 6 (b) Memory (keys) 10s 10s 30s 30s 60s 60s 300s 300s 600s 600s PKG SG KG
  • 23. Conclusion • Partial Key Grouping (PKG) reduces the load imbalance by up to seven orders of magnitude compared to Key Grouping • PKG imposes constant memory and aggregation overhead, i.e., O(1), compared to Shuffle Grouping that is O(W) • Apache Storm – 60% improvement in throughput – 45% improvement in latency • PKG has been integrated in Apache Storm ver 0.10. 23The Power of Both Choices
  • 24. Future Work • Load Balancing for Stateful Operators using key migration • Adaptive Load Balancing for highly skewed data • Load Balancing for graph processing systems The Power of Both Choices 24
  • 25. The Power of Both Choices Practical Load Balancing for Distributed Stream Processing Engines Muhammad Anis Uddin Nasir, Gianmarco De Francisci Morales, David Garcia-Soriano Nicolas Kourtellis, Marco Serafini International Conference on Data Engineering (ICDE) 2015

Editor's Notes

  1. Hey everyone: I am Anis. A PhD student from KTH Royal Institute of Technology. The work I will present today is a result of my internship at Yahoo Labs Barcelona For this work, I was working with people at the top. There is Gianmarco, David, Nicolas and Marco In our work, we propose a very simple and practical approach for load balancing for Stream processing Engines
  2. Stream processing systems are specialized for low latency and high throughput processing for real time data Few common domains of streaming applications are online machine learning, real time query processing, continuous computation Due to the need of real time processing, various frameworks have been proposed in the last decade.
  3. Streaming Applications are represented as DAGs In a DAG a vertex are set of operators that are distributed across cluster, which apply various light weight transformation of the incoming stream. For example, filters, join, union, aggregrate are common stream transformation. Edges are data channels that are use to route the data from one operator to another In stream processing systems, there are various stream grouping strategies for routing the keys from one level of operators to the never level of operators In todays talk, I will be concentrating on load balancing between the group of operators at each level of DAG
  4. Key grouping uses hash based assignment. It applies a hash function on the incoming data and assign the worker to the message by taking the mod of the hash Key grouping is a good choice for stateful operators like aggregates Shuffle grouping is a simple round roibin assignment scheme. Shuffle grouping is a good choice for stateless operators
  5. To understand stream grouping strategies, lets take an example of word count Suppose we want to count the words in the tweets from twitter To implement twitter wordcount, we need to set of operators, A first level of operator to split the tweets into set of words. And the next level of operator to count the words As we know that many of the real workloads are highly skewed.
  6. Talk about different load balance schemes. Memory Network Processing In particular, we are interested in balancing the workload for processing. So total number of messages processing
  7. An elegant solution is using the power of 2 choices: In the past it has been introduced as a balls and bins problem: Given a ball (that means a key in our setup) and a set of bins (workers) pick 2 random bins, check which one has the least load of balls and send the new ball to that one. Surprisingly, this simple strategy leads to an imbalance that is independent of the balls thrown at the bins. So this looks like a good solution. However, when applied in DSPEs, it has some complications Better than hashing Power of choices takes two bins and put at random, and it is better load balance
  8. It uses twice at most memory than key grouping
  9. Motivate the people to read the paper
  10. We performed various experiments to assess the performance of our technique. We compare with pure PoTC to study the effect of key splitting We study how well local load estimation reaches a solution which is similar in balance as with when having global information We study how robust PKG is to shifting skew We implemented the PKG on Apache Storm to see how well it does on a real DSPE system.
  11. We measured imbalance in the system: The maximum load observed across workers – the average load across workers. Compared global, local, and a version that does probing of load on workers at regular intervals Used different real and synthetic data: tweets, wikipedia page access, etc.
  12. Here, we compare PKG with regular POTC, a greedy online and offline algorithm and hashing. We show average imbalance across time, given different number of workers, for Wikipedia and Twitter Online greedy picks the least loaded worker to handle a new key. Offline greedy first sorts the keys by frequency and then executes online greedy. Hashing just applies a hash function on the keys (so it’s the KG version) -> Hashing performs the worst. -> PKG performs very well and similar to the Greedy algorithms -> Adding workers increases imbalance. Hashing is the single choice paradigm
  13. This is the average imbalance across the system and time, for Twitter, Wikipedia, Cashtags and a synthetic lognormal distribution. We study how well the local load estimation compares with global information. It is always very close, regardless of how many sources we allow the system to have. Some different patterns for the various datasets, but the trend is the same. Hashing is worst. Hashing is just for reference
  14. These are some results from a real deployment on Storm. We tried to simulate different working time per key. Fore example, reading 400KB from memory is 0.1ms and 1/10th of disk seek is 1ms On the left plot, we don't have aggregation phase but apply different CPU load per key and measure the throughput supported. On the right plot, we keep constant the CPU load to 0.4msecs and vary how often we do aggregation. 0.4 is close to saturation to the system. The less frequent is the aggregation, the more the memory cost. We see that PKG can offer similar or better throughput than SG for the same or smaller memory cost.