100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Big Data & Distributed Computing
35 minintermediate

Kafka Architecture — Brokers, Topics, Partitions

Apache Kafka is the dominant distributed event streaming platform, connecting producers that generate events to consumers that process them through a durable, fault-tolerant, high-throughput log. Originally built at LinkedIn to handle billions of events per day, Kafka decouples the systems that produce data from the systems that consume them — a producer does not need to know who consumes its events, and a consumer does not need to be running when the event is produced. This decoupling enables asynchronous, independently scalable architectures impossible with direct service-to-service calls.

Kafka's architecture is built around three fundamental abstractions: topics, which are named, ordered, durable logs of events; partitions, which are the unit of parallelism and ordering within a topic; and brokers, which are the server processes that store and serve partition data. Understanding how these three components interact — how topics are split across partitions, how partitions are distributed across brokers, how replication provides fault tolerance — is the foundation for designing Kafka pipelines that are both high-throughput and reliable.

Analogy🏏Cricket
🏏 Think of it like cricket: Imagine the DRS review system deployed across three independent video-review centres in Mumbai, Chennai, and London, each holding a copy of the ball-tracking data. A CAP partition is a network outage that cuts communication between them. A CP system says: if the centres cannot synchronise, no review decision is issued — no player walks until the system is restored. Consistency is guaranteed; availability is sacrificed. An AP system says: each centre issues its own decision based on its local data, even if that means Mumbai says out and London says not out — reviews continue but different centres may give different verdicts. Partition tolerance is non-negotiable because the network always has the possibility of failing; the choice is whether umpires wait for consensus or proceed with local data.
Lesson 19 of 35
0% complete