Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Optimizing Kafka Performance in Docker: Single ZooKeeper vs. Multiple, Broker Count Impact

I’m running a Kafka cluster within Docker and exploring different configurations for optimal performance. I have four scenarios in mind:

Scenario 1: Two Kafka servers with two brokers each (ksrv1:9092,9093 & ksrv2:9092,9093), served by a single ZooKeeper.

Scenario 2: Same as Scenario 1, but with two or three ZooKeepers for increased fault tolerance.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Scenario 3: Each Kafka server with a single broker and a dedicated ZooKeeper.

Scenario 4: Similar to Scenario 3, but multiple ZooKeepers for high fault tolerance.

which scenario has better performance?

>Solution :

Kafka doesn’t require Zookeeper anymore. It especially should not be "one / multiple per broker". Kafka clusters can have tens of brokers, but only need up to 7 Zookeeper, max. If you use Kraft mode, then you need zero.

Multiple brokers (or Zookeeper) on a single host is unlikely to improve performance. Your single disk, cpu, and RAM will be the limiting factors, especially if data starts replicating within the same host disk

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading