Skip to main content

Partition

An ordered, immutable subdivision of a topic — the physical log where records are stored sequentially.

A partition is the real unit of storage and parallelism in Kafka. Each partition is an append-only log: new records are always added at the end, identified by an increasing offset. Partitions exist for two reasons — parallelism (multiple consumers can process different partitions at the same time) and scalability (a topic grows by spreading its partitions across more brokers). The message's key determines which partition it's stored in.