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
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How Plumbr uses Kafka
Nikita Salnikov-Tarnovski
February 04, 2018
More Decks by Nikita Salnikov-Tarnovski
See All by Nikita Salnikov-Tarnovski
Project clarity - random rant from an old engineer
nikem
0
100
Introduction to Druid
nikem
0
890
Deceived by monitoring
nikem
0
80
10% Happier
nikem
0
80
Where is my memory
nikem
0
510
Heap, off you go
nikem
0
1.3k
First steps in GC tuning
nikem
0
1.6k
I bet you have a memory leak
nikem
1
170
Plumbing Memory Leaks
nikem
1
150
Other Decks in Programming
See All in Programming
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
210
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
370
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.1k
Cloudflare is Agents
chimame
0
180
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
200
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
590
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
Flow は今どうなっているか
mizdra
PRO
0
700
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
160
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1k
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Thoughts on Productivity
jonyablonski
76
5.3k
The Curse of the Amulet
leimatthew05
2
14k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Crafting Experiences
bethany
1
260
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
300
Fireside Chat
paigeccino
42
4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
420
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
480
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
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