Rohit Kumar
•
17 April 2025
•
1 min
Kafka is a distributed event streaming platform capable of handling trillions of events a day. It is used for building real-time data pipelines and streaming applications. It is horizontally scalable, fault-tolerant, and runs in production in thousands of companies.
Let’s start with its main components:
Now let’s see what makes Kafka horizontally scalable and fault tolerant.
Horizontal Scalability: Partitions allow Kafka to scale horizontally. A topic can have multiple partitions distributed across multiple brokers. Allow multiple producers to write to different partitions in parallel, increasing throughput and allowing for more consumers to read from the topic simultaneously. Kafka uses a round-robin approach to distribute messages across partitions. And messages with the same key will be sent to the same partition. This is useful for maintaining order for messages with the same key. Because Kafka guarantees the order of messages within a partition, but not across topics.
NotEnoughReplicasException
.That’s it for now. In next post, I’ll deep dive into Producers, Consumers, Topics, Consumer Groups, Offsets, Serialization, and Deserialization.