Partitions are central to Kafka's design — they enable parallelism and scalability (distributing data and consumption) while providing ordering guarantees within each partition. Understanding partitions is key to understanding how Kafka scales and orders events.
Partitions enable parallelism and scale
A topic is split into multiple PARTITIONS, distributed across brokers:
→ data is spread across partitions → distribute storage and load
→ CONSUMER PARALLELISM → each partition consumed by one consumer in a group →
more partitions = more parallel consumers = higher throughput
→ scale a topic by adding partitions (and consumers)
→ partitions are the unit of PARALLELISM and horizontal scaling in Kafka
