SlideShare a Scribd company logo
1 of 91
Download to read offline
​ Joel Koshy
​ Sr. Staff Software Engineer
​ LinkedIn
Outline
Background
A look back at Kafka 0.7
Kafka 0.8, 0.9 and shifting bottlenecks
Kafka 0.10 message format changes
Mirroring – the 0.7 way
Q&A
Kafka at LinkedIn
Kafka 0.7
Kafka 0.7 message format (uncompressed)
Kafka 0.7 message format (compressed)
Kafka 0.7 message format
Message offset is
the physical offset
Kafka 0.7 message format
Internal messages of compressed
message sets are not addressable
via a scalar offset
Kafka 0.7 message format
Consumer checkpoints offset M
for this message
•  Tricky to checkpoint within
compressed message set
•  Hard to rewind by N
messages
•  Unsuitable for features
such as log compaction
Drawbacks of 0.7
message format
B U T ! ! ! 
Very efficient
(broker did not need to modify messages)
Predominantly network in 0.7
S H I F T I N G B O T T L E N E C K S O V E R T I M E
Kafka 0.8
Replication
Replication in Kafka 0.8
Replication in Kafka 0.8
S H I F T I N G B O T T L E N E C K S O V E R T I M E 
Predominantly network in 0.7
Still network in 0.8, gradually tilting toward storage
Kafka 0.8 message format (uncompressed)
NOT a
physical offset!
Kafka 0.8 message format (compressed)
Envelope offset is the
largest offset in the set
Broker now needs to assign logical offsets
even to internal messages
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Kafka 0.9
Security (and many other features)
SSL
•  Forego zero-copy optimization
•  CPU overhead to decrypt/encrypt
•  Minor impact
•  (Used only on our mirroring pipelines
at the time)
Kafka 0.9
Mirroring topology and storage policy changes
Mirroring topology and storage policy changes
Mirroring topology and storage policy changes
•  Reduced retention period
across the board
•  File system tuning
2 0 1 5 - 2 0 1 6 
New hardware
10Gbps NICs, bigger disks, XFS
S H I F T I N G B O T T L E N E C K S O V E R T I M E 
Predominantly network in 0.7
Storage and network in 0.8, 0.9 (1Gbps NICs)
Increasingly CPU in 0.9 (10Gbps NICs)
Kafka 0.9 broker profile
Kafka 0.9 broker profile
Cluster expansion
Kafka 0.10
New message format
Kafka 0.10 message format (uncompressed)
Kafka 0.10 message format (compressed + append time)
Kafka 0.10 message format (compressed + create time)
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Handling produce requests
Handling fetch requests
Handling fetch requests
Handling fetch requests
Handling fetch requests
Handling fetch requests
Migrate clients before switching to 0.10 message format
Ideal Less ideal Worse Worst
Majority
producer version
0.10 0.9 0.10 0.9
Majority
consumer version
0.10 0.10 0.9 0.9
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
Migrating to the new message format
U S E C A U T I O N ! ! 
Severe performance degradation with older clients
and there is no roll-back after switching
So know your clients!
•  Useful to have a shepherding
system in your service infra
•  EOL older libraries
•  Check API versions in public
access logs
•  Add API version metrics to the
Kafka broker
PRODUCERS CONSUMERS
Kafka 0.10 broker profile
Impact of new message format
•  Fine-grained time-based offset
lookup
•  Facilitates correctness of time-
based retention
Other benefits of
0.10 format
“Time” under 0.9 message format
Message time is mtime of
containing segment so time
granularity is at segment-level
“Time” under 0.9 message format
Time resets on
partition reassignment
Time in 0.10 message format
Time indexes built from
timestamps in messages
Time in 0.10 message format
Mirroring pipelines
(embracing the 0.7 way)
0.7 mirror maker was a dumb fast pipe
0.7 mirror maker was a dumb fast pipe
0.7 mirror maker was a dumb fast pipe
0.7 mirror maker was a dumb fast pipe
… limited only by network
0 . 7 M I R R O R M A K E R
0.8+ mirror maker
•  Needs to preserve order of
keyed messages
0.8+ mirror maker
•  Needs to preserve order of
keyed messages
0.8+ mirror maker
•  Needs to preserve order of
keyed messages
0.8+ mirror maker
•  Needs to preserve order of
keyed messages
•  0.8+ consumers do not support
shallow iteration (KAFKA-732)
•  0.8+ producers do not support
pass-through mode
Kafka 0.8+ mirror maker profile
Handling keyed messages in pass-through mode
•  Need to preserve order of keyed messages…
but pass-through mirror maker cannot
repartition
Handling keyed messages in pass-through mode
•  Need to preserve order of keyed messages…
but pass-through mirror maker cannot
repartition
•  Work around is to require identical partition
counts across all clusters and do identity
partitioning
•  i.e., Pinput= Poutput
•  Restore shallow iteration in consumer
(KAFKA-1895)
•  “Todd’s trick” – introduce an identity
compression codec in producer
•  Uniform partition counts across clusters

0.10 pass-through
mirroring how-to
•  Restore shallow iteration in consumer
(KAFKA-1895)
•  “Todd’s trick” – introduce an identity
compression codec in producer
•  Uniform partition counts across clusters
•  … and a few more subtleties (future talk)
0.10 pass-through
mirroring how-to
•  Jiangjie Qin (KIP-3[1,2,3])
•  Todd Palino (pass-through mirroring)
•  Kafka open source community
Acknowledgments
+

More Related Content

Similar to Redlining Kafka Pipelines

Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)
Khalid Al-Ghamdi
 
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
WSO2
 

Similar to Redlining Kafka Pipelines (20)

Kafka Explainaton
Kafka ExplainatonKafka Explainaton
Kafka Explainaton
 
Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)
 
Introduction to WSO2 Integration Platform
Introduction to WSO2 Integration PlatformIntroduction to WSO2 Integration Platform
Introduction to WSO2 Integration Platform
 
WSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration PlatformWSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
 
Carbon 5 : A Preview
Carbon 5 : A PreviewCarbon 5 : A Preview
Carbon 5 : A Preview
 
WSO2Con USA 2015: Carbon 5: A Preview
WSO2Con USA 2015: Carbon 5: A PreviewWSO2Con USA 2015: Carbon 5: A Preview
WSO2Con USA 2015: Carbon 5: A Preview
 
New Exchange Server 2013 Architecture
New Exchange Server 2013 ArchitectureNew Exchange Server 2013 Architecture
New Exchange Server 2013 Architecture
 
Websocket
WebsocketWebsocket
Websocket
 
Quickr
QuickrQuickr
Quickr
 
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
WSO2 Product Release webinar - WSO2 Message Broker 2.2.0
 
Gain Insight Into DB2 9 And DB2 10 for z/OS Performance Updates And Save Cost...
Gain Insight Into DB2 9 And DB2 10 for z/OS Performance Updates And Save Cost...Gain Insight Into DB2 9 And DB2 10 for z/OS Performance Updates And Save Cost...
Gain Insight Into DB2 9 And DB2 10 for z/OS Performance Updates And Save Cost...
 
Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...
Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...
Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...
 
Architecture of a Next-Generation Parallel File System
Architecture of a Next-Generation Parallel File System	Architecture of a Next-Generation Parallel File System
Architecture of a Next-Generation Parallel File System
 
Upgrading to Exchange 2016
Upgrading to Exchange 2016Upgrading to Exchange 2016
Upgrading to Exchange 2016
 
IBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest EnhancementsIBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest Enhancements
 
Alles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssenAlles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssen
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
What is BranchCache 1.pdf
What is BranchCache 1.pdfWhat is BranchCache 1.pdf
What is BranchCache 1.pdf
 
DACHNUG50 Roadmap.pdf
DACHNUG50 Roadmap.pdfDACHNUG50 Roadmap.pdf
DACHNUG50 Roadmap.pdf
 

Recently uploaded

Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 

Recently uploaded (20)

Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

Redlining Kafka Pipelines