اندرونی طور پر، Kafka ڈسک پر ڈیٹا کو append-only log کے طور پر محفوظ کرتا ہے (segments میں منظم)، موثر I/O تکنیکوں کا استعمال کرتا ہے، اور ZooKeeper (تاریخی طور پر) یا KRaft (اب) کے ذریعے کلسٹر میٹا ڈیٹا کا انتظام کرتا ہے۔ اندرونی کام کو سمجھنا Kafka کے رویے اور کارکردگی کی گہری سمجھ پیدا کرتا ہے۔
Commit log اسٹوریج
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)
