0
0
Kafkadevops~5 mins

ZooKeeper role (and KRaft replacement) in Kafka - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the primary role of ZooKeeper in Apache Kafka?
ZooKeeper manages the Kafka cluster metadata, including broker information, topic configurations, and leader election for partitions. It helps keep the cluster coordinated and consistent.
Click to reveal answer
beginner
How does ZooKeeper help with leader election in Kafka?
ZooKeeper keeps track of which broker is the leader for each partition. When a leader fails, ZooKeeper helps elect a new leader to maintain availability and consistency.
Click to reveal answer
intermediate
What is KRaft in the context of Kafka?
KRaft (Kafka Raft) is Kafka's built-in consensus mechanism designed to replace ZooKeeper. It manages metadata internally using the Raft protocol, simplifying Kafka's architecture.
Click to reveal answer
intermediate
Name one advantage of KRaft over ZooKeeper in Kafka.
KRaft removes the need for an external ZooKeeper service, reducing operational complexity and improving scalability by managing metadata within Kafka brokers themselves.
Click to reveal answer
advanced
What happens to Kafka's metadata management when switching from ZooKeeper to KRaft?
Kafka brokers themselves form a quorum using the Raft protocol to manage metadata, eliminating the external dependency on ZooKeeper and enabling a more streamlined cluster management.
Click to reveal answer
What does ZooKeeper primarily manage in a Kafka cluster?
ACluster metadata and leader election
BMessage storage
CConsumer offset tracking only
DNetwork communication
What protocol does KRaft use to manage Kafka metadata internally?
APaxos
BRaft
CTwo-phase commit
DGossip
Which of the following is a benefit of using KRaft over ZooKeeper?
ARemoves external dependency on ZooKeeper
BIncreases operational complexity
CRequires an external service
DSlower metadata updates
In Kafka with ZooKeeper, what triggers a new leader election?
AMessage production
BNew topic creation
CConsumer joining
DBroker failure
Which Kafka component is responsible for metadata management in KRaft mode?
AZooKeeper
BKafka producers
CKafka brokers forming a quorum
DKafka consumers
Explain the role of ZooKeeper in Kafka and why Kafka is moving towards KRaft.
Think about how Kafka manages metadata and what problems KRaft solves.
You got /5 concepts.
    Describe how KRaft changes the architecture of Kafka compared to using ZooKeeper.
    Focus on the shift from external to internal metadata management.
    You got /5 concepts.