SlideShare a Scribd company logo
Building Realtime Metrics Platform at LinkedIn
​Khai Tran
​Staff Software Engineer
Agenda
● Self introduction
● Data organization at LinkedIn
● Overview of LinkedIn metrics platform
● Moving from offline to nearline
● Under the hood of the nearline architecture
● Nearline production use cases
● Conclusion
About me
● Currently teach lead of LinkedIn metrics team
● BS from DHBK HN, K46
● PhD from University of Wisconsin- Madison, on databases. Thesis:
“Realizing parallelism in OLTP workloads”
● Interns at Oracle, Microsoft Research, and Google
● First job - Oracle Labs, mostly working on Oracle query optimizer
● Second job - AWS, in two teams:
○ DynamoDB: on Request Routers, DynamoDB query language
○ Redshift: on query processing, statistic collection
Data organization at LinkedIn
● Data infrastructure - online world
○ Operational databases: Espresso, Venice/Voldermort, graph database…
○ Streaming: Samza, Kafka, Brooklin/Databus
○ Search infrastructure...
● Analytic Platform and Application - offline world
○ Infrastructure: Hadoop eco, Spark, Presto, Goblin (for ETL), Pinot (OLAP databases)...
○ Platform: metrics platform, data warehouses
○ Applications: XLNT (A/B testing), Raptor (visualization), ThirdEye (anomaly
detection)...
● Relevance - machine learning related
○ Machine learning infrastructure and platform
○ Feed ranking, search ranking
○ PYMK, JYMI...
Overview of LinkedIn metrics platform
Metrics @ LinkedIn
● Metrics = Measurements over tracking data
● Tracking data: any logged events (web or mobile)
● Crucial for decision making:
○ Experimentation - test everything
○ Reporting - monitor and alert
○ In production, site-facing applications
Example
We provide:
● A trusted repository of metrics
● A self-serve platform for
sustainable lifecycle of metrics
In
production
Experimentation
Reporting
Primary Data
Unified
Metrics
Platform
LinkedIn unified metrics platform (UMP)
Growth of UMP Metrics
2016 20172015
6800
4680
1100
Current: 10K+ metrics
# code
LOAD …
# data
# transformation
# code
STORE …
# config
Metrics:
- A = SUM(A’)
- B = Unique(id)
Downstream:
- XLNT
- Raptor
UMP
User Code
Platform
Generated
Code
To
App
To
App
DefineDeclare
Onboard
Data
Metadata
Onboarding process
User
Moving from offline to nearline
Offline computation flows
Hourly job latency: 3-6 hours -> want realtime/nearline
......
Metric union
User code
User code
Cubing, Rollup
Dimension
augmentation
HDFS tables
Dali views
Pinot,
Presto
Azkaban execution
Espresso,
Oracle,
MySQL
...
What we want for nearline flows
Metric unionUser code
User code
Samza job
Dimension
augmentation
Pinot
Latency is not the only requirement
Easy to onboard ● Minimum effort to convert existing offline into nearline
● Easy to write user code for new nearline flows
Easy to maintain ● Just one version of user code - single source of truth
● Run as a service
Latency ● ~5 - 30 mins
Samza jobs
Putting things together
Pinot
Batch
jobs
UMP realtime platform
UMP offline platform
HDFS
Raptor
Lambda architecture with a single codebase
code configMetrics
definition
Current support
User code in Pig ● LOAD, STORE
● FILTER, SAMPLE, SPLIT, UNION
● Simple FOREACH
● JOIN - all semantics
● GROUP/COGROUP, DISTINCT
● Record/Array FLATTEN
● Java UDFs, Python UDFs
● Pig Nested FOREACH and sort/limit (in Windows)
● Hive
Not yet
Under the hood of the nearline architecture
Pig to Samza through SQL processing
Open source framework for building dynamic
data management systems. Including:
➢ SQL Parser
➢ Relational algebra APIs
➢ Query planning engine
We built UMP nearline with:
➢ Pig’s Grunt parser
➢ Calcite relational algebra
➢ Calcite query planning engine
Architecture
...
Metric union
User code
User code
Dimension
augmentation
Calcite relational
algebra as an IR
convert generate
Samza code
optimize
Samza
physical plan
Samza
configuration
Pig to Calcite Calcite to Samza
Pig to Calcite
# code
LOAD …
LOAD ...
COGROUP ...
STORE …
GruntParser
CO-
GROUP
LOAD LOAD
PigRelConverter
FULL
OUTERJ
OIN
AGGRE
GATE
AGGRE
GATE
TABLE
SCAN
TABLE
SCAN
PRO-
JECT
User scripts Pig Logical Plan Calcite relational algebra
Example
Example
Example
INNER
JOIN
FILTER FILTER
PROJECT PROJECT
PROJECT
TABLE
SCAN
TABLE
SCAN
Calcite logical plan
Planning/Optimization
➢ Calcite logical plans:
○ Relational algebra: What to do
➢ Samza physical plans:
○ Samza physical node: How to do it
➢ Calcite Samza planner:
○ Calcite logical plan -> optimized Samza physical plan
Example
Stream-
Stream Self
Join
Samza
Project
Samza
Project
Samza
Filter
Samza
Filter
Samza
Project
Input
Stream
INNER
JOIN
FILTER FILTER
PROJECT PROJECT
PROJECT
TABLE
SCAN
TABLE
SCAN
Calcite Samza
planner
Calcite logical plan Samza physical plan
Code-gen
From Samza physical plans:
➢ Generate Samza code for constructing the stream graph using Samza Fluent APIs .
Mapping:
➢ Samza physical nodes -> corresponding stream APIs:
○ Samza project -> stream.map()
○ Samza filter -> stream.filter()
○ ...
➢ Relational expressions -> lambda functions:
○ Filter expressions -> filter() functions
○ Project expressions -> map() functions
○ ...
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Example
Stream-
Stream Self
Join
Samza
Project 1
Samza
Project 2
Samza
Filter 1
Samza
Filter 2
Samza
Project
Input
Stream
Config-gen
Stream
Stream
Join
Samza
Project
Samza
Project
Samza
Filter
Samza
Filter
Samza
Project
Input
Stream
# dataset.conf
app-src
app-def
Nearline production use cases
Top stories picked
up by editors
Usage case 1 - Feedback to editor
Usage case 2 - Recruiter usage statistics
Conclusion
Samza jobs
From improved Lambda architecture...
Pinot
Batch
jobs
UMP realtime platform
UMP offline platform
HDFS
Raptor
Lambda architecture with a single codebase
code configMetrics
definition
… to our bigger picture
Pig Latin
Calcite
relational
algebra
HiveQL
SparkSQL/
RDD
Presto SQL
Portable
UDFs
AORA (Author Once, Run Anywhere) architecture
Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn

More Related Content

PDF
Grokking: Data Engineering Course
PDF
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
PDF
From Prototyping to Deployment at Scale with R and sparklyr with Kevin Kuo
PDF
Sysml 2019 demo_paper
PDF
A Microservices Framework for Real-Time Model Scoring Using Structured Stream...
PDF
Structured Streaming in Spark
PPTX
Hadoop Summit EU 2013: Parallel Linear Regression, IterativeReduce, and YARN
PPTX
Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...
Grokking: Data Engineering Course
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
From Prototyping to Deployment at Scale with R and sparklyr with Kevin Kuo
Sysml 2019 demo_paper
A Microservices Framework for Real-Time Model Scoring Using Structured Stream...
Structured Streaming in Spark
Hadoop Summit EU 2013: Parallel Linear Regression, IterativeReduce, and YARN
Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...

What's hot (20)

PDF
Understanding and Improving Code Generation
PPTX
Dash plotly data visualization
PDF
Building A Machine Learning Platform At Quora (1)
PDF
The Killer Feature Store: Orchestrating Spark ML Pipelines and MLflow for Pro...
PPTX
Cloud powered search
PDF
Productionalizing Models through CI/CD Design with MLflow
PPTX
Tech Talk - Overview of Dash framework for building dashboards
PDF
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
PDF
KFServing, Model Monitoring with Apache Spark and a Feature Store
PDF
Best Practices for Engineering Production-Ready Software with Apache Spark
PDF
Kyryl Truskovskyi: Kubeflow for end2end machine learning lifecycle
PDF
Splice Machine's use of Apache Spark and MLflow
PDF
Scaling Data and ML with Apache Spark and Feast
PDF
Serverless machine learning operations
PDF
High Performance Computing in web application
PDF
Multi runtime serving pipelines for machine learning
PDF
Productionizing Deep Reinforcement Learning with Spark and MLflow
PPTX
PDF
River Trail: A Path to Parallelism in JavaScript
PDF
Putting the Spark into Functional Fashion Tech Analystics
Understanding and Improving Code Generation
Dash plotly data visualization
Building A Machine Learning Platform At Quora (1)
The Killer Feature Store: Orchestrating Spark ML Pipelines and MLflow for Pro...
Cloud powered search
Productionalizing Models through CI/CD Design with MLflow
Tech Talk - Overview of Dash framework for building dashboards
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
KFServing, Model Monitoring with Apache Spark and a Feature Store
Best Practices for Engineering Production-Ready Software with Apache Spark
Kyryl Truskovskyi: Kubeflow for end2end machine learning lifecycle
Splice Machine's use of Apache Spark and MLflow
Scaling Data and ML with Apache Spark and Feast
Serverless machine learning operations
High Performance Computing in web application
Multi runtime serving pipelines for machine learning
Productionizing Deep Reinforcement Learning with Spark and MLflow
River Trail: A Path to Parallelism in JavaScript
Putting the Spark into Functional Fashion Tech Analystics
Ad

Similar to Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn (20)

PDF
Conquering the Lambda architecture in LinkedIn metrics platform with Apache C...
PDF
Streaming at Lyft, Gregory Fee, Seattle Flink Meetup, Jun 2018
PDF
Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...
PDF
XStream: stream processing platform at facebook
PDF
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
PDF
Big Data Analytics Platforms by KTH and RISE SICS
PDF
MongoDB .local Houston 2019: Wide Ranging Analytical Solutions on MongoDB
PPTX
Introduction to WSO2 Analytics Platform: 2016 Q2 Update
PDF
Build and Host Real-world Machine Learning Services from Scratch @ pycontw2019
PDF
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
PPTX
Data Engineer's Lunch #81: Reverse ETL Tools for Modern Data Platforms
PPTX
WSO2 Workshop Sydney 2016 - Analytics
PDF
Spark and machine learning in microservices architecture
PDF
Apache Arrow at DataEngConf Barcelona 2018
PDF
The Lyft data platform: Now and in the future
PDF
Lyft data Platform - 2019 slides
PDF
Netflix Machine Learning Infra for Recommendations - 2018
PDF
ML Infra for Netflix Recommendations - AI NEXTCon talk
PDF
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
PDF
Building real time data-driven products
Conquering the Lambda architecture in LinkedIn metrics platform with Apache C...
Streaming at Lyft, Gregory Fee, Seattle Flink Meetup, Jun 2018
Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...
XStream: stream processing platform at facebook
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
Big Data Analytics Platforms by KTH and RISE SICS
MongoDB .local Houston 2019: Wide Ranging Analytical Solutions on MongoDB
Introduction to WSO2 Analytics Platform: 2016 Q2 Update
Build and Host Real-world Machine Learning Services from Scratch @ pycontw2019
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Data Engineer's Lunch #81: Reverse ETL Tools for Modern Data Platforms
WSO2 Workshop Sydney 2016 - Analytics
Spark and machine learning in microservices architecture
Apache Arrow at DataEngConf Barcelona 2018
The Lyft data platform: Now and in the future
Lyft data Platform - 2019 slides
Netflix Machine Learning Infra for Recommendations - 2018
ML Infra for Netflix Recommendations - AI NEXTCon talk
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Building real time data-driven products
Ad

More from Grokking VN (20)

PDF
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
PDF
Grokking Techtalk #45: First Principles Thinking
PDF
Grokking Techtalk #42: Engineering challenges on building data platform for M...
PDF
Grokking Techtalk #43: Payment gateway demystified
PPTX
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
PPTX
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
PDF
Grokking Techtalk #39: Gossip protocol and applications
PDF
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
PDF
Grokking Techtalk #38: Escape Analysis in Go compiler
PPTX
Grokking Techtalk #37: Data intensive problem
PPTX
Grokking Techtalk #37: Software design and refactoring
PDF
Grokking TechTalk #35: Efficient spellchecking
PDF
Grokking TechTalk #33: High Concurrency Architecture at TIKI
PDF
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
PDF
SOLID & Design Patterns
PDF
Grokking TechTalk #31: Asynchronous Communications
PDF
Grokking TechTalk #30: From App to Ecosystem: Lessons Learned at Scale
PDF
Grokking TechTalk #27: Optimal Binary Search Tree
PDF
Grokking TechTalk #26: Kotlin, Understand the Magic
PDF
Grokking TechTalk #26: Compare ios and android platform
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #42: Engineering challenges on building data platform for M...
Grokking Techtalk #43: Payment gateway demystified
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
Grokking Techtalk #39: Gossip protocol and applications
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
Grokking Techtalk #38: Escape Analysis in Go compiler
Grokking Techtalk #37: Data intensive problem
Grokking Techtalk #37: Software design and refactoring
Grokking TechTalk #35: Efficient spellchecking
Grokking TechTalk #33: High Concurrency Architecture at TIKI
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
SOLID & Design Patterns
Grokking TechTalk #31: Asynchronous Communications
Grokking TechTalk #30: From App to Ecosystem: Lessons Learned at Scale
Grokking TechTalk #27: Optimal Binary Search Tree
Grokking TechTalk #26: Kotlin, Understand the Magic
Grokking TechTalk #26: Compare ios and android platform

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
August Patch Tuesday
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Spectroscopy.pptx food analysis technology
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
A comparative study of natural language inference in Swahili using monolingua...
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Advanced methodologies resolving dimensionality complications for autism neur...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
NewMind AI Weekly Chronicles - August'25-Week II
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
August Patch Tuesday
Accuracy of neural networks in brain wave diagnosis of schizophrenia
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Network Security Unit 5.pdf for BCA BBA.
Assigned Numbers - 2025 - Bluetooth® Document

Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn