SlideShare a Scribd company logo
1
Stream Processing
and
Anomaly DetectioN
SAILESH MITTAL, KARTHIK RAMASAMY
ARUN KEJARIWAL
@saileshmittal, @karthikz,
@arun_kejariwal
GOING REAL TIME
[1]$
[2]$
[1]$h&p://www.adweek.com/news/technology/movie;studio;first;live;stream;trailer;premiere;twi&ers;periscope;163810$
[2]$h&p://qz.com/366433/american;airlines;is;playing;be&er;music;onboard;thanks;to;your;twi&er;complaints$$
[3]$h&p://www.theverge.com/2015/5/3/8539483/periscope;made;it;easy;to;watch;the;mayweather;pacquiao;fight;for;free$$
[3]$
2
G
Emerging break out
trends in Twitter (in the
form #hashtags)
Ü
Real time sports
conversations related
with a topic (recent goal
or touchdown)
!
Real time product
recommendations based
on your behavior &
profile
real time searchreal time trends real time conversations
WHY REAL TIME?
real time recommendations
Real time search of
tweets with a budget <
200 ms
s
3
STREAMING
ANALYTICS
"
[
I
4
! E
CUBE ANALYTICS
Business Intelligence
PREDICTIVE ANALYTICS
Statistics and Machine
learning
TYPES OF ANALYTICS
varieties
5
Ü
Ability to provide
insights after several
hours/days when a
query is posed
REAL TIME BATCH
DIMENSIONS OF ANALYTICS
variants
Ability to analyze the
data instantly
s
6
streaming
Analyze data as it is
being produced
interactive
Store data and provide
results instantly when
a query is posed
H
C
REAL TIME ANALYTICS
dichotomy
7
STREAMING VS. INTERACTIVE
dichotomy
Static Batch
Results/Reports
Database
Server
Data$
Storage$
Queries
Bulkload
Data
INTERACTIVE ANALYTICS STREAMING ANALYTICS
8
Real time alerts, Real time analytics
Continuous visibility
Data$
Storage$
Results
Queries
Data Stream
Processing
REAL TIME
visibility
WHAT IS REAL TIME?
milli secs or secs or mins?
approximate
few secs
BATCH
adhoc queries
high throughput
few hours/days
OLTP
deterministic workflows
latency sensitive
< 500 ms
9
STREAMING SYSTEMS
First generation - SQL
NiagaraCQ Query Engine [Chen et al., SIGMOD 2000]
STREAM: The Stanford Stream Data Manager [Arasu et al., SIGMOD 2003]
Aurora: A Data Stream Management Engine [Abadi et al., SIGMOD 2003]
The Design of the Borealis Stream Processing Engine [Abadi et al., CIDR 2005]
Cayuga: A general purpose event monitoring system [Demers et al., CIDR 2007]
10
STREAMING SYSTEMS
Next generation - too many
11
STORM
"
[
II
12
WHAT IS STORM?
GUARANTEED
MESSAGE
PROCESSING
HORIZONTAL
SCALABILITY
ROBUST
FAULT TOLERANCE
CONCISE CODE-
FOCUS ON LOGIC
/b  Ñ
Streaming platform for analyzing realtime data as they arrive,
so you can react to data as it happens.
13
STORM DATA MODEL
SPOUTS
Sources of data for the topology (e.g) Postgres/My SQL/Kafka/Kestrel
BOLTS
Units of computation on data (e.g) filtering/aggregation/join/transformations#
TOPOLOGY
Directed acyclic graph - vertices = computation, edges = streams of data
,
,
14
WORD COUNT TOPOLOGY
% %
TWEET SPOUT PARSE TWEET BOLT WORD COUNT BOLT
Live stream of Tweets
#worldcup : 1M
soccer: 400K
….
LOGICAL PLAN
15
WORD COUNT TOPOLOGY
% %
TWEET SPOUT
TASKS
PARSE TWEET BOLT
TASKS
WORD COUNT BOLT
TASKS
%%%% %%%%
When a parse tweet bolt task emits a tuple
which word count bolt task should it send to?
16
Replicates tuples to next
stage bolt instances
Sends all the tuples to a
single next stage bolt
instance
ALL GROUPING GLOBAL GROUPING
STREAM GROUPINGS
combining data
Groups tuples by a
single column value or
multiple column values
FIELDS GROUPING
Randomly distributes
tuples to next stage bolt
instances
SHUFFLE GROUPING
/ . - ,
17
STORM
INTERNALS
"
[
III
18
STORM ARCHITECTURE
Nimbus
ZK
CLUSTER
SUPERVISOR
W1 W2 W3 W4
SUPERVISOR
W1 W2 W3 W4
TOPOLOGY
SUBMISSION
ASSIGNMENT
MAPS
SLAVE NODE SLAVE NODE
MASTER NODE
Multiple Functionality
Scheduling/Monitoring
Single point of failure
Storage Contention
19
STORM WORKER
TASK
TASK
EXECUTOR
TASK
TASK
TASK
EXECUTOR
JVMPROCESS Complex hierarchy
Difficult to tune
Hard to debug
20
DATA FLOW IN STORM WORKERS
In QueueIn QueueIn QueueIn QueueIn Queue
TCP Receive Buffer
In QueueIn QueueIn QueueIn QueueOut Queue
Outgoing
Message Buffer
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
Thread
User Logic
ThreadSend Thread
Global Send
Thread
TCP Send Buffer
Global Receive
Thread
Kernel
Disruptor Queues
0mq Queues
Queue Contention
Multiple Languages
21
STORM@TWITTER
"
[
IV
22
STORM @TWITTER
Large amount of data
produced every day
Largest storm cluster Several topologies
deployed
Several billion
messages every day
>thousands
l
>50tb
h
> HUNDREDS
P
>3b
b
1 stage 8 stages
23
24
[1,$2]$
[1]$Published$in$SIGMOD’14$
[2]$h8ps://storm.apache.org/$$
2
STORM METRICS
CONTINUOUS PERFORMANCE
CLUSTER AVAILABILITY
3
SUPPORT AND TROUBLE SHOOTING
,
1
25
COLLECTING TOPOLOGY METRICS
,
% %
TWEET SPOUT PARSE TWEET BOLT WORD COUNT BOLT
%METRICS BOLT
SCRIBE
26
SAMPLE TOPOLOGY DASHBOARD
27
2
STORM OPERATIONS
HOT KEYS
NETWORK ISSUES
3
BAD HOST
,
1
2828
ANOMALY
DETECTION
"
[
V
29
PERFORMANCE BOTTLENECKS
FAILURES
Slow writes to data store, connectivity issues
BACKPRESSURE
CONTAINER DEATHSv
REAL-TIME PROCESSING
Tweets, Retweets
,
4
impact and common symptoms
#"ms"spent"under"
Backpressure"
30
Ë
PERFORMANCE BOTTLENECKS
HOT KEYS/CONNECTIVITY ISSUES
ANOMALOUS NODES
x
SPIKE IN INPUT TRAFFIC
,
⚡ Emit%Count%
Kestrel'Spout'Lag'
potential causes
31
☀
FINDING “ANOMALOUS” NODES
Example topology
Large # of containers
Several instances per containers
Multiple metrics per instances 32
FINDING “ANOMALOUS” NODES
distribution of # containers and # tasks
50 metrics per instance
Address only top 5 key metrics 33
FINDING “ANOMALOUS” NODES
STATISTICALLY ROBUST
Minimize false positives
FAST
$
AUTOMATED
Large # of topologies and large # of containers/topology
,
_
34
!
FINDING “ANOMALOUS” NODES
KEY FEATURES
Filter/Expected values/Long term
WIDELY USED OUTSIDE TWITTER
R PACKAGE[1]
: SEASONALITY AND TREND AWARE
Employs time series decomposition and robust statistics
,
|
35
[1]$h&ps://blog.twi&er.com/2015/introducing=prac?cal=and=robust=anomaly=detec?on=in=a=?me=series$
&
á
FINDING “ANOMALOUS” NODES
LEVERAGE MULTIPLE METRICS
Minimize false positives
EXPLOIT CORRELATION/TOPOLOGY
Observed variables[1]
and latent variables
R PACKAGE
Applicable to univariate time series
,
I
36
[1]$"Automa,c$Failure$Diagnosis$in$Distributed$Large:Scale$So<ware$Systems$based$on$Timing$Behavior$Anomaly$Correla,on",$by$Marwede,$N.$S.,$Rohr,$M.,$van$Hoorn,$A.$and$Hasselbring,$W.$In$European$CSMR,$March$24::27,$2009.$
E
#
FINDING “ANOMALOUS” NODES
SERVICE COMPONENT HEALTH
Determine the intersection of the set of anomalies of each instance
HOST HEALTH
Determine the intersection of the set of anomalies of each process
,
'
intersection analysis
37
'
FINDING “ANOMALOUS” NODES
ANOMALY TYPE - INPUT SPIKE
All metrics had sudden spikes
ANOMALY TYPE - CONTAINER DEATH
All metrics of instances on that container had drops
,
v
intersection analysis - validation
38
Q
QUESTIONS
and
ANSWERS
R
( Go ahead. Ask away.
Give us your best shot.
39
YOU
FOR LISTENING
)
THANK
40

More Related Content

PPTX
SFUSGS
PDF
19. stretnutie komunity kubernetes
PDF
TDD Boot Camp
PDF
It's a trap - java pitfalls
PDF
Real Time Analytics: Algorithms and Systems
PDF
Data Data Everywhere: Not An Insight to Take Action Upon
PDF
Reactive Stream Processing with Mantis
PDF
Anomaly detection in real-time data streams using Heron
SFUSGS
19. stretnutie komunity kubernetes
TDD Boot Camp
It's a trap - java pitfalls
Real Time Analytics: Algorithms and Systems
Data Data Everywhere: Not An Insight to Take Action Upon
Reactive Stream Processing with Mantis
Anomaly detection in real-time data streams using Heron

Viewers also liked (20)

PDF
Finding bad apples early: Minimizing performance impact
PDF
Statistical Learning Based Anomaly Detection @ Twitter
PDF
Handson with Twitter Heron
PDF
Gimme More! Supporting User Growth in a Performant and Efficient Fashion
PDF
Isolating Events from the Fail Whale
PPTX
Improved Reliable Streaming Processing: Apache Storm as example
PPTX
Lego-like building blocks of Storm and Spark Streaming Pipelines
PDF
Days In Green (DIG): Forecasting the life of a healthy service
PDF
A Systematic Approach to Capacity Planning in the Real World
PDF
Performance and Scale Options for R with Hadoop: A comparison of potential ar...
PDF
Deploying R in BI and Real time Applications
PPT
Real-Time Streaming with Apache Spark Streaming and Apache Storm
PDF
Predictive Analytics with Numenta Machine Intelligence
PDF
Detecting Anomalies in Streaming Data
PPTX
Enterprise Data Classification and Provenance
PPTX
Webinar | Real-time Analytics for Healthcare: How Amara Turned Big Data into ...
PDF
Apache Storm vs. Spark Streaming - two stream processing platforms compared
PPTX
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
PPTX
Performance Comparison of Streaming Big Data Platforms
PDF
Apache REEF - stdlib for big data
Finding bad apples early: Minimizing performance impact
Statistical Learning Based Anomaly Detection @ Twitter
Handson with Twitter Heron
Gimme More! Supporting User Growth in a Performant and Efficient Fashion
Isolating Events from the Fail Whale
Improved Reliable Streaming Processing: Apache Storm as example
Lego-like building blocks of Storm and Spark Streaming Pipelines
Days In Green (DIG): Forecasting the life of a healthy service
A Systematic Approach to Capacity Planning in the Real World
Performance and Scale Options for R with Hadoop: A comparison of potential ar...
Deploying R in BI and Real time Applications
Real-Time Streaming with Apache Spark Streaming and Apache Storm
Predictive Analytics with Numenta Machine Intelligence
Detecting Anomalies in Streaming Data
Enterprise Data Classification and Provenance
Webinar | Real-time Analytics for Healthcare: How Amara Turned Big Data into ...
Apache Storm vs. Spark Streaming - two stream processing platforms compared
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
Performance Comparison of Streaming Big Data Platforms
Apache REEF - stdlib for big data
Ad

Similar to Velocity 2015-final (20)

PDF
Big Data Day LA 2016/ Big Data Track - Twitter Heron @ Scale - Karthik Ramasa...
PPT
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
PDF
Storm@Twitter, SIGMOD 2014
PPTX
CCM AlchemyAPI and Real-time Aggregation
PDF
Self Regulating Streaming - Data Platforms Conference 2018
PPTX
Just in time (series) - KairosDB
PDF
[Velocity Conf 2017 NY] How Twitter built a framework to improve infrastructu...
PDF
String Comparison Surprises: Did Postgres lose my data?
PPTX
Stress Testing at Twitter: a tale of New Year Eves
PDF
Fast and Reliable Apache Spark SQL Engine
PDF
Twitter's Real Time Stack - Processing Billions of Events Using Distributed L...
PPTX
An Architect's guide to real time big data systems
PDF
Big Data for Oracle Professionals
PDF
BSSML16 L6. Basic Data Transformations
PDF
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
PPTX
Lambda Architecture - Storm, Trident, SummingBird ... - Architecture and Over...
PPTX
Risking Everything with Akka Streams
PDF
Distributed Real-Time Stream Processing: Why and How 2.0
PDF
Three Pillars, No Answers: Helping Platform Teams Solve Real Observability Pr...
PDF
Storm - As deep into real-time data processing as you can get in 30 minutes.
Big Data Day LA 2016/ Big Data Track - Twitter Heron @ Scale - Karthik Ramasa...
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
Storm@Twitter, SIGMOD 2014
CCM AlchemyAPI and Real-time Aggregation
Self Regulating Streaming - Data Platforms Conference 2018
Just in time (series) - KairosDB
[Velocity Conf 2017 NY] How Twitter built a framework to improve infrastructu...
String Comparison Surprises: Did Postgres lose my data?
Stress Testing at Twitter: a tale of New Year Eves
Fast and Reliable Apache Spark SQL Engine
Twitter's Real Time Stack - Processing Billions of Events Using Distributed L...
An Architect's guide to real time big data systems
Big Data for Oracle Professionals
BSSML16 L6. Basic Data Transformations
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Lambda Architecture - Storm, Trident, SummingBird ... - Architecture and Over...
Risking Everything with Akka Streams
Distributed Real-Time Stream Processing: Why and How 2.0
Three Pillars, No Answers: Helping Platform Teams Solve Real Observability Pr...
Storm - As deep into real-time data processing as you can get in 30 minutes.
Ad

More from Arun Kejariwal (13)

PDF
Anomaly Detection At The Edge
PDF
Serverless Streaming Architectures and Algorithms for the Enterprise
PDF
Sequence-to-Sequence Modeling for Time Series
PDF
Sequence-to-Sequence Modeling for Time Series
PDF
Model Serving via Pulsar Functions
PDF
Designing Modern Streaming Data Applications
PDF
Correlation Analysis on Live Data Streams
PDF
Deep Learning for Time Series Data
PDF
Correlation Analysis on Live Data Streams
PDF
Live Anomaly Detection
PDF
Modern real-time streaming architectures
PDF
Techniques for Minimizing Cloud Footprint
PDF
A Tool for Practical Garbage Collection Analysis In the Cloud
Anomaly Detection At The Edge
Serverless Streaming Architectures and Algorithms for the Enterprise
Sequence-to-Sequence Modeling for Time Series
Sequence-to-Sequence Modeling for Time Series
Model Serving via Pulsar Functions
Designing Modern Streaming Data Applications
Correlation Analysis on Live Data Streams
Deep Learning for Time Series Data
Correlation Analysis on Live Data Streams
Live Anomaly Detection
Modern real-time streaming architectures
Techniques for Minimizing Cloud Footprint
A Tool for Practical Garbage Collection Analysis In the Cloud

Recently uploaded (20)

PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
A Presentation on Touch Screen Technology
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
1. Introduction to Computer Programming.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
August Patch Tuesday
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Encapsulation theory and applications.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
A Presentation on Artificial Intelligence
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Getting Started with Data Integration: FME Form 101
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Hindi spoken digit analysis for native and non-native speakers
A Presentation on Touch Screen Technology
Web App vs Mobile App What Should You Build First.pdf
Approach and Philosophy of On baking technology
cloud_computing_Infrastucture_as_cloud_p
1. Introduction to Computer Programming.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Assigned Numbers - 2025 - Bluetooth® Document
August Patch Tuesday
TLE Review Electricity (Electricity).pptx
Encapsulation theory and applications.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A Presentation on Artificial Intelligence
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A comparative study of natural language inference in Swahili using monolingua...
Getting Started with Data Integration: FME Form 101

Velocity 2015-final