Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How Plumbr uses Kafka
Search
Nikita Salnikov-Tarnovski
February 04, 2018
Programming
0
84
How Plumbr uses Kafka
Nikita Salnikov-Tarnovski
February 04, 2018
Tweet
Share
More Decks by Nikita Salnikov-Tarnovski
See All by Nikita Salnikov-Tarnovski
Project clarity - random rant from an old engineer
nikem
0
65
Introduction to Druid
nikem
0
810
Deceived by monitoring
nikem
0
45
10% Happier
nikem
0
57
Where is my memory
nikem
0
410
Heap, off you go
nikem
0
1.2k
First steps in GC tuning
nikem
0
1.5k
I bet you have a memory leak
nikem
1
150
Plumbing Memory Leaks
nikem
1
110
Other Decks in Programming
See All in Programming
Ruby GitHub Packages
bkuhlmann
0
630
使ってみよう Azure AI Document Intelligence
kosmosebi
2
310
What We Can Learn From OSS
inouehi
0
420
今、知っておきたい! 生成AIエージェントの世界
elith
3
360
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
640
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
960
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
930
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
160
Elm Form Validation
bkuhlmann
0
510
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
370
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
A Tale of Four Properties
chriscoyier
151
22k
For a Future-Friendly Web
brad_frost
172
9k
What's in a price? How to price your products and services
michaelherold
237
11k
The Language of Interfaces
destraynor
151
23k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
How STYLIGHT went responsive
nonsquared
92
4.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Clear Off the Table
cherdarchuk
84
310k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Faster Mobile Websites
deanohume
299
30k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Transcript
Eating Kafka Nikita Salnikov-Tarnovski @iNikem
Intro to Kafka
What is Kafka • Distributed streaming platform • It lets
you publish and subscribe to streams of records • It lets you store streams of records in a fault-tolerant way.
What is Kafka • Kafka runs as a cluster on
one or more servers. • The Kafka cluster stores streams of records in categories called topics. • Each record consists of a key, a value, and a timestamp.
Four APIs http://kafka.apache.org/documentation/
Append log http://kafka.apache.org/documentation/
Brokers • Several brokers form a cluster • Coordinated with
Zookeeper • All partitions are distributed among brokers
Producers • Producer sends record to a topic • Based
on a key, partition is chosen • Leader broker is found • Wait for requested acks
Fast writes • Brokers cheat and don’t write to disk
• They write to disk cache • And let OS care about flushing to disk
Replication • Each topic can be replicated among brokers •
So for each partition there are X copies • Brokers just consume messages from leader
Consumer groups (c) Confluent
Consumer rebalance (c) Confluent
Commit • Consumer has to commit offsets he consumed •
You have to decide, when and how!
Delivery semantics • At least once • At most once
• Exactly once
Kafka Connect • Off-the-shelf solution to pipe data to or
from Kafka • E.g. DB, Elasticsearch, files, etc…
Kafka Streams • DSL and platform for writing data processing
streams • If you squint enough, very similar to Java8 streams and Fork-Join pool • But across multiple jvms and servers
Kafka in Plumbr
Kafka cluster • 5 brokers • 2x replication • 20T
data for last 90 days • Inflow ~125G per day
Data processing pipeline
Spring Cloud Stream • Greatly simplifies development of Kafka based
apps • Couple of annotations and data flows :)
Solving performance problems is hard. We don’t think it needs
to be. @JavaPlumbr/@iNikem http://plumbr.eu