Challenge - 5 Problems
Kafka Cluster Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this Kafka cluster state query?
Consider a Kafka cluster running with ZooKeeper. You run the command to describe the cluster state and get the following output snippet:
What does this output tell you about the cluster?
Controller ID: 1
Broker IDs: 1, 2, 3
ZooKeeper connected: true
What does this output tell you about the cluster?
Attempts:
2 left
💡 Hint
Look for the Controller ID and ZooKeeper connection status in the output.
✗ Incorrect
The output shows Controller ID as 1, meaning broker 1 is the controller. Broker IDs list three brokers. ZooKeeper connected is true, so ZooKeeper is active.
🧠 Conceptual
intermediate1:30remaining
What is the main role of ZooKeeper in a Kafka cluster?
In Kafka clusters that use ZooKeeper, what is ZooKeeper primarily responsible for?
Attempts:
2 left
💡 Hint
Think about what coordination tasks are needed in a distributed system.
✗ Incorrect
ZooKeeper manages metadata like broker info, topic configurations, and elects leaders for partitions. It does not store messages or handle client requests directly.
❓ Predict Output
advanced2:00remaining
What error occurs when Kafka tries to start without ZooKeeper in legacy mode?
You start a Kafka broker configured to use ZooKeeper but the ZooKeeper service is down. The broker logs show:
What does this error mean?
ERROR Fatal error during KafkaServer startup. Exiting.
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
What does this error mean?
Attempts:
2 left
💡 Hint
Look at the exception type and message about connection loss.
✗ Incorrect
The error shows Kafka cannot connect to ZooKeeper, which is required in legacy mode, so startup fails.
🧠 Conceptual
advanced2:00remaining
How does KRaft mode replace ZooKeeper in Kafka?
Kafka introduced KRaft mode to remove the dependency on ZooKeeper. What is the key difference in how KRaft manages metadata compared to ZooKeeper?
Attempts:
2 left
💡 Hint
Think about how Kafka can manage metadata internally without ZooKeeper.
✗ Incorrect
KRaft mode replaces ZooKeeper by using a built-in consensus quorum among Kafka brokers to manage metadata internally.
🚀 Application
expert2:30remaining
What happens to Kafka cluster availability during KRaft controller failure?
In a Kafka cluster running in KRaft mode with 3 controller nodes, one controller node fails unexpectedly. What is the expected behavior regarding cluster availability and metadata management?
Attempts:
2 left
💡 Hint
Consider how consensus and fault tolerance work in KRaft mode with multiple controllers.
✗ Incorrect
KRaft uses a quorum of controllers. Losing one controller in a 3-node quorum still leaves a majority to manage metadata and keep the cluster running.