SlideShare a Scribd company logo
Apache Kafka
Free Friday
Luiza Souza / Otávio Carvalho
lsouza@thoughtworks.com
ocarvalh@thoughtworks.com
Apache Kafka
● Apache Kafka is a distributed messaging system
○ Provides fast, highly scalable and redundant messaging
through a pub-sub model
● It was built at LinkedIn to be used as central hub for all of the
messaging communication between their systems
● Focus on scalability and fault tolerance
Motivation
● Microservices
○ "In short, the microservice architectural style is an approach to developing a
single application as a suite of small services, each running in its own process
and communicating with lightweight mechanisms, often an HTTP resource
API. These services are built around business capabilities and independently
deployable by fully automated deployment machinery."- Martin Fowler
● Monolith First
○ Using microservices as a way to decompose monolitical
infrastructures
● Message Queues
○ Asynchronous processing
○ Decoupling
○ Load balancing
○ Scalability
How is it different?
● High throughput
○ Millions of events per second per node
● Fault-tolerance guarantees
○ Relies on Apache Zookeeper for detection of node failures
and leader election
○ Maintains a structure called ISR (In-Sync Replica Set) in order
to be able to tolerate node failures
○ (Claims to) Guarantees up to f failures with f+1 replicas
without losing data
● Distributed
○ More nodes can be included and the system keeps its
high-performance and fault-tolerance capabilities
● Broker-centric (AMQP)
○ AMQP implementations are usually broker-centric
○ Focus on delivery guarantees between producers/consumers
○ Transient preferred over durable messages
○ Use the broker itself to maintain state of what is consumed
(via message acknowledgements)
● Producer-centric (Kafka)
○ Partition a fire hose of event data into durable message
brokers with cursors (pointers)
○ Support to batch consumers that may be offline, or online
consumers that want messages at low latency
○ Doesn't have message acknowledgements, it assumes the
consumer tracks what has been consumed so far
Comparison with AMQP
Kafka Terminology
● Producers
○ Processes that publishes
msgs to topics
● Consumers
○ Processes that reads
msgs from topics
● Topic
○ Name of the feed to which
msgs are published
● Broker
○ Process running on a
single machine
● Cluster
○ Group of brokers working
together
Kafka Terminology
● Partitions
○ Subdivision of Topics
■ Scalability
■ Load balancing
○ Consumers control
their own offsets
● Replication
○ In-Sync-Replica (ISR) sets
Kafka Terminology
Figure 1. A Kafka cluster with 4 brokers, 1 topic and 2 partitions, each
with 3 replicas
Use Cases
● Messaging
● Distributed log / Log aggregation
● Change Data Capture
● Stream Processing / Event Sourcing
Use Cases - Messaging
● Messaging
○ Simple Queueing
■ e.g. Queue for sending e-mails
○ Tracking user events
○ Near real-time metrics
Use Cases - Distributed Log
● Distributed log / Log aggregation
○ LinkedIn usage
■ The whole platform is built around a central log
■ 13 million messages/sec, 15 gigabytes per sec
■ Over 1100 brokers in more than 60 clusters
Use Cases - Change Data Capture
Use Cases - Stream Processing
● Stream Processing / Event Sourcing
LinkedIn's example Netflix's example
DEMO
14
ISSUES
15
Apache Kafka - Free Friday
Apache Kafka - Free Friday
Issues
● CAP theorem (Consistency, Availability, Partitioning)
○ "You can't sacrifice partition tolerance"
● Jepsen tests (@aphyr)
○ In order to force failures on Kafka, it needs to shrink ISR
(In-Sync Replica Set) to one node (the master) and then lose
the master itself
■ It will cause a leader election and a new leader will be
elected
● It causes Kafka to lose ~50% of writes done during this
partition time
■ Kafka users usually set a replication factor of 2 or 3
replicas for each partition on a given topic
Apache Kafka - Free Friday
THANK YOU
20
Luiza Souza / Otávio Carvalho
lsouza@thoughtworks.com
ocarvalh@thoughtworks.com
● https://aphyr.com/posts/315-jepsen-rabbitmq
● https://aphyr.com/posts/293-jepsen-kafka
● https://thoughtworks.jiveon.com/people/tbartlet/blog/2015/11/
02/project-metamorphosis-with-kafka-spark
● https://thoughtworks.jiveon.com/message/1013489
● https://medium.com/@ikem/event-sourcing-and-cqrs-a-look-at-
kafka-e0c1b90d17d8#.x4f9ezrwn
● https://martin.kleppmann.com/2016/01/29/event-sourcing-stre
am-processing-at-ddd-europe.html
● http://microservices.io/patterns/microservices.html
● http://martinfowler.com/articles/microservices.html
● https://engineering.linkedin.com/kafka/running-kafka-scale
● https://engineering.linkedin.com/kafka/intra-cluster-replication-
apache-kafka
● http://martinfowler.com/bliki/MonolithFirst.html
Links
● https://www.oreilly.com/learning/making-sense-of-stream-proc
essing/page/3/integrating-databases-and-kafka-with-change-da
ta-capture
● http://kafka.apache.org/documentation.html
● https://github.com/toddpalino/kafkafromscratch/blob/master/A
pache%20Kafka%20from%20Scratch.pdf
● http://www.javaworld.com/article/3060078/big-data/big-data-m
essaging-with-kafka-part-1.html
● https://sookocheff.com/post/kafka/kafka-in-a-nutshell/
Links
Use Cases - Change Data Capture
● Log compaction
○ Kafka + Kafka Connect
Partitioning
● Custom Partitioner
○ Write your own logic
● Default Partitioner
○ Manual
○ Hashing
■ The most common approach
■ Messages with the same key go to the same producer
○ Spraying
■ Random partitioning

