What is the correct format for a ZooKeeper ensemble member's server configuration line?

Study for the CCDAK Apache Kafka Test. Use flashcards and multiple choice questions with hints and explanations for each question. Prepare thoroughly for your exam!

Multiple Choice

What is the correct format for a ZooKeeper ensemble member's server configuration line?

Explanation:
In a ZooKeeper ensemble, each server is defined with an ID and two ports after the hostname in the server line. The first port is used for regular inter-server communication within the cluster (the port used for leader-to-followers communication during normal operation), and the second port is used for the leader election process when electing a new leader. Therefore, the correct format places the leader communication port first, followed by the election port: server.<myid>=<hostname>:<leaderport>:<electionport>. This line must also correspond to the ID stored in the myid file on that server, and both ports should be reachable by other ensemble members. The client-facing port (usually 2181) is separate and not part of this server line.

In a ZooKeeper ensemble, each server is defined with an ID and two ports after the hostname in the server line. The first port is used for regular inter-server communication within the cluster (the port used for leader-to-followers communication during normal operation), and the second port is used for the leader election process when electing a new leader. Therefore, the correct format places the leader communication port first, followed by the election port: server.=::.

This line must also correspond to the ID stored in the myid file on that server, and both ports should be reachable by other ensemble members. The client-facing port (usually 2181) is separate and not part of this server line.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy