Giter Club home page Giter Club logo

zookeeper's Introduction

Zookeeper Ensemble on OpenShift using StatefulSet

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.

Taken from the Apache Zookeeper Project Page. This project contains an OpenShift ready deployment of Zookeeper.

Getting Started

Instantiating the Zookeeper Ensemble.

oc new-project zookeeper
oc create -f openshift/deployment.yaml

Clients are able to use Zookeeper through the zookeeper-client service. Test your ensemble with the following commands.

oc rsh zookeeper-0 zkCli.sh create /foo 42
oc rsh zookeeper-2 zkCli.sh get /foo

Considerations

Static Ensemble

The deployed ensemble consists out of three Zookeeper instances, which is statically defined. Using this deployment you are able to specify a different number of instances, but a redeployment is required. A dynamic ensemble scaling isn't supported as it is an alpha feature and Zookeeper doesn't recommend dynamic ensemble changes for production.

Data and Data Log directory

This deployment uses two PVCs for the data and data log directory, which will most likely be on the same storage device. Zookeeper recommends putting these directories on different storage devices for best performance. If you are running a read / write intensive Zookeeper workload execute load tests before using this deployment.

Monitoring

Monitoring data can be obtained by sending mntr as the content of a TCP connection to the Zookeeper instance. THe data returned is Prometheus compatible. You can use echo "mntr" | nc zookper-1.zookeeper 2181 to obtain the data.

zk_version	3.4.11-37e277162d567b55a07d1755f0b31c32e93c01a0, built on 11/01/2017 18:06 GMT
zk_avg_latency	0
zk_max_latency	0
zk_min_latency	0
zk_packets_received	31
zk_packets_sent	30
zk_num_alive_connections	1
zk_outstanding_requests	0
zk_server_state	follower
zk_znode_count	8
zk_watch_count	0
zk_ephemerals_count	0
zk_approximate_data_size	338
zk_open_file_descriptor_count	29
zk_max_file_descriptor_count	1048576

zookeeper's People

Contributors

dennisstritzke avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.