zookeper common configuration in detail

In a time unit #ZK. All times are ZK to this time unit basis, multiplied by an integer configured. For example, the minimum time-out session is 2 * tickTime

tickTime=2000

#Follower during startup, will synchronize all the latest data from the Leader, then we can determine the initial state of the external services. Leader allows F to complete this work within initLimit time. Under normal circumstances, we do not care too much about setting this parameter. If the amount of data that is really a great cluster of ZK, F at boot time, time synchronization data from the Leader will be a corresponding longer, so in this case, it is necessary to turn up the appropriate parameters

initLimit = 10

# During operation, Leader responsible for communication with the ZK all the machines in the cluster, for example, through a number of heartbeat mechanism to detect the survival of the state of the machine. If L sent heartbeat packet after syncLimit, we have not received a response from F, where F is already then that this is not a line. Note: Do not take this parameter is set too high, otherwise it may mask some problems

syncLimit=5

Catalog # snapshot of a snapshot file storage. By default, the transaction log will be stored here. Also the configuration parameters dataLogDir, the transaction log write performance directly affects the performance zk

dataDir=/app/zk-data

# Transaction log output directory. Try to configure a separate disk or mount point to the output from the transaction log, which will greatly enhance the performance of ZK.

dataLogDir=/app/zk-logs

Port # client server connection, that foreign service port, default 2181

clientPort = 2181

Limit the number of connections between the individual client and # single server, the ip level, the default is 60. If set to 0, it indicates without any restrictions. Please note that this limitation of the scope of use, just limit the number of connections between a single client and a single machine ZK server, not for the specified client IP, nor to limit the number of connections ZK cluster, nor is it a single for all ZK connection limit client

maxClientCnxns=60

#server list

server.1=xx.xxx.xxx.xx:2888:3888
server.2=xx.xxx.xxx.xx:2888:3888
server.3=xx.xxx.xxx.xx:2888:3888

Guess you like

Origin www.cnblogs.com/wenjint-one/p/11326284.html