Add some Zookeeper configuration tweaks

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:26 -04:00
parent 13556918d7
commit 524f857f56
1 changed files with 18 additions and 8 deletions

View File

@ -1,19 +1,29 @@
# PVC Zookeeper configuration # PVC Zookeeper configuration
# {{ ansible_managed }} # {{ ansible_managed }}
tickTime=1000 # Put all data in /var/lib/zookeeper
initLimit=10
syncLimit=5
dataDir=/var/lib/zookeeper dataDir=/var/lib/zookeeper
# Set our tick time to 1 second
tickTime=1000
# Initialization can take up to 30 ticks
initLimit=30
# Syncing can take up to 15 ticks
syncLimit=15
# Lower snapshot count from 100k to 10k
snapCount=10000
# Halve the snapshot size to 2GB
snapSizeLimitInKb=2097152
# Configure a max of 200 client connections
maxClientCnxns=200
# Auto purge: keep 3 snapshots and evaluate every 4 hours
autopurge.snapRetainCount=3
autopurge.purgeInterval=4
autopurge.purgeInterval=72 # Listen on port 2181 on the cluster IP
clientPort=2181 clientPort=2181
clientPortAddress={% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.cluster_ip }}{% endfor %} clientPortAddress={% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.cluster_ip }}{% endfor %}
# Increase client connections to 200 to prevent connection overloads # Node list - all coordinators
maxClientCnxns=200
{% for node in pvc_nodes if node.is_coordinator %} {% for node in pvc_nodes if node.is_coordinator %}
server.{{ node.node_id }}={{ node.cluster_ip }}:2888:3888 server.{{ node.node_id }}={{ node.cluster_ip }}:2888:3888
{% endfor %} {% endfor %}