Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap server vs zookeeper in kafka?

Why the use of zookeeper in kafka-consumer is deprecated and why it's recommended to use the bootstrap server instead ? what are the advantages of the bootstrap-server?

like image 331
Slim AZAIZ Avatar asked Sep 12 '17 09:09

Slim AZAIZ


People also ask

What is the difference between ZooKeeper and bootstrap server in Kafka?

In the current kafka-consumer tool using the --zookeeper or --bootstrap-server arguments distinguish between using the old and the new consumer. The old consumer needs Zookeeper connection because offset are saved there.

What is Bootstrap servers in Kafka?

servers is a mandatory field in Kafka Producer API. It contains a list of host/port pairs for establishing the initial connection to the Kafka cluster. The client will make use of all servers irrespective of which servers are specified here for bootstrapping.

Is Kafka connect a bootstrap server?

bootstrap. servers is a comma-separated list of host and port pairs that are the addresses of the Kafka brokers in a "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. A Kafka cluster is made up of multiple Kafka Brokers. Each Kafka Broker has a unique ID (number).

Is ZooKeeper still used in Kafka?

Usually, Kafka uses Zookeeper to store and manage all the metadata information about Kafka clusters. Kafka also uses Zookeeper as a centralized controller that manages and organizes all the Kafka brokers or servers.


1 Answers

Kafka consumer need to commit the offset to kafka and fetch the offset from kafka. Since kafka moved the offset storage from zookeeper to kafka brokers, a kafka consumer does not need to directly communicate with zookeeper, so the new kafka consumer does not need to config the zookeeper.

However, a kafka consumer always needs to connect to kafka brokers (cluster) to send the request to server, the bootstrap-server is just some brokers of this cluster, and using this, consumer could find all the brokers.

like image 150
GuangshengZuo Avatar answered Sep 21 '22 12:09

GuangshengZuo