Announcing: The Pulsar PMC Published The 2020 Apache Pulsar User Survey Report!

Get started
Install and upgrade
Pulsar core
Tiered storage
Pulsar Functions
Control center
Manage and monitor
Release notes

Configure Zookeeper

ZooKeeper is used by Pulsar and BookKeeper in StreamNative Platform and it handles a broad range of essential configuration-related and coordination-related tasks for Pulsar.

After installing StreamNative Platform, if you want to change the configuration, edit the ${PLATFORM_HOME}/etc/pulsar/zookeeper.conf file.

ZooKeeper configurations are listed as below:

Name Description Default
tickTime The tick is the basic unit of time in ZooKeeper, measured in milliseconds and used to regulate things like heartbeats and timeouts. tickTime is the length of a single tick. 2000
initLimit The maximum time, in ticks, that the leader ZooKeeper server allows follower ZooKeeper servers to successfully connect and sync. The tick time is set in milliseconds using the tickTime parameter. 10
syncLimit The maximum time, in ticks, that a follower ZooKeeper server is allowed to sync with other ZooKeeper servers. The tick time is set in milliseconds using the tickTime parameter. 5
dataDir The location where ZooKeeper will store in-memory database snapshots as well as the transaction log of updates to the database. data/zookeeper
clientPort The port on which the ZooKeeper server will listen for connections. 2181
autopurge.snapRetainCount In ZooKeeper, auto purge determines how many recent snapshots of the database stored in dataDir to retain within the time interval specified by autopurge.purgeInterval (while deleting the rest). 3
autopurge.purgeInterval The time interval, in hours, by which the ZooKeeper database purge task is triggered. Setting to a non-zero number will enable auto purge; setting to 0 will disable. Read this guide before enabling auto purge. 1
maxClientCnxns The maximum number of client connections. Increase this if you need to handle more ZooKeeper clients. 60

In addition to the parameters in the table above, configuring ZooKeeper for Pulsar involves adding a server.N line to the ${PLATFORM_HOME}/etc/pulsar/zookeeper.conf file for each node in the ZooKeeper cluster, where N is the number of the ZooKeeper node. Here's an example for a three-node ZooKeeper cluster:

For more information about ZooKeeper configuration, see ZooKeeper administrator's guide.