ਅੰਦਰੋਂ, Kafka ਡਾਟਾ ਨੂੰ ਡਿਸਕ ਉੱਤੇ append-only log ਦੇ ਰੂਪ ਵਿੱਚ ਸਟੋਰ ਕਰਦਾ ਹੈ (segments ਵਿੱਚ ਆਯੋਜਿਤ), ਕੁਸ਼ਲ I/O ਤਕਨੀਕਾਂ ਦੀ ਵਰਤੋਂ ਕਰਦਾ ਹੈ, ਅਤੇ cluster metadata ਨੂੰ ZooKeeper (ਐਤਿਹਾਸਕ ਤੌਰ ਉੱਤੇ) ਜਾਂ KRaft (ਹੁਣ) ਦੁਆਰਾ ਪ੍ਰਬੰਧਿਤ ਕਰਦਾ ਹੈ। Kafka ਦੀਆਂ ਅੰਦਰੂਨੀ ਗੱਲਾਂ ਨੂੰ ਸਮਝਣਾ Kafka ਦੇ ਵਿਵਹਾਰ ਅਤੇ ਪ੍ਰਦਰਸ਼ਨ ਦੀ ਸਮਝ ਨੂੰ ਡੂੰਘਾ ਕਰਦਾ ਹੈ।
commit log storage
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)
