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
Etsy on Migrating to Kafka (in three short years)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hakka Labs
January 22, 2015
Programming
6.1k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Etsy on Migrating to Kafka (in three short years)
Full post with video here:
Hakka Labs
January 22, 2015
More Decks by Hakka Labs
See All by Hakka Labs
New Workflows for Building Data Pipelines
hakka_labs
0
2.9k
Collaborative Topic Models for Users and Texts
hakka_labs
0
2.8k
Groupcache with Evan Owen
hakka_labs
2
5.4k
Testing Android at Spotify
hakka_labs
1
4.5k
It's Not a Bug, It's a Feature!
hakka_labs
0
3.2k
K-means Clustering to Understand Your Users
hakka_labs
0
2k
Building Amy: The Email-based Virtual Assistant by x.ai
hakka_labs
0
5k
Deep Learning and NLP Applications
hakka_labs
3
13k
Go and the Gophers
hakka_labs
2
11k
Other Decks in Programming
See All in Programming
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.8k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7k
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
120
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.2k
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
GraphQL の onError と Nullability のこれから
quramy
0
180
contenteditable と日本語入力に向き合う
colorful12
0
220
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
280
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
560
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
200
ActionController meets Protocol Buffers
sorah
1
720
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Designing Experiences People Love
moore
143
24k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Un-Boring Meetings
codingconduct
0
460
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
Transcript
Migrating to Kafka in Three Short Years A look at
the choices that defined the Etsy analytics stack
None
Path Dependence
Decisions made in the past limit options in the present,
even if the circumstances under which those past decisions were made are no longer relevant.
In other words, we can’t upgrade the Hadoop cluster until
we port all of the Cascading.jruby jobs to Scalding.
Sneak Preview ! 1. How Etsy built its original analytics
stack 2. Handling changes prepared us to rebuild our data pipeline 3. Kafka!
Starting from scratch
Choice #1 ! Acquire Adtuitive
None
None
Before you can work on search, you need real analytics
Choice #2 ! Build a zero-impact analytics stack
Etsy is not a cloud company but the first analytics
stack was cloud-based
(illustration here) browser CDN EMR S3 mysql FTP
Legacy effects: ! 24 hour latency on events 48 hour
latency on visits
Choice #3 ! Cascading.jruby
Hadoop Cascading Cascading.jruby
Choice #4 ! Use GA _utma cookie to define visits
Benefits: ! •Simpler ETL •Visits computed on the client side
•Easy to reconcile against Google Analytics
Choice #5 ! Using existing feature library for A/B tests
Leveraged existing experience with operational ramp-ups
Low impact: just required a logging change
Choice #6 ! Build analytics stack around visit-level metrics
Great for search and ads, less great for measuring engagement
Changing the tires without stopping the car
How do we instrument the iOS app? Summer 2012
1. Native app visits should have the same structure as
Web visits
2. Native app events should use the existing data pipeline
3. The native app should buffer events and send them
when convenient
Solution: ! 1. App uploads bundles of events to API
endpoint 2. Backend event logger curls the beacon for every event
Side effect: ! We have a backend event logger that
is now used all over the place
CDN diversification project Fall 2012
None
Migrated to our own beacon infrastructure
Data pipeline based on Apache, PHP, logrotate, and cron
We built our own Hadoop cluster: Etsydoop Fall 2012
We hired the Scalding guy Fall 2012
Hadoop Cascading Cascading.jruby Scalding
None
Uh oh, the Google Analytics JS hurts performance Fall 2012
The event logger’s GA dependency precluded async loading, hurting performance
First idea: duplicate the _utma functionality in our own code
The trouble with backend events
Visit Time Logger Event Type 1 12:01 frontend home 1
12:03 backend login 1 12:03 frontend view listing 1 1:31 backend logout 2 1:31 frontend view listing 2 1:32 frontend search 2 1:33 frontend view listing wrong visit
Complete rewrite of our ETL jobs Spring/Summer 2013
None
Backend page-view events Fall 2013
None
2014: the next phase
EventPipe goals
Use POST rather than multiple GET requests to prevent data
loss
Use JSON rather than query strings for comprehensibility
Validate beacon data before it enters the data pipeline
Use a binary serialization format for long-term storage
Use Kafka for data transfer to escape the batch paradigm
Eliminate individual beacon servers as points of failure
How do we handle the impedance mismatch between Apache/PHP and
Kafka?
Wrote a server in Go to serialize beacons in Thrift
and send them to Kafka
Use Apache for SSL termination
Still to come
Real-ish time ETL
Streaming infrastructure
Offline processing for more products
Other Kafka applications
Takeaways
Every choice you make has long-term implications
Fixing stuff creates new opportunities
@rafeco http://rc3.org