SlideShare a Scribd company logo
Scaling big with Apache Kafka
Going big with Apache
Kafka
Nikolay Stoitsev - Sr. Software Engineer @ Uber
Kafka Cluster
Brocker
Brocker
Brocker
Topic
Message Message Message Message Message Message
Partition - ordered, immutable sequence
Message Message Message Message Message
Message Message Message Message Message
Message Message Message Message Message
Partition 0
Partition 1
Partition 2
Offset
Message Message Message Message MessagePartition 0
Offset: 1
Offset
Message Message Message Message MessagePartition 0
Offset: 2
Multi Subscriber
Message Message Message Message Message
Offset: 5Offset: 3
Consumer: 2 Consumer: 1
Broker
Broker
Broker
P0
P0
P0
P1
P1
P1
P2
P2
P2
Partitioned and Replicated
Broker
Broker
Broker
P0
P0
P0
P1
P1
P1
P2
P2
P3
Fault Tolerant
Broker
Broker
Broker
P0
P0
P0
P1
P1
P1
P2
P2
P2
Producers
Producer
Producer
Broker
Broker
Broker
P0
P0
P0
P1
P1
P1
P2
P2
P2
Producer
Producer
Consumer
Consumer
Consumer Group 1
Consumer
Consumer
Consumer
Consumer Group 2
Consumers
Broker
Broker
P0
P0
P1
P1
P2
P2
Producer
Consumer
Consumer
Consumer Group 1
ZooKeeper
Get Broker ID Update Offset
Scaling big with Apache Kafka
System for “collecting and delivering
high volumes of log data with low
latency”
Logging
Kafka
ELK
Hadoop
Publish - Subscribe
Or Kafka for interservice communication
Good throughput
Built-in partitioning, replication, and
fault-tolerance
Durability
Latency vs. Durability
One leader for every partition
Follower
Leader
Follower
Follower
Producer Consumer
In-sync Replicas
Follower
Leader
Follower
Follower
Producer Consumer
In-sync Replicas
Follower
Leader
Follower
Follower
Producer Consumer
In-sync Replicas
Leader
Follower
Follower
Producer Consumer
Tune for lower latency
● Acknowledgement after persisted on the leader
● Can lost message on leadership changes
● At-most-once semantic
Tune for durability
● Acknowledgement after persisted on all ISR
(after committed)
● No data loss
● At-least-once sematic
At-most-once cluster for logging
At-least-one cluster for message bus
Kafka as a message bus
KafkaUpstream Downstream
Failure isolation
Message queueing
Event driven architecture
Avro
KafkaUpstream
Downstrea
m
Schema
Registry
Publish Schema Fetch Schema
https://docs.confluent.io/current/schema-registry/docs/index.html
How to make sure something is
durably stored and will be processed
exactly once?
Scaling big with Apache Kafka
Process 1
OS
Process 2
OS
Process 1
OS
Process 2
OS
Process 1
OS
Process 2
OS
Process 1
OS
Process 2
OS
Process 1
OS
Process 2
OS
Idempotency
Idempotency + at least once delivery
Process 1 Process 2Kafka Consumer
Out of the box exactly once delivery
after 0.11
https://www.confluent.io/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/
Order
Service
Kafka
Payment
Consumer
Payment
Provider
Handling Failures
Order
Service
Kafka
Payment
Consumer
Payment
Provider
Clogged processing
Order
Service
Kafka
Payment
Consumer
Payment
Provider
Dead Letter Queue
Payment Retry 0
Payment Retry 1
Dead Letter Queue
Order
Service
Kafka Payment Consumer
Payment
Provider
Dead Letter Queue
Payment Retry 0
Payment Retry 1
Dead Letter Queue
Payment Consumer
Payment Consumer
Multi Data Center Application
Regional Cluster
Local Producer Regional Kafka
DC1
Local Producer Regional Kafka
DC2
Aggregated Cluster
Local Producer Regional Kafka
DC1
Local Producer Regional Kafka
DC2
Kafka Replicator
Aggregated
Kafka
DC3
https://github.com/uber/uReplicator
https://github.com/confluentinc/kafka-rest
Kafka
Upstream
Downstream
Kafka REST
Proxy
Kafka REST Proxy
How to monitor Kafka?
https://github.com/uber/chaperone
Detect data loss, lag and duplication
Audit Library
Regional Kafka
Service
Kafka REST
Proxy
Audit
Library
Audit
Library
Chaperone Service
Regional Kafka
Service
Kafka REST
Proxy
Audit
Library
Audit
Library
Chaperone
Service
Chaperone Collector
Regional Kafka
Service
Kafka REST
Proxy
Audit
Library
Audit
Library
Aggregate Kafka
Chaperone
Service
Chaperone
Service
Chaperone
Collector
DB
Scaling big with Apache Kafka
Scaling big with Apache Kafka
Scaling big with Apache Kafka
Summary
Tune for durability
Summary
Tune for durability
Define Avro Schemas
Summary
Tune for durability
Define Avro Schemas
Use Kafka REST Proxy
Summary
Tune for durability
Define Avro Schemas
Use Kafka REST Proxy
Add idempotency checks
Summary
Tune for durability
Define Avro Schemas
Use Kafka REST Proxy
Add idempotency checks
Use Dead Letter Queue
Summary
Tune for durability
Define Avro Schemas
Use Kafka REST Proxy
Add idempotency checks
Use Dead Letter Queue
Monitor everything
THANK YOU!
Nikolay Stoitsev
Sr. Software Engineer @ Uber

More Related Content

What's hot (15)

PPTX
Introduction To Streaming Data and Stream Processing with Apache Kafka
confluent
 
PDF
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
PPTX
Introducing Exactly Once Semantics To Apache Kafka
Apurva Mehta
 
PPTX
RedisConf17 - Pain-free Pipelining
Redis Labs
 
PDF
A 9 line shop powered by armeria
LINE Corporation
 
PDF
Kafka Summit SF 2017 - Running Kafka as a Service at Scale
confluent
 
PPTX
Apache kafka
MvkZ
 
PDF
Openzipkin conf: Zipkin at Yelp
Prateek Agarwal
 
PDF
B 2 line game cloud - our personal ec2
LINE Corporation
 
PDF
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
confluent
 
PDF
Apache Kafka – (Pattern and) Anti-Pattern
confluent
 
PDF
Codeless pipelines with pulsar and flink
Timothy Spann
 
PDF
Kafka on Pulsar
StreamNative
 
PDF
Exactly Once Delivery with Kafka - Kafka Tel-Aviv Meetup
Natan Silnitsky
 
PPTX
Robust Stream Processing with Apache Flink
Jamie Grier
 
Introduction To Streaming Data and Stream Processing with Apache Kafka
confluent
 
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
Introducing Exactly Once Semantics To Apache Kafka
Apurva Mehta
 
RedisConf17 - Pain-free Pipelining
Redis Labs
 
A 9 line shop powered by armeria
LINE Corporation
 
Kafka Summit SF 2017 - Running Kafka as a Service at Scale
confluent
 
Apache kafka
MvkZ
 
Openzipkin conf: Zipkin at Yelp
Prateek Agarwal
 
B 2 line game cloud - our personal ec2
LINE Corporation
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
confluent
 
Apache Kafka – (Pattern and) Anti-Pattern
confluent
 
Codeless pipelines with pulsar and flink
Timothy Spann
 
Kafka on Pulsar
StreamNative
 
Exactly Once Delivery with Kafka - Kafka Tel-Aviv Meetup
Natan Silnitsky
 
Robust Stream Processing with Apache Flink
Jamie Grier
 

Similar to Scaling big with Apache Kafka (20)

DOCX
A Quick Guide to Refresh Kafka Skills
Ravindra kumar
 
PDF
Introduction to Apache Kafka
Shiao-An Yuan
 
PPTX
Kafka overview v0.1
Mahendran Ponnusamy
 
ODP
Apache Kafka Demo
Edward Capriolo
 
PDF
Deep dive into Apache Kafka consumption
Alexandre Tamborrino
 
PPTX
Kafka RealTime Streaming
Viyaan Jhiingade
 
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
PDF
Kafka in action - Tech Talk - Paytm
Sumit Jain
 
PPTX
Kafka101
Aparna Pillai
 
PDF
Kafka 101 and Developer Best Practices
confluent
 
PPTX
Getting Started with Kafka on k8s
VMware Tanzu
 
PDF
Introduction to apache kafka
Samuel Kerrien
 
PPTX
Apache Kafka with Spark Streaming: Real-time Analytics Redefined
Edureka!
 
PPTX
Microservices interaction at scale using Apache Kafka
Ivan Ursul
 
PDF
Apache Kafka - Martin Podval
Martin Podval
 
PPTX
Apache kafka
Kumar Shivam
 
PDF
Kafka Deep Dive
Knoldus Inc.
 
