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
Lightweight and Fault-tolerant: Using compacted...
Search
Elizabeth Giles
June 14, 2018
Technology
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lightweight and Fault-tolerant: Using compacted topics as a source of truth
Deck presented at the June 2018 Toronto Kafka meetup
Elizabeth Giles
June 14, 2018
Other Decks in Technology
See All in Technology
データエンジニアの次の戦場は "プロセスエンジニアリング"
sansantech
PRO
1
120
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
190
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
200
React改造してみた
tsukina_7mochi
0
140
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
170
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
290
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
690
開発を高速化。AIコーディングエージェントとCodeRabbitでループエンジニアリング
moongift
PRO
0
100
専門領域のAIをどう評価するか
bengo4com
2
320
Running Kotlin + Quarkus with Lambda
nealle
1
4k
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
140
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
2
4.1k
Believing is Seeing
oripsolob
1
250
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Rails Girls Zürich Keynote
gr2m
96
14k
Un-Boring Meetings
codingconduct
0
460
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Claude Code のすすめ
schroneko
67
230k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Transcript
Lightweight and Fault-tolerant: Using compacted topics as a source of
truth Elizabeth Giles · PagerDuty
Context The Problem of Backpressure Compacted Topics Our Solution
None
Ingestion Service Processing Service Ingestion Service Ingestion Service Processing Service
Processing Service Event Event Event Event Event
Context The Problem of Backpressure Compacted Topics Our Solution
Ingestion Service Processing Service Ingestion Service Ingestion Service Processing Service
Processing Service Event Event Event Event Event Event Event Event Event Event Event Event Event Event Event
Ingestion Service Processing Service Ingestion Service Ingestion Service Processing Service
Processing Service Event Event Event Event Event Event Event Event Event Event Event Event Event Event Event Processing Service Ingestion Service HELP!!!
Ingestion Service Processing Service Ingestion Service Ingestion Service Processing Service
Processing Service Event Event Event Event Event Event Event Event Event Event Event Event Event Event Event Processing Service Ingestion Service Customer: Acme Age: 5 minutes Customer: Acme Age: 0 minutes Throttle: Customer: Acme For: 10 minutes To: 20 events/minute
Context The Problem of Backpressure Compacted Topics Our Solution
What happens to Kafka data?
--config cleanup.policy=delete
Topic > Partition > Log Segment > Message
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10 1 byte
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 4 bytes segment.bytes=4, roll.ms=10
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 10 ms segment.bytes=4, roll.ms=10 4 bytes
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 10 ms segment.bytes=4, roll.ms=10 10 ms 4 bytes
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 Current Segment segment.bytes=4, roll.ms=10 10 ms 10 ms 4 bytes
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.bytes=4 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.bytes=4 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.bytes=4 S4 S3 S2
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.ms=10 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.ms=10 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=delete, retention.ms=10 S4
--config cleanup.policy=compact
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Clean Dirty Uncleanable Cleanable
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Clean Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S3 S2 S1 Key Last Offset “a” 7 “d” 6
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S1
Offset 1 2 3 6 7 Key “b” “f” “c”
“d” “a” Value 2 3 4 7 8 Time 1 2 3 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact S4 S1
segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.cleanable.ratio=0.5 Clean Dirty Clean Dirty Clean Dirty
Clean Dirty
segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.cleanable.ratio=0.5 Clean Dirty Clean Dirty Clean Dirty
Clean Dirty
segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.cleanable.ratio=0.5 Clean Dirty Clean Dirty Clean Dirty
Clean Dirty
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.compaction.lag.ms=20 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 Key
“a” “b” “f” “c” “d” “a” “d” “a” Value 1 2 3 4 5 6 7 8 Time 0 1 2 3 4 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.compaction.lag.ms=20 S4 S3 S2 S1
Offset 1 2 3 5 6 7 Key “b” “f”
“c” “a” “d” “a” Value 2 3 4 6 7 8 Time 1 2 3 25 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.min.compaction.lag.ms=20 S4 S3 S1
Offset 0 1 2 3 4 5 6 7 8
9 Key “a” “b” “f” “c” “f” “d” “a” “c” “d” “a” Value 1 2 3 4 null 5 6 null 7 8 Time 0 1 2 3 4 5 25 6 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.delete.retention.ms=20 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 8
9 Key “a” “b” “f” “c” “f” “d” “a” “c” “d” “a” Value 1 2 3 4 null 5 6 null 7 8 Time 0 1 2 3 4 5 25 6 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.delete.retention.ms=20 S4 S3 S2 S1
Offset 0 1 2 3 4 5 6 7 8
9 Key “a” “b” “f” “c” “f” “d” “a” “c” “d” “a” Value 1 2 3 4 null 5 6 null 7 8 Time 0 1 2 3 4 5 25 6 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.delete.retention.ms=20 S4 S3 S2 S1
Offset 1 7 8 9 Key “b” “c” “d” “a”
Value 2 null 7 8 Time 1 6 36 37 segment.bytes=4, roll.ms=10, cleanup.policy=compact, cleaner.delete.retention.ms=20 S4 S3 S1
So… what’s the point?
Context The Problem of Backpressure Compacted Topics Our Solution
Ingestion Service Processing Service Ingestion Service Ingestion Service Processing Service
Processing Service Event Event Event Event Event Event Event Event Event Event Event Event Event Event Event Processing Service Ingestion Service Customer: Acme Age: 5 minutes Customer: Acme Age: 0 minutes Throttle: Customer: Acme For: 10 minutes To: 20 events/minute
Requirements: 1. Processing service can create throttles 2. Ingestion service
can use throttles 3. Resilience to loss of throttle data
Compacted Topics!
Requirements: 1. Processing service can create throttles 2. Ingestion service
can use throttles 3. Resilience to loss of throttle data
What about...
Ingestion Service Processing Service Event Event Event Event Event
Ingestion Service Processing Service Event Event Event Event Event Throttle
Ingestion Service Processing Service Event Event Event Event Event Throttle
Throttle Throttle
Ingestion Service Processing Service Event Event Event Event Event Throttle
Throttle Throttle Throttle
Questions?