# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true
tickTime
心跳间隔,默认2000毫秒。
ZooKeeperK集群中Leader和Follower之间的心跳间隔,来维护节点存活状态。
initLimit
初始化限制 默认为10。
ZooKeeper集群中的Follower服务器与Leader服务器之间初始连接时能容忍的最多心跳数(tickTime的数量)。
syncLimit
同步限制,默认为5。
ZooKeeper集群中Leader和Follower之间的请求和答应最多能容忍的心跳数。
dataDir
用来存放myid信息跟一些版本,日志,跟服务器唯一的ID信息等。
推荐 /var/zookeeper
clientPort
ZooKeeper对外提供的服务端口号,默认是2181端口。
maxClientCnxns
当前ZooKeeper服务允许最大的客户端链接数。