
Discussing overall Kafka Architecture:
Topic is the abstraction we write and read from.
It is split into partitions that can be handled by separate brokers.
Partition is Log (a folder with Segment files).
Music: «Creative Minds» from Bensound.com
We are going to investigate the structure of real Kafka files and compare that to our existing knowledge.
We are going to run Kafka on our local machine in Docker!
Music: «Creative Minds» from Bensound.com
Discussing ordering guarantees provided by Kafka.
Music: «Creative Minds» from Bensound.com
Discussing Consumer Group abstraction - a way to scale our Consumer's performance without duplicated processing.
Music: «Creative Minds» from Bensound.com
Discussing how Kafka replicates data across the cluster for recovery in case of broker's outage.
Music: «Creative Minds» from Bensound.com
Discussing a role of Controller and how it is elected.
Music: «Creative Minds» from Bensound.com
Discussing how long data stays in partition without being deleted. Using visual analogy for better understanding the concept.
Music: «Creative Minds» from Bensound.com
Discussing how segment lifetime can be controlled (by time and size constraint).
Music: «Creative Minds» from Bensound.com
Performing some real-world calculations of cleanup configuration parameters applying the knowledge we already have.
Music: «Creative Minds» from Bensound.com
Wrapping up the topic of Delete Cleanup policy.
Music: «Creative Minds» from Bensound.com
In-depth discussion of Log Compaction Policy (alternative one to Delete Cleanup).
Music: «Creative Minds» from Bensound.com
Reviewing configuration options for Log Compacting.
Music: «Creative Minds» from Bensound.com
Discussing benefits of batching in Kafka (there are quite a few!).
Music: «Creative Minds» from Bensound.com
Discussing how Batching is done on the Producer side.
Music: «Creative Minds» from Bensound.com
Discussing new parameter in Kafka - delivery.timeout.ms and the benefits of using it instead of combination of existing parameters.
Music: «Creative Minds» from Bensound.com
Discussing configuration for Batching on Producer side.
Music: «Creative Minds» from Bensound.com
Overview of Batching on the Broker/Consumer side in addition to Producer-side Batching
Music: «Creative Minds» from Bensound.com
Configuration parameters of Batching of Consumer/Broker side and their default values.
Music: «Creative Minds» from Bensound.com
Batching is even more effecting when used together with Compression. Discussing what is Compression in general and how to use Compression in Kafka.
Music: «Creative Minds» from Bensound.com
Overview of the Rebalance Protocol in Kafka - this is a general protocol for distributing resources across group of members.
It is used in multiple use cases in Kafka (assigning partitions to consumers in Consumer Group, Kafka Connect and Kafka Streams).
We are going to review the requests/responses of the protocol and the Role of Member Group Leader and the Coordinator.
Music: «Creative Minds» from Bensound.com
Discussing what can trigger the Coordinator to start a Rebalance.
Music: «Creative Minds» from Bensound.com
Static Membership is an improvement that allows avoiding undesired rebalances when we need to quickly restart a member of the Group.
Music: «Creative Minds» from Bensound.com
In this detailed lecture, we are going to compare Eager Rebalance with Incremental Cooperative Rebalance - a more sophisticated type of rebalancing that is built on top of the same protocol (as said, Rebalance Protocol is very flexible!).
Music: «Creative Minds» from Bensound.com
Comparing pros and cons of different Partition Assignment Strategies that are present in Kafka out of the box.
Music: «Creative Minds» from Bensound.com
Wrapping up what we've learned in the course.
Music: «Creative Minds» from Bensound.com
Hi there!
You want to prepare to your Kafka Job Interview?
Or just want to know how Kafka works inside?
You are in good company!
My name is Anatolii and I am a Software Developer in the Internet of Things.
Every second we receive tons of data from our sensors and we've chosen Kafka as a backbone of our distributed backend application.
In this course, I am using my practical experience of running Apache Kafka in production and describe in detail the Architecture of Kafka and the motivation behind it.
This course is for you if:
you want to prepare for a Kafka Job Interview questions
you want to make better architectural decisions for your messaging system
more easily debug production issues with Kafka
or just want to know how Kafka is built inside.
We will cover:
Consumer Groups and rebalancing of partitions across Consumers
Replication of data in Kafka for redundancy and recovery
Different options to clean space in Kafka (delete or compact the logs)
Batching and compressing messages
Fault tolerance in Kafka Cluster
Rebalance protocol
Static membership
Incremental Cooperative Rebalance
We will also run Kafka in Docker to investigate Kafka files and their structure.
In this dense course, I've combined information from these primary sources:
The actual Kafka code
Kafka Improvement Proposals (KIP) - internal discussions in the Kafka community that describe the feature before its implementation
and of course, the knowledge I received personally from running Kafka in High Load production
If you want to know how Kafka is built or get prepared for your Kafka Job Interview I am glad to see you on the course!