Apache Kafka Streaming (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
What is KRaft Mode (Kafka Raft Metadata Mode), and why was ZooKeeper eliminated?
senior LevelSystem DesignApache KafkaMicroservices
In Simple Words: Historically, Kafka relied on Apache ZooKeeper to manage cluster metadata, leader elections, and topic configurations.
- ZooKeeper Limitations: Dual-system operational overhead, metadata duplication in memory, slow cluster startup, and a practical limit of ~200,000 partitions per cluster.
- KRaft Mode (KIP-500 - Production standard since Kafka 3.3+):
- Replaces ZooKeeper with an internal, event-driven Raft consensus quorum running directly inside selected Kafka broker nodes.
- Metadata is stored as an internal Kafka topic (
@metadata). - Benefits: Instant cluster failover, scaling to millions of partitions, faster controller recovery, and a simplified single-binary deployment.