More Related Content

What's hot (20)

PPTX
Apache Kafka: Next Generation Distributed Messaging System
Edureka!
 
PPTX
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Gwen (Chen) Shapira
 
PPTX
Reducing Microservice Complexity with Kafka and Reactive Streams
jimriecken
 
PPTX
Apache kafka
Viswanath J
 
PPTX
Kafka 101
Clement Demonchy
 
PPTX
Fundamentals and Architecture of Apache Kafka
Angelo Cesaro
 
PDF
Apache Kafka - Martin Podval
Martin Podval
 
PPSX
Apache kafka introduction
Mohammad Mazharuddin
 
PPTX
Apache kafka
Srikrishna k
 
PPTX
Introduction to Apache Kafka
AIMDek Technologies
 
PDF
Devoxx Morocco 2016 - Microservices with Kafka
László-Róbert Albert
 
PDF
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Guozhang Wang
 
PPTX
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
Lucas Jellema
 
PPTX
Introduction to Kafka
Ducas Francis
 
PDF
Kafka Overview
iamtodor
 
PPTX
Apache Kafka Best Practices
DataWorks Summit/Hadoop Summit
 
PPTX
Introduction to Kafka and Zookeeper
Rahul Jain
 
PDF
An Introduction to Apache Kafka
Amir Sedighi
 
PPTX
Building an Event Bus at Scale
jimriecken
 
Apache Kafka: Next Generation Distributed Messaging System
Edureka!
 
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Gwen (Chen) Shapira
 
Reducing Microservice Complexity with Kafka and Reactive Streams
jimriecken
 
Apache kafka
Viswanath J
 
Kafka 101
Clement Demonchy
 
Fundamentals and Architecture of Apache Kafka
Angelo Cesaro
 
Apache Kafka - Martin Podval
Martin Podval
 
Apache kafka introduction
Mohammad Mazharuddin
 
Apache kafka
Srikrishna k
 
Introduction to Apache Kafka
AIMDek Technologies
 
Devoxx Morocco 2016 - Microservices with Kafka
László-Róbert Albert
 
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Guozhang Wang
 
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
Lucas Jellema
 
Introduction to Kafka
Ducas Francis
 
Kafka Overview
iamtodor
 
Apache Kafka Best Practices
DataWorks Summit/Hadoop Summit
 
Introduction to Kafka and Zookeeper
Rahul Jain
 
An Introduction to Apache Kafka
Amir Sedighi
 
Building an Event Bus at Scale
jimriecken
 

Similar to Apache Kafka - Free Friday (20)

PDF
kafka
Ariel Moskovich
 
PDF
Event driven architectures with Kinesis
Mark Harrison
 
PDF
Building zero data loss pipelines with apache kafka
Avinash Ramineni
 
PPTX
Apache Kafka
Saroj Panyasrivanit
 
PDF
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Monal Daxini
 
PDF
Kafka in action - Tech Talk - Paytm
Sumit Jain
 
PDF
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
José Román Martín Gil
 
PDF
Non-Kafkaesque Apache Kafka - Yottabyte 2018
Otávio Carvalho
 
PDF
Uber: Kafka Consumer Proxy
confluent
 
PPTX
Captial One: Why Stream Data as Part of Data Transformation?
ScyllaDB
 
PPTX
Columbus mule soft_meetup_aug2021_Kafka_Integration
MuleSoft Meetup
 
PDF
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
confluent
 
PDF
Linked In Stream Processing Meetup - Apache Pulsar
Karthik Ramasamy
 
PDF
AMQP with RabbitMQ
Spyros Papageorgiou
 
PDF
Pulsar - Distributed pub/sub platform
Matteo Merli
 
PDF
High performance messaging with Apache Pulsar
Matteo Merli
 
PDF
Timothy Spann: Apache Pulsar for ML
Edunomica
 
PDF
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
HostedbyConfluent
 
PDF
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
HostedbyConfluent
 
PDF
(Current22) Let's Monitor The Conditions at the Conference
Timothy Spann
 
Event driven architectures with Kinesis
Mark Harrison
 
Building zero data loss pipelines with apache kafka
Avinash Ramineni
 
Apache Kafka
Saroj Panyasrivanit
 
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Monal Daxini
 
Kafka in action - Tech Talk - Paytm
Sumit Jain
 
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
José Román Martín Gil
 
Non-Kafkaesque Apache Kafka - Yottabyte 2018
Otávio Carvalho
 
Uber: Kafka Consumer Proxy
confluent
 
Captial One: Why Stream Data as Part of Data Transformation?
ScyllaDB
 
Columbus mule soft_meetup_aug2021_Kafka_Integration
MuleSoft Meetup
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
confluent
 
Linked In Stream Processing Meetup - Apache Pulsar
Karthik Ramasamy
 
AMQP with RabbitMQ
Spyros Papageorgiou
 
Pulsar - Distributed pub/sub platform
Matteo Merli
 
High performance messaging with Apache Pulsar
Matteo Merli
 
Timothy Spann: Apache Pulsar for ML
Edunomica
 
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
HostedbyConfluent
 
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
HostedbyConfluent
 
(Current22) Let's Monitor The Conditions at the Conference
Timothy Spann
 
Ad

More from Otávio Carvalho (8)

PDF
GaruaGeo: Global Scale Data Aggregation in Hybrid Edge and Cloud Computing En...
Otávio Carvalho
 
PDF
IoT Workload Distribution Impact Between Edge and Cloud Computing in a Smart ...
Otávio Carvalho
 
PDF
Stream Processing - ThoughtWorks Architecture Group - 2017
Otávio Carvalho
 
PDF
Stream Processing: Uma visão geral - TDC Porto Alegre / FISL 17
Otávio Carvalho
 
PDF
Distributed Near Real-Time Processing of Sensor Network Data Flows for Smart ...
Otávio Carvalho
 
PDF
A Survey of the State-of-the-art in Event Processing
Otávio Carvalho
 
PDF
Análise e Caracterização das Novas Ferramentas para Computação em Nuvem
Otávio Carvalho
 
PDF
Utilização de traços de execução para migração de aplicações para a nuvem
Otávio Carvalho
 
GaruaGeo: Global Scale Data Aggregation in Hybrid Edge and Cloud Computing En...
Otávio Carvalho
 
IoT Workload Distribution Impact Between Edge and Cloud Computing in a Smart ...
Otávio Carvalho
 
Stream Processing - ThoughtWorks Architecture Group - 2017
Otávio Carvalho
 
Stream Processing: Uma visão geral - TDC Porto Alegre / FISL 17
Otávio Carvalho
 
Distributed Near Real-Time Processing of Sensor Network Data Flows for Smart ...
Otávio Carvalho
 
A Survey of the State-of-the-art in Event Processing
Otávio Carvalho
 
Análise e Caracterização das Novas Ferramentas para Computação em Nuvem
Otávio Carvalho
 
Utilização de traços de execução para migração de aplicações para a nuvem
Otávio Carvalho
 
Ad

Recently uploaded (20)

PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
PDF
What companies do with Pharo (ESUG 2025)
ESUG
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
PPTX
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Presentation about variables and constant.pptx
kr2589474
 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
What companies do with Pharo (ESUG 2025)
ESUG
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 

Apache Kafka - Free Friday

  • 2. Apache Kafka ● Apache Kafka is a distributed messaging system ○ Provides fast, highly scalable and redundant messaging through a pub-sub model ● It was built at LinkedIn to be used as central hub for all of the messaging communication between their systems ● Focus on scalability and fault tolerance
  • 3. Motivation ● Microservices ○ "In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery."- Martin Fowler ● Monolith First ○ Using microservices as a way to decompose monolitical infrastructures ● Message Queues ○ Asynchronous processing ○ Decoupling ○ Load balancing ○ Scalability
  • 4. How is it different? ● High throughput ○ Millions of events per second per node ● Fault-tolerance guarantees ○ Relies on Apache Zookeeper for detection of node failures and leader election ○ Maintains a structure called ISR (In-Sync Replica Set) in order to be able to tolerate node failures ○ (Claims to) Guarantees up to f failures with f+1 replicas without losing data ● Distributed ○ More nodes can be included and the system keeps its high-performance and fault-tolerance capabilities
  • 5. ● Broker-centric (AMQP) ○ AMQP implementations are usually broker-centric ○ Focus on delivery guarantees between producers/consumers ○ Transient preferred over durable messages ○ Use the broker itself to maintain state of what is consumed (via message acknowledgements) ● Producer-centric (Kafka) ○ Partition a fire hose of event data into durable message brokers with cursors (pointers) ○ Support to batch consumers that may be offline, or online consumers that want messages at low latency ○ Doesn't have message acknowledgements, it assumes the consumer tracks what has been consumed so far Comparison with AMQP
  • 6. Kafka Terminology ● Producers ○ Processes that publishes msgs to topics ● Consumers ○ Processes that reads msgs from topics ● Topic ○ Name of the feed to which msgs are published ● Broker ○ Process running on a single machine ● Cluster ○ Group of brokers working together
  • 7. Kafka Terminology ● Partitions ○ Subdivision of Topics ■ Scalability ■ Load balancing ○ Consumers control their own offsets
  • 8. ● Replication ○ In-Sync-Replica (ISR) sets Kafka Terminology Figure 1. A Kafka cluster with 4 brokers, 1 topic and 2 partitions, each with 3 replicas
  • 9. Use Cases ● Messaging ● Distributed log / Log aggregation ● Change Data Capture ● Stream Processing / Event Sourcing
  • 10. Use Cases - Messaging ● Messaging ○ Simple Queueing ■ e.g. Queue for sending e-mails ○ Tracking user events ○ Near real-time metrics
  • 11. Use Cases - Distributed Log ● Distributed log / Log aggregation ○ LinkedIn usage ■ The whole platform is built around a central log ■ 13 million messages/sec, 15 gigabytes per sec ■ Over 1100 brokers in more than 60 clusters
  • 12. Use Cases - Change Data Capture
  • 13. Use Cases - Stream Processing ● Stream Processing / Event Sourcing LinkedIn's example Netflix's example
  • 18. Issues ● CAP theorem (Consistency, Availability, Partitioning) ○ "You can't sacrifice partition tolerance" ● Jepsen tests (@aphyr) ○ In order to force failures on Kafka, it needs to shrink ISR (In-Sync Replica Set) to one node (the master) and then lose the master itself ■ It will cause a leader election and a new leader will be elected ● It causes Kafka to lose ~50% of writes done during this partition time ■ Kafka users usually set a replication factor of 2 or 3 replicas for each partition on a given topic
  • 21. ● https://aphyr.com/posts/315-jepsen-rabbitmq ● https://aphyr.com/posts/293-jepsen-kafka ● https://thoughtworks.jiveon.com/people/tbartlet/blog/2015/11/ 02/project-metamorphosis-with-kafka-spark ● https://thoughtworks.jiveon.com/message/1013489 ● https://medium.com/@ikem/event-sourcing-and-cqrs-a-look-at- kafka-e0c1b90d17d8#.x4f9ezrwn ● https://martin.kleppmann.com/2016/01/29/event-sourcing-stre am-processing-at-ddd-europe.html ● http://microservices.io/patterns/microservices.html ● http://martinfowler.com/articles/microservices.html ● https://engineering.linkedin.com/kafka/running-kafka-scale ● https://engineering.linkedin.com/kafka/intra-cluster-replication- apache-kafka ● http://martinfowler.com/bliki/MonolithFirst.html Links
  • 22. ● https://www.oreilly.com/learning/making-sense-of-stream-proc essing/page/3/integrating-databases-and-kafka-with-change-da ta-capture ● http://kafka.apache.org/documentation.html ● https://github.com/toddpalino/kafkafromscratch/blob/master/A pache%20Kafka%20from%20Scratch.pdf ● http://www.javaworld.com/article/3060078/big-data/big-data-m essaging-with-kafka-part-1.html ● https://sookocheff.com/post/kafka/kafka-in-a-nutshell/ Links
  • 23. Use Cases - Change Data Capture ● Log compaction ○ Kafka + Kafka Connect
  • 24. Partitioning ● Custom Partitioner ○ Write your own logic ● Default Partitioner ○ Manual ○ Hashing ■ The most common approach ■ Messages with the same key go to the same producer ○ Spraying ■ Random partitioning