Kafka ਦਾ ਆਰਕੀਟੈਕਚਰ brokers ਦੇ ਕਲੱਸਟਰ (ਸਰਵਰ) ਨਾਲ ਬਣਿਆ ਹੈ ਜੋ partitioned, replicated topics ਨੂੰ store ਕਰਦੇ ਹਨ, producers ਲਿਖਦੇ ਹਨ ਅਤੇ consumers ਪੜ੍ਹਦੇ ਹਨ, metadata management ਦੁਆਰਾ coordinate ਕੀਤਾ ਜਾਂਦਾ ਹੈ (ਪਹਿਲਾਂ ZooKeeper, ਹੁਣ KRaft)। ਆਰਕੀਟੈਕਚਰ ਨੂੰ ਸਮਝਣਾ ਸਪਸ਼ਟ ਕਰਦਾ ਹੈ ਕਿ Kafka ਇੱਕ distributed system ਦੇ ਰੂਪ ਵਿੱਚ ਕਿਵੇਂ ਕੰਮ ਕਰਦਾ ਹੈ।
Components
BROKERS → Kafka SERVERS forming a CLUSTER:
→ store topic partitions (the data); serve producers and consumers
→ a cluster of multiple brokers → distributes data and load; scales horizontally
TOPICS / PARTITIONS → topics split into partitions, distributed across brokers
PRODUCERS → write events to topics (to partition leaders)
CONSUMERS (in groups) → read events from partitions
COORDINATION → metadata, cluster state, leader election:
→ historically ZOOKEEPER; now KRAFT (Kafka's own built-in consensus, removing ZooKeeper)
