SlideShare uma empresa Scribd logo
1 de 73
Baixar para ler offline
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
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?
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
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

Mais conteúdo relacionado

Mais procurados

A 9 line shop powered by armeria
A 9 line shop powered by armeriaA 9 line shop powered by armeria
A 9 line shop powered by armeria
LINE Corporation
 
B 2 line game cloud - our personal ec2
B 2 line game cloud - our personal ec2B 2 line game cloud - our personal ec2
B 2 line game cloud - our personal ec2
LINE Corporation
 

Mais procurados (15)

Introduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache KafkaIntroduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache Kafka
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
Introducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache KafkaIntroducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache Kafka
 
RedisConf17 - Pain-free Pipelining
RedisConf17 - Pain-free PipeliningRedisConf17 - Pain-free Pipelining
RedisConf17 - Pain-free Pipelining
 
A 9 line shop powered by armeria
A 9 line shop powered by armeriaA 9 line shop powered by armeria
A 9 line shop powered by armeria
 
Kafka Summit SF 2017 - Running Kafka as a Service at Scale
Kafka Summit SF 2017 - Running Kafka as a Service at ScaleKafka Summit SF 2017 - Running Kafka as a Service at Scale
Kafka Summit SF 2017 - Running Kafka as a Service at Scale
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Openzipkin conf: Zipkin at Yelp
Openzipkin conf: Zipkin at YelpOpenzipkin conf: Zipkin at Yelp
Openzipkin conf: Zipkin at Yelp
 
B 2 line game cloud - our personal ec2
B 2 line game cloud - our personal ec2B 2 line game cloud - our personal ec2
B 2 line game cloud - our personal ec2
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
 
Apache Kafka – (Pattern and) Anti-Pattern
Apache Kafka – (Pattern and) Anti-PatternApache Kafka – (Pattern and) Anti-Pattern
Apache Kafka – (Pattern and) Anti-Pattern
 
Codeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flinkCodeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flink
 
Kafka on Pulsar
Kafka on Pulsar Kafka on Pulsar
Kafka on Pulsar
 
Exactly Once Delivery with Kafka - Kafka Tel-Aviv Meetup
Exactly Once Delivery with Kafka - Kafka Tel-Aviv MeetupExactly Once Delivery with Kafka - Kafka Tel-Aviv Meetup
Exactly Once Delivery with Kafka - Kafka Tel-Aviv Meetup
 
Robust Stream Processing with Apache Flink
Robust Stream Processing with Apache FlinkRobust Stream Processing with Apache Flink
Robust Stream Processing with Apache Flink
 

Semelhante a Scaling big with Apache Kafka

[March sn meetup] apache pulsar + apache nifi for cloud data lake
[March sn meetup] apache pulsar + apache nifi for cloud data lake[March sn meetup] apache pulsar + apache nifi for cloud data lake
[March sn meetup] apache pulsar + apache nifi for cloud data lake
Timothy Spann
 
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around KafkaKafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Guido Schmutz
 
Fast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache PulsarFast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache Pulsar
Timothy Spann
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
MvkZ
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
MvkZ
 

Semelhante a Scaling big with Apache Kafka (20)

Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...
Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...
Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...
 
[March sn meetup] apache pulsar + apache nifi for cloud data lake
[March sn meetup] apache pulsar + apache nifi for cloud data lake[March sn meetup] apache pulsar + apache nifi for cloud data lake
[March sn meetup] apache pulsar + apache nifi for cloud data lake
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
 
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around KafkaKafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
[Big Data Spain] Apache Spark Streaming + Kafka 0.10: an Integration Story
[Big Data Spain] Apache Spark Streaming + Kafka 0.10:  an Integration Story[Big Data Spain] Apache Spark Streaming + Kafka 0.10:  an Integration Story
[Big Data Spain] Apache Spark Streaming + Kafka 0.10: an Integration Story
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Not Your Mother's Kafka - Deep Dive into Confluent Cloud Infrastructure | Gwe...
Not Your Mother's Kafka - Deep Dive into Confluent Cloud Infrastructure | Gwe...Not Your Mother's Kafka - Deep Dive into Confluent Cloud Infrastructure | Gwe...
Not Your Mother's Kafka - Deep Dive into Confluent Cloud Infrastructure | Gwe...
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Fast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache PulsarFast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache Pulsar
 
F_1330_Narkhede_Kafka .pptx
F_1330_Narkhede_Kafka .pptxF_1330_Narkhede_Kafka .pptx
F_1330_Narkhede_Kafka .pptx
 
From a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonFrom a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePerson
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Spark streaming + kafka 0.10
Spark streaming + kafka 0.10Spark streaming + kafka 0.10
Spark streaming + kafka 0.10
 
How to build 1000 microservices with Kafka and thrive
How to build 1000 microservices with Kafka and thriveHow to build 1000 microservices with Kafka and thrive
How to build 1000 microservices with Kafka and thrive
 

Mais de Nikolay Stoitsev

Mais de Nikolay Stoitsev (20)

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

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Scaling big with Apache Kafka