Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why single node multiple broker in kafka cluster not preferred?

I am trying to implement kafka into production. Wanted to know why single-node, multiple-broker kafka instance is not preferred. Few people suggested that if multiple brokers are used on single node, they should be allocated separate disk space but the reason to do so is not clear.

Can someone please explain the impact of single broker vs multiple broker kafka instance on a single node.

like image 733
Aditya Avatar asked Dec 18 '22 07:12

Aditya


1 Answers

If you have multiple brokers on a single node with a single disk, then all brokers have to read from and write to a single disk. That makes the system do lots of random read and random write, and the Kafka cluster will have poor performance.

In contrast, if you have multiple disks on a single node, and each broker read from and write to a different disk, then you can avoid the random read/write problem.

UPDATE

Also, if you have too many brokers on a single machine, the network bandwidth might be a bottleneck. Since all brokers have to share the network bandwidth.

like image 70
for_stack Avatar answered May 27 '23 21:05

for_stack