PPTX
kafka_session_updated.pptx
Koiuyt1
 
PPTX
Introduction to Kafka
Ducas Francis
 
PPTX
Introduction to Apache Kafka
Jeff Holoman
 
A Quick Guide to Refresh Kafka Skills
Ravindra kumar
 
Introduction to Apache Kafka
Shiao-An Yuan
 
Kafka overview v0.1
Mahendran Ponnusamy
 
Apache Kafka Demo
Edward Capriolo
 
Deep dive into Apache Kafka consumption
Alexandre Tamborrino
 
Kafka RealTime Streaming
Viyaan Jhiingade
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
Kafka in action - Tech Talk - Paytm
Sumit Jain
 
Kafka101
Aparna Pillai
 
Kafka 101 and Developer Best Practices
confluent
 
Getting Started with Kafka on k8s
VMware Tanzu
 
Introduction to apache kafka
Samuel Kerrien
 
Apache Kafka with Spark Streaming: Real-time Analytics Redefined
Edureka!
 
Microservices interaction at scale using Apache Kafka
Ivan Ursul
 
Apache Kafka - Martin Podval
Martin Podval
 
Apache kafka
Kumar Shivam
 
Kafka Deep Dive
Knoldus Inc.
 
kafka_session_updated.pptx
Koiuyt1
 
Introduction to Kafka
Ducas Francis
 
Introduction to Apache Kafka
Jeff Holoman
 
Ad

More from Nikolay Stoitsev (20)

PDF
Building vs Buying Software
Nikolay Stoitsev
 
PDF
How and why to manage your manager
Nikolay Stoitsev
 
PDF
From programming to management
Nikolay Stoitsev
 
PDF
A practical introduction to observability
Nikolay Stoitsev
 
PDF
Everything You Need to Know About NewSQL in 2020
Nikolay Stoitsev
 
PDF
3 lessons on effective communication for engineers
Nikolay Stoitsev
 
PDF
Evolving big microservice architectures
Nikolay Stoitsev
 
PDF
The career path of software engineers and how to navigate it
Nikolay Stoitsev
 
PDF
Migrating a data intensive microservice from Python to Go
Nikolay Stoitsev
 
PDF
NewSQL: what, when and how
Nikolay Stoitsev
 
PDF
How to read the v8 source code?
Nikolay Stoitsev
 
PDF
Running in multiple data centers
Nikolay Stoitsev
 
PDF
Distributed tracing for big systems
Nikolay Stoitsev
 
PDF
Reusable patterns for scalable APIs running on Docker @ Java2Days
Nikolay Stoitsev
 
PDF
Everyday tools and tricks for scaling Node.js
Nikolay Stoitsev
 
PDF
Node.js at Uber
Nikolay Stoitsev
 
PDF
Tracing python applications
Nikolay Stoitsev
 
PDF
Distributed tracing for Node.js
Nikolay Stoitsev
 
PDF
Design Patterns for Docker Applications
Nikolay Stoitsev
 
PDF
From Python to Java
Nikolay Stoitsev
 
Building vs Buying Software
Nikolay Stoitsev
 
How and why to manage your manager
Nikolay Stoitsev
 
From programming to management
Nikolay Stoitsev
 
A practical introduction to observability
Nikolay Stoitsev
 
Everything You Need to Know About NewSQL in 2020
Nikolay Stoitsev
 
3 lessons on effective communication for engineers
Nikolay Stoitsev
 
Evolving big microservice architectures
Nikolay Stoitsev
 
The career path of software engineers and how to navigate it
Nikolay Stoitsev
 
Migrating a data intensive microservice from Python to Go
Nikolay Stoitsev
 
NewSQL: what, when and how
Nikolay Stoitsev
 
How to read the v8 source code?
Nikolay Stoitsev
 
Running in multiple data centers
Nikolay Stoitsev
 
Distributed tracing for big systems
Nikolay Stoitsev
 
Reusable patterns for scalable APIs running on Docker @ Java2Days
Nikolay Stoitsev
 
Everyday tools and tricks for scaling Node.js
Nikolay Stoitsev
 
Node.js at Uber
Nikolay Stoitsev
 
Tracing python applications
Nikolay Stoitsev
 
Distributed tracing for Node.js
Nikolay Stoitsev
 
Design Patterns for Docker Applications
Nikolay Stoitsev
 
From Python to Java
Nikolay Stoitsev
 
Ad

Recently uploaded (20)

PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Tally software_Introduction_Presentation
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 

Scaling big with Apache Kafka