To run a DistributedLog ensemble, you'll need a set of Zookeeper nodes. There is no constraints on the number of Zookeeper nodes you need. One node is enough to run your cluster, but for reliability purpose, you should run at least 3 nodes.
DistributedLog leverages zookeepr multi operations for metadata updates. So the minimum version of zookeeper is 3.4.*. We recommend to run stable zookeeper version 3.4.8.
Run ZooKeeper from distributedlog source
Since zookeeper is one of the dependency of distributedlog-proxy-server. You could simply run zookeeper servers using same set of scripts provided in distributedlog-proxy-server. In the following sections, we will describe how to run zookeeper using the scripts provided in distributedlog-proxy-server.
First of all, build DistributedLog:
The configuration file zookeeper.conf.template under distributedlog-proxy-server/conf is a template of production configuration to run a zookeeper node. Most of the configuration settings are good for production usage. You might need to configure following settings according to your environment and hardware platform.
You need to configure the zookeeper servers form this ensemble as below:
Please check zookeeper website for more configurations.
You need to configure following settings according to the disk layout of your hardware. It is recommended to put dataLogDir under a separated disk from others for performance.
# the directory where the snapshot is stored. dataDir=/tmp/data/zookeeper # where txlog are written dataLogDir=/tmp/data/zookeeper/txlog
As zookeeper is shipped as part of distributedlog-proxy-server, you could use the dlog-daemon.sh script to start zookeeper as daemon thread.
Start the zookeeper:
Stop the zookeeper:
Please check zookeeper website for more details.