ZooKeeper配置

配置 意义 -
clientPort
secureClientPort
dataDir 存放内存中整个数据的快照的文件,如果没有另外指定,也是存放tansaction log的地方 存放事务日志的的设备最好是一块专门的硬盘,否则影响IO性能
tickTime zk中的最小计时度量,毫秒为单位。心跳,超时等都是基于此计算
配置 意义
dataLogDir 单独指定tansaction log放置的位置。此项配置优先于dataDir。
单独挂一个硬盘设备给zk存储事务日志,可以极高的提升zk的写效率
Having a dedicated log device has a large impact on throughput and stable latencies. It is highly recommended to dedicate a log device and set dataLogDir to point to a directory on that device, and then make sure to point dataDir to a directory not residing on that device.
globalOutstandingLimit 客户端发给server的request可以快于server的处理速度。
server用队列缓存起来,默认队列大小1000.
preAllocSize 事务日志是预先分配好大小的,默认64M
snapCount zookeeper通过transaction log和snapshots记录事务。
在快照发生前,事务日志可以记录的transaction的梳理由snapCount决定。
为了防止集群在同一时间一起执行快照,快照的随机发生于运行时的此范围:[snapCount/2+1, snapCount]。默认为100,000
maxClientCnxns 限制单一客户端(ip识别)对集群中的某一台机器的connections数量。用于避免DoS攻击。设置为0不做限制
clientPortAddress
minSessionTimeout server端允许客户端设置的最小超时间隔,默认是TickTime的2倍
maxSessionTimeout 默认20倍
fsync.warningthresholdms 当事务日志fsync超过此时间时,在日志中告警。默认1000ms
autopurge.snapRetainCount
autopurge.purgeInterval
syncEnabled oberserver默认也会写snapshot和transaction log

你可能感兴趣的:(ZooKeeper配置)