Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add parameters for zookeeper #1149

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions addons/zookeeper/config/zookeeper-config-constraint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@
"clientPort": int & >=1 & <=65535 | *2181

// 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 ensemble. This is used to prevent certain classes of DoS attacks, including file descriptor exhaustion. The default is 60. Setting this to 0 entirely removes the limit on concurrent connections.
"maxClientCnxns"?: int
"maxClientCnxns"?: int & >=0 & <=2000 | *60

// New in 3.3.0: the maximum session timeout in milliseconds that the server will allow the client to negotiate.
"maxSessionTimeout"?: int
"maxSessionTimeout"?: int & >=1 & <=600000 | *20

// New in 3.4.0: When enabled, ZooKeeper auto purge feature retains the autopurge.snapRetainCount most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively and deletes the rest. Defaults to 3. Minimum value is 3.
"autopurge.snapRetainCount"?: int

// New in 3.4.0: The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging. Defaults to 0.
"autopurge.purgeInterval"?: int
// The minimum session timeout in milliseconds that the server will allow the client to negotiate.
// Default is 2 times the tickTime. Maximum should be 20 times the tickTime.
"minSessionTimeout": int & >=1 & <=600000 | *2
kubeJocker marked this conversation as resolved.
Show resolved Hide resolved

// the location where ZooKeeper will store the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database.Be careful where you put the transaction log. A dedicated transaction log device is key to consistent good performance. Putting the log on a busy device will adversely effect performance.
"dataDir": string | *"/zookeeper/data"
Expand All @@ -54,4 +52,20 @@

// A list of comma separated Four Letter Words commands that user wants to use
"4lw.commands.whitelist": string | *"srvr, mntr, ruok, conf"

// The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging. Defaults to 0.
"autopurge.purgeInterval": int & >=0 | *0

// The number of requests that can be queued by ZooKeeper.
// Default is 1000. Increase this if dealing with large bursts of requests.
"globalOutstandingLimit": int & >=1 & <=20000 | *1000
kubeJocker marked this conversation as resolved.
Show resolved Hide resolved

// The time in milliseconds that ZooKeeper waits before starting shutdown when a shutdown is requested.
// Default is 5000ms (5 seconds). This allows pending requests to complete.
"preAllocSize": int & >=1 & <=100000 | *65536

// The number of snapshots to retain in dataDir.
// Default is 3. Minimum value is 3 for recovery purposes.
"autopurge.snapRetainCount": int & >=3 & <=30 | *3

}
8 changes: 6 additions & 2 deletions addons/zookeeper/config/zookeeper-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
maxClientCnxns=500
# the maximum session timeout that the server allow the client to negotiate
maxSessionTimeout=20
# the minimum session timeout that the server allow the client to negotiate
minSessionTimeout=2
#
# 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
autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
autopurge.purgeInterval=0

## Metrics Providers
#
Expand Down
Loading