Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scaling the Yelp's logging pipeline with Apache...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Enrico Canzonieri
June 02, 2016
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scaling the Yelp's logging pipeline with Apache Kafka
This talk was given at techsummit.io in Amsterdam
Enrico Canzonieri
June 02, 2016
Other Decks in Programming
See All in Programming
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
JIS keyboard support in Omarchy
lef237
0
120
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
160
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
230
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
430
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Jetpack Compose Mechanisms
skydoves
3
820
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Transcript
Scaling the Yelp’s logging pipeline with Apache Kafka Enrico Canzonieri
[email protected]
@EnricoC89
Yelp’s Mission Connecting people with great local businesses.
Yelp Stats As of Q1 2016 90M 32 70% 102M
What to expect • High-level architecture overview • Kafka best-practices
• No code
Logging? What is that?
A log is a stream of events
Producing and consuming logs should be easy
Logs at scale
Consuming logs becomes hard Solution: Centralized logging!
Log aggregation systems
Scribe Push based architecture
Yelp’s logging pipeline V1.0 Scribe Leaf Web app Scribe aggregator
xinetd Yelp Server Log aggregator S3 uploader tail -follow=name /nail/scribe/<category>/current consumer consumer Scribe Leaf Web app Yelp Server Amazon S3
Why use Scribe? • Simple to configure • Multilang support
(via Thrift) • Stable (most of the times) and fast • Support arbitrary message size
• No support for log consumption • Doesn’t really scale
• No replication • Abandoned project • Lack of plugins Why move away from Scribe?
Stream processing: Statmonster
Stream processing: Statmonster • Statmonster is a real-time metrics pipeline
• The first stage extract multiple metrics from each line • Consumes most of the high volume logs
• In 2013 the metrics from high volume logs started
falling behind • The first stage of the pipeline was too slow to keep up with the increased volume of logs Stream processing: Statmonster
• Short term solution: sample logs to save timeliness •
Long term solution: run Statmonster on Apache Storm. Stream processing: Statmonster
• Short term solution: sample logs to save timeliness •
Long term solution: run Statmonster on Apache Storm. Stream processing: Statmonster
The real bottleneck Aggregators Statmonster Statmonster Statmonster tail -f /nail/scribe/access
tail -f /nail/scribe/access tail -f /nail/scribe/access Can’t scale the consumer without increasing the number of physical log aggregators
Need to scale the source!
Kafka into the mix • High-throughput Publish-subscribe messaging system •
Distributed, replicated commit log • Client library available for a variety of languages • Configurable retention
Kafka Message (topic, partition, offset) Message 0 1 2 3
4 5 6 7 8 9 1 0 1 1 1 2 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 Partition 0 Partition 1 Partition 2 Old New Topic
Kafka Producer • Java producer is async by default •
Messages are produced in batch • Support either at-least-once or at- most-once semantic • Support compression out of the box
Kafka Consumer • Identified by a group id • Consumers
coordinate to consume from different partitions • Ability to re-play messages • Native support for offset commit
Architecture overview
Yelp’s logging pipeline V1.5 Scribe Leaf Scribe aggregator Kafka consumer
Kafka consumer Legacy consumer Legacy consumer Amazon S3 Scribe Leaf Sekretar
Sekretar • Act as a Scribe aggregator speaking the Scribe
protocol • Produce messages to Kafka • Map a log category into a topic • Act as an intermediate buffer • Handle big messages
Statmonster 2.0 Statmonster Kafka consumer access partition 0 Statmonster Kafka
consumer Statmonster Kafka consumer access partition 1 access partition N
Yelp’s logging pipeline V2.0 Scribe Leaf Legacy consumer Kafka consumer
Scribe Kafka Reader Legacy consumer Amazon S3 Scribe Leaf Sekretar
Multi-regional architecture Data center 1 Data center 2 Leaf Aggregate
logs consumer Leaf Amazon S3 Kafka consumer Kafka consumer Sekretar Sekretar
Configuration
Availability vs Consistency Cluster side: • Unclean leader election •
Replication factor • Minimum in-sync replicas (ISR) Producer side: • acks Disabled unclean.leader.election.enable 3: 1 leader + 2 followers default.replication.factor Quorum: 3/2 + 1 = 2 min. insync.replicas All (or -1): all replicas in the ISR need to ack acks
Provisioning partitions How many partitions for a topic? Producer Consumer
Partition 1 Partition 2 Producer Producer Partition 3 Partition 1 Partition 2 Producer Topic 1 Topic 2 Group 1 Consumer Consumer Consumer Group 2 Consumer
Criteria 1: consumer Consumer speed Number of different consumer groups
Criteria 2: Kafka Physical Limits of a single broker egress/ingress
Log retention Recovery speed upon broker failures
Criteria 3: producer Ingress rate into Kafka in msg/s and
bytes/s
Partitions auto-creation Regular traffic increase: Automatically increase the number of
partitions based on 99th percentile of bytes/s and msg/s over a time window of 3 days. Use a combined threshold of 700 msg/s and 500 KiB/s.
Tooling
Kafka-Utils Contains several command line tools to help operating and
maintaining a Kafka cluster. https://github.com/Yelp/kafka-utils • Cluster rolling restart • Consumer offset management • Cluster rebalance and broker decommission • Healthchecks
Monitoring
Monitoring Sekretar • Ingress: msg/s, bytes/s • Egress: msg/s, (compressed)
bytes/s • Message delay • Producer latency • Producer memory buffer • Timed-out message count
Monitoring Sekretar Unhealthy Kafka cluster
Kafka monitoring Kafka exports metrics via jmx (http://docs.confluent. io/1.0/kafka/monitoring.html): •
Offline partitions • Under replicated partitions • Controller count Kafka-Utils includes a check for min.isr
Consumer monitoring • Consumer speed (msg/s) • Kafka speed •
Consumer lag (msg)
Consumer monitoring Consumer slow down or logs volume increase
Apache Kafka @ Yelp 18 clusters ~ 100 brokers >
20K topics ~ 45K partitions > 5TB of data per day ~ 25 Billion messages per day
@YelpEngineering fb.com/YelpEngineers engineeringblog.yelp.com github.com/yelp