Saturday 19 October 2019

Kafka: Brokers

Brokers are the actual servers that store data. A kafka cluster is composed or multiple brokers. Kafka server, broker, node all refer to same thing.
Since Kafka is distributed, whenever you create a topic, then kafka automatically distribute the partitions across the brokers.

For example, as you see above diagram, there are 4 brokers in a cluster.

a.   Topic 0 has 3 partitions 0, 1 and 2. Partition 0 is placed at broker 0, partition 1 placed at broker 1 and partition 2 placed at broker 2.
b.   Topic 1 has 2 partitions 0, 1. Partition 0 is placed at broker 0 and partition1 is placed at broker 3.

Each broker in the cluster is identified by an unique identifier. Whenever you connect to one broker, you are automatically connected to entire cluster.


Previous                                                    Next                                                    Home

No comments:

Post a Comment