Kafka નું આર્કિટેક્ચર બ્રોકર્સનું ક્લસ્ટર (સર્વર્સ)ને લઈને બનેલું છે જે પાર્ટિશન્ડ, રીપ્લિકેટેડ ટોપિક્સ સ્ટોર કરે છે, જેમાં પ્રોડ્યુસર્સ લેખે છે અને કન્ઝ્યુમર્સ વાંચે છે, મેટાડેટા મેનેજમેન્ટ દ્વારા સમન્વિત (ઐતિહાસિક રીતે ZooKeeper, હવે KRaft). આર્કિટેક્ચર સમજવું સ્પષ્ટ કરે છે કે Kafka વિતરિત સિસ્ટમ તરીકે કેવી રીતે કાર્ય કરે છે.
ઘટકો
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)
