ZooKeeper is a service for configuration information, providing distributed synchronisation.
50K+
Tags:
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
Learn more about ZooKeeper on the ZooKeeper Wiki.
Run as a single node as simple as :
docker run znly/zookeeper
Let's run a cluster :
Create a network:
docker network create zoo
Run a 3 nodes cluster :
docker run -d \
--net=zoo \
--name=zookeeper1 \
-e "ZOO_ID=1" \
-e="ZOO_SERVERS=zookeeper1,zookeeper2,zookeeper3" \
znly/zookeeper
docker run -d \
--net=zoo \
--name=zookeeper2 \
-e "ZOO_ID=2" \
-e="ZOO_SERVERS=zookeeper1,zookeeper2,zookeeper3" \
znly/zookeeper
docker run -d \
--net=zoo \
--name=zookeeper3 \
-e "ZOO_ID=3" \
-e="ZOO_SERVERS=zookeeper1,zookeeper2,zookeeper3" \
znly/zookeeper
Zookeeper is relying heavily on 3 options :
Clone the source:
git clone [email protected]:znly/docker-zookeeper.git
And run docker-compose (v2 file):
docker-compose up
Available environment options:
JVM_HEAP_MEMORY "1g"ZOOKEEPER_VERSION 3.4.8ZOO_SERVERS "zookeeper1"ZOO_ID "1"ZOO_DATA_DIR "/data/zookeeper"Content type
Image
Digest
Size
63.8 MB
Last updated
about 10 years ago
docker pull znly/zookeeper