1
votes

I've configured a cluster of Kafka brokers and a cluster of Zk instances using kafka_2.11-1.1.0 distribution archive.

For Kafka brokers I've configured config/server.properties

broker.id=1,2,3
zookeeper.connect=box1:2181,box2:2181,box3:2181

For Zk instances I've configured config/zookeeper.properties:

server.1=box1:2888:3888
server.2=box3:2888:3888
server.3=box3:2888:3888

I've created a basic producer and a basic consumer and I don't know why I am able to write messages / read messages even if I shut down all the Zookeeper instances and have all the Kafka brokers up and running. Even booting up new consumers, producers works without any issue.

I thought having a quorum of Zk instances is a vital point for a Kafka cluster.

For both consumer and producer, I've used following configuration:

bootrapServers=box1:9092,box2:9092,box3:9092

Thanks

1

1 Answers

2
votes

I thought having a quorum of Zk instances is a vital point for a Kafka cluster.

Zookeeper quorum is vital for managing partition lists, leaders, etc. In general, ZK is necessary for management that is done by the cluster coordinator in the cluster.

Basically, right now (with ZK down), you cannot modify topics (as the partition metadata is stored in ZK), start up / shut down brokers (as they use ZK for discovery) and other similar operations.

Even booting up new consumers, producers works without any issue.

Producer/consumer operations reach out to brokers only. The broker instance can still append to the log, and can still communicate with other brokers to have replication. So it is possible to send a message, get it received by broker and saved to disk, with other brokers replicating (as they are continuously sending fetch requests to the leader (and they know who this partition's leader is because they saved that data when ZK was still running)).