#
Zookeeper configuration parameters
This tutorial explains to you the Zookeeper main configuration parameters.
#
Where are located Zookeeper configuration parameters ?
Zookeeper configuration parameters are located in $ZOOKEEPER_HOME/config/zookeeper.properties
Info
In my examples, ZOOKEEPER_HOME=/kafka/kafka_2.13-2.8.0
#
Zookeeper configuration parameters
On my examples I created so far I used for Zookeeper server the following parameters:
dataDir
- the directory where the Zookeeper data is stored.clientPort
- the port at which the clients will connectmaxClientCnxns
- Limits the number of concurrent connections (at the socket level) that a single client, identified by IP address, may make to a single member of the ZooKeeper cluster. This is used to prevent certain classes of DoS attacks. Setting this to 0 or omitting it entirely removes the limit on concurrent connections.admin.enableServer
- Set to "false" to disable the AdminServer.admin.serverPort
- The port the embedded Jetty server listens on. Defaults to 8080.tickTime
- milleseconds every tick hasinitLimit
- Number of ticks (the time) the ZooKeeper servers in quorum have to connect to a leadersyncLimit
- limits how far out of date a server can be from a leaderDeclare Zookeeper servers
server.1=zookeeper1:2888:3888 server.2=zookeeper2:2888:3888 server.3=zookeeper3:2888:3888
Info
1, 2, 3 are the IDs of each Zookeeper server.
4lw.commands.whitelist
- allows to use the Four Letter Words commands.
#
Other Zookeeper configuration parameters
dataLogDir
- directs the machine to write the transaction log to the dataLogDir rather than the dataDir. This allows a dedicated log device to be used, and helps avoid competition between logging and snaphots.globalOutstandingLimit
- prevents ZooKeeper from running out of memory due to queued requests, ZooKeeper will throttle clients so that there is no more than globalOutstandingLimit outstanding requests in the system. The default limit is 1,000.leaderServes
(in clusters) - For higher update throughput at the slight expense of read throughput, the leader can be configured to not accept clients and focus on coordination. The default to this option is yes, which means that a leader will accept client connections.