SlideShare a Scribd company logo
Event Log
Pipeline @Twitter
Challenges of handling Billions
of events per minute
Systems @Scale Fall 2021
Lohit VijayaRenu
@lohitvijayarenu
#
TAGHASHT
AG#HASH
#HASHTAG
#
TAG#HASH
DataPlatform @Twitter
#Startups #Yahoo!
#Hadoop
Lohit VijayaRenu
@lohitvijayarenu
9:35AM · Oct 13, 2021
Example of
slide
● User interactions generate events
● Events are grouped as Datasets
● Datasets for Data processing & Analytics
Event Log Pipeline
Event Log Pipeline
1B 5B
~500 datasets
● Scale
● Resource requirement
~800 datasets
Events per
minute
Events per
minute
Challenges
Example of
slide
Architecture
Microservices
>100k instances
Clients
Events
Example of
slide
Architecture
Microservices
>100k instances
Clients
Event
Aggregation
Scribe
~3K instances
Events
Example of
slide
Architecture
Microservices
>100k instances
Clients
Event
Aggregation
Scribe
~3K instances
MapReduce
>10K jobs
Event
Processing
Events
Example of
slide
Architecture
Microservices
>100k instances
Clients
Event
Aggregation
Scribe
~3K instances
MapReduce
>10K jobs
HDFS, Presto, Scalding
>100PBs of data
Event
Processing
Event Log
Management
Events Datasets
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
● Per aggregator scaling challenges
● No multi tenancy for datasets
● Eco system integration
● Difficult to maintain and improve
Event Aggregation
Problem
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
● Moved to open source Flume
● Per aggregator improvements
● Microbatch, memory management,...
● Optimize resource usage
● Streaming at network speed
Event Aggregation
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
● Memory spikes before and after
Event Aggregation
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
● Data tiers with priorities
● Dataset groups
● Aggregator groups
● Dynamic scaling
Event Aggregation
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
● Scaling Aggregation
Event Aggregation
Dataset 1
Dataset 2
Dataset 3
Aggregator Group 1
Aggregator Group 2
Service
Discovery
Dataset Storage
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
Event Processing
Problem
● Thousands of process jobs
● Multitenancy
● Long tail reducers
● Unpredictable run time (traffic surge)
Example of
slide
Event Processing
● Apache Tez based processor
● Data tier processors
● Dynamic Hash based partition
Example of
slide
Event Processing
● Apache Tez based processor
● Data tier processors
● Dynamic Hash based partition
Raw Events
Partition
Partition
Partition
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
Migration
● Transparent migration
● More than 5 Billion events per
minute
● Per dataset scaling
● Reliable and fault tolerant framework
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
Migration
● Transparent migration
● More than 5 Billion events per
minute
● Per dataset scaling
● Reliable and fault tolerant framework
But…….
Latency!!!
Example of
slide
Near real time
Near real time
event streaming
● Analytics on real time user interactions
● End to end latency of minutes
● Data storage with real time insertion
Example of
slide
Architecture
Microservices
>1k instances
Clients
Events
Example of
slide
Architecture
Microservices
>10k instances
Clients
Streaming
Aggregation
Flume, Google
PubSub
Events
Example of
slide
Architecture
Microservices
>10k instances
Clients
Streaming
Aggregation
Flume, Google
PubSub
Apache Beam,
Google Dataflow
Streaming
Processor
Events
Example of
slide
Architecture
Microservices
>10k instances
Clients
Streaming
Aggregation
Flume, Google
PubSub
Apache Beam,
Google Dataflow
BigQuery, Google Cloud
Storage, Amplitude
Streaming
Processor
Real time
insertion
Events Datasets
Example of
slide
Latency
Dataset Type Event Latency
p90 p95 p99
Dataset 1 (very small datasets) 0.42 sec 0.48 sec 0.59 sec
Dataset 2 (Smaller datasets) 2.6 sec 2.8 sec 8.4 sec
Dataset 3 (Large datasets) 22.1 sec 29.9 sec 67.7 sec
Dataset 4 (Large datasets 5 min micro batch) 6.3 min 6.5 min 7.2 min
● Promising results
● Independent pipelines
Example of
slide
Example of Statement
Slide. Lorem ipsum dolor
sit amet, consectetur
adipiscing elit. Text size
should be between 80 pt to
140 pt depending on
paragraph length.
New challenges and future
● Scale for volume and spikes
● Stream processing and ingestion at
scale
● Faster catch up on failures
● Change Event Log Pipeline to Event
Streaming Pipelines
Follow @TwitterEng
@TwitterCareers
Thank You!
26
Log Ingestion and Replication
Data Platform Infrastructure
Data Platform SRE

More Related Content

PDF
Story of migrating event pipeline from batch to streaming
PPTX
Open Source india 2014
PDF
Scaling event aggregation at twitter
PDF
Extending Twitter's Data Platform to Google Cloud
PPTX
Managing 100s of PetaBytes of data in Cloud
PDF
How @twitterhadoop chose google cloud
PPTX
Scaling HDFS for Exabyte Storage@twitter
PPTX
Data Engineer’s Lunch #41: PygramETL
Story of migrating event pipeline from batch to streaming
Open Source india 2014
Scaling event aggregation at twitter
Extending Twitter's Data Platform to Google Cloud
Managing 100s of PetaBytes of data in Cloud
How @twitterhadoop chose google cloud
Scaling HDFS for Exabyte Storage@twitter
Data Engineer’s Lunch #41: PygramETL

What's hot (20)

PDF
Change Data Streaming Patterns for Microservices With Debezium
PPTX
Symantec: Cassandra Data Modelling techniques in action
PDF
Introduction to Streaming with Apache Flink
PDF
Using ClickHouse for Experimentation
PDF
The Rise of Streaming SQL
PPTX
Stream processing at Hotstar
PDF
Argus Production Monitoring at Salesforce
PDF
Data Streaming Ecosystem Management at Booking.com
PDF
Presto Summit 2018 - 10 - Qubole
PDF
Presto Summit 2018 - 04 - Netflix Containers
PDF
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
PDF
PDF
Streaming sql and druid
PPTX
Webinar: MongoDB Use Cases within the Oil, Gas, and Energy Industries
PDF
WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...
PDF
Siddhi - cloud-native stream processor
PDF
[Virtual Meetup] Using Elasticsearch as a Time-Series Database in the Endpoin...
PDF
Google Cloud Dataflow
PDF
Big Data Applications
PDF
Flink Forward San Francisco 2019: Building Financial Identity Platform using ...
Change Data Streaming Patterns for Microservices With Debezium
Symantec: Cassandra Data Modelling techniques in action
Introduction to Streaming with Apache Flink
Using ClickHouse for Experimentation
The Rise of Streaming SQL
Stream processing at Hotstar
Argus Production Monitoring at Salesforce
Data Streaming Ecosystem Management at Booking.com
Presto Summit 2018 - 10 - Qubole
Presto Summit 2018 - 04 - Netflix Containers
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
Streaming sql and druid
Webinar: MongoDB Use Cases within the Oil, Gas, and Energy Industries
WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...
Siddhi - cloud-native stream processor
[Virtual Meetup] Using Elasticsearch as a Time-Series Database in the Endpoin...
Google Cloud Dataflow
Big Data Applications
Flink Forward San Francisco 2019: Building Financial Identity Platform using ...
Ad

Similar to Log Events @Twitter (20)

PDF
Stream Processing – Concepts and Frameworks
PDF
Introduction to Stream Processing
PDF
Introduction to Stream Processing
PDF
Introduction to Stream Processing
PDF
Introduction to Stream Processing
PDF
Scaling up uber's real time data analytics
PDF
Stream Processing in SmartNews #jawsdays
PDF
Real Time Event Processing and In-­memory analysis of Big Data - StampedeCon ...
PPTX
SQL Server 2008 R2 StreamInsight
PDF
Extracting Insights from Data at Twitter
PDF
Introduction to Stream Processing
PPTX
Keystone event processing pipeline on a dockerized microservices architecture
PDF
#TwitterRealTime - Real time processing @twitter
PPTX
Microsoft SQL Server - StreamInsight Overview Presentation
PDF
Streaming Visualization
PDF
Building event-driven (Micro)Services with Apache Kafka
PDF
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
PPTX
Sweet Streams (Are made of this)
PPTX
MongoDB for Time Series Data
PDF
Data Ingestion in Big Data and IoT platforms
Stream Processing – Concepts and Frameworks
Introduction to Stream Processing
Introduction to Stream Processing
Introduction to Stream Processing
Introduction to Stream Processing
Scaling up uber's real time data analytics
Stream Processing in SmartNews #jawsdays
Real Time Event Processing and In-­memory analysis of Big Data - StampedeCon ...
SQL Server 2008 R2 StreamInsight
Extracting Insights from Data at Twitter
Introduction to Stream Processing
Keystone event processing pipeline on a dockerized microservices architecture
#TwitterRealTime - Real time processing @twitter
Microsoft SQL Server - StreamInsight Overview Presentation
Streaming Visualization
Building event-driven (Micro)Services with Apache Kafka
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
Sweet Streams (Are made of this)
MongoDB for Time Series Data
Data Ingestion in Big Data and IoT platforms
Ad

More from lohitvijayarenu (7)

PPTX
OpenSource and the Cloud ApacheCon.pptx
PPTX
The Adoption of Apache Beam at Twitter
PPTX
Twitter's Data Replicator for Google Cloud Storage
PDF
Large Scale EventLog Management @Twitter
PDF
Routing trillion events per day @twitter
PPTX
Hadoop 2 @Twitter, Elephant Scale. Presented at
PPTX
HBase backups and performance on MapR
OpenSource and the Cloud ApacheCon.pptx
The Adoption of Apache Beam at Twitter
Twitter's Data Replicator for Google Cloud Storage
Large Scale EventLog Management @Twitter
Routing trillion events per day @twitter
Hadoop 2 @Twitter, Elephant Scale. Presented at
HBase backups and performance on MapR

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PPTX
Geodesy 1.pptx...............................................
PDF
composite construction of structures.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
PPT on Performance Review to get promotions
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Project quality management in manufacturing
PPTX
Construction Project Organization Group 2.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Well-logging-methods_new................
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
additive manufacturing of ss316l using mig welding
Geodesy 1.pptx...............................................
composite construction of structures.pdf
Foundation to blockchain - A guide to Blockchain Tech
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Sustainable Sites - Green Building Construction
PPT on Performance Review to get promotions
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Project quality management in manufacturing
Construction Project Organization Group 2.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Well-logging-methods_new................
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Internet of Things (IOT) - A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx

Log Events @Twitter

Editor's Notes

  • #4: What are events and what does Event Log Pipeline look like? User interactions generate events. These flow throw our Event Log Pipeline which produce datasets These are available for data processing, data analytics
  • #5: What was our challenge Used to see YoY growth. We had projected to grow from 1B events per minute to 5B events per minute
  • #6: At the high level architecture Client emit event, More than 100K instance Event Aggregation framework at about 3K instances built on Scribe Once they generate raw dataset, these are further curated and optimized in processor Generating hourly batch
  • #7: At the high level architecture Client emit event, More than 100K instance Event Aggregation framework at about 3K instances built on Scribe Once they generate raw dataset, these are further curated and optimized in processor Generating hourly batch
  • #8: At the high level architecture Client emit event, More than 100K instance Event Aggregation framework at about 3K instances built on Scribe Once they generate raw dataset, these are further curated and optimized in processor Generating hourly batch
  • #9: At the high level architecture Client emit event, More than 100K instance Event Aggregation framework at about 3K instances built on Scribe Once they generate raw dataset, these are further curated and optimized in processor Generating hourly batch
  • #10: Per aggregator scaling challenge. Stress testing showed that there is a cap on how many events can be handled because of CPU bottleneck There was no multi tenancy. Bad dataset could cause problems to
  • #13: Planned vs unplanned
  • #14: Planned vs unplanned