Zookeeper
Zookeeper manages Brokers, keeps a list of them
Zookeeper helps in performing Partition Leader election for Partitions
Zookeeper by design operates with an odd number of servers
Zookeeper has a leader (writes) the rest of the servers are followers (reads)
Zookeeper does note store consumer offsets
- Kafka 2.x can't work without Zookeeper
- Kafka 3.x can work with Zookeeper (KIP-500) - using Kafka Raft instead
- Kafka 4.x will not have Zookeeper
Consumer offsets are stored in a Kafka topic __consumer_offsets, and the Schema Registry stored schemas in the _schemas topic.
References
Flashcards
Zookeeper manages:: Brokers and keeps a list of them
Zookeeper helps in performing:: Partition Leader election for Partitions
Zookeeper by design operates with an odd number of servers
Zookeeper has a leader, the rest of the servers are followers
T/F Zookeeper stores the consumer offset:: false
What information isn't stored inside of Zookeeper (Choose 2)?
- ACL Information
- Broker registration info
- Consumer offset
- Controller registration
- Schema Registry schemas
? - Consumer offset
- Schema Registry schemas
Where are the dynamic configurations for a topic stored?:: In Zookeeper
A Zookeeper ensemble contains 3 servers. Over which ports the members of the ensemble should be able to communicate in default configuration?:: 2181 - client port, 2888 - peer port, 3888 - leader port
Kafka uses Apache Zookeeper to manage consensus. Zookeeper acts as a distributed consensus manager. Zookeeper stores information about:
- ACLs
- Failure detection and recovery
- Cluster Management
- Controllers
- All of the above
? - All of the above
You have a Zookeeper cluster that needs to be able to withstand the loss of 2 servers and still be able to function. What size should your Zookeeper cluster have?:: Your Zookeeper cluster needs to have an odd number of servers, and must maintain a majority of servers up to be able to vote. Therefore, a 2N+1 zookeeper cluster can survive to N zookeeper being down, so here the right answer is N=2, 2*N+1=5
A Zookeeper ensemble contains 5 servers. What is the maximum number of servers that can go missing and the ensemble still run?:: majority consists of 3 zk nodes for 5 nodes zk cluster, so 2 can fail
A Zookeeper configuration has tickTime of 2000, initLimit of 20 and syncLimit of 5. What's the timeout value for followers to connect to Zookeeper?:: tick time is 2000 ms, and initLimit is the config taken into account when establishing a connection to Zookeeper, so the answer is 2000 * 20 = 40000 ms = 40s
What is the recommended number of nodes in a ZooKeeper ensemble?:: 5