În mod intern, Kafka stochează datele ca un jurnal doar pentru adăugare pe disk (organizat în segmente), folosește tehnici I/O eficiente și gestionează metadatele clusterului prin ZooKeeper (istoric) sau KRaft (acum). Înțelegerea funcționării interne aprofundează înțelegerea comportamentului și performanței Kafka.
Stocarea jurnalului de commit
Each partition is an append-only LOG stored on disk, split into SEGMENTS (files):
→ new events are APPENDED to the end (sequential writes → fast)
→ events are immutable once written; identified by OFFSET
→ old segments are deleted (retention) or compacted
→ an INDEX maps offsets to file positions (fast lookups)
→ the append-only log is the core of Kafka's design (durable, sequential, efficient)
