Zookeeper Getting Started learning

Source: Internet
Author: User

1. Basic Concepts

Zookeeper is a distributed, open source distributed application Coordination Service that is an open source implementation of Google's chubby and an important component of Hadoop and HBase. It is a software that provides consistent services for distributed applications, including configuration maintenance, domain name services, distributed synchronization, group services, and so on.

Zookeeper is a high-performance, highly available distributed coordination framework that employs a custom ZAB(Zookeeper Atomic Broadcast) transactional consistency protocol to ensure transactional consistency in high-concurrency distributed system environments. ZK uses a similar Linux operating system file directory structure management node, node data resident memory, to avoid disk I/O impact performance, and provide users with transparent persistence function to ensure data security. ZK is suitable for small data, high performance, high concurrency scenarios.

2. The services provided by ZK

(1) Naming services

The service provider creates a temporary node on ZK, and the node is globally unique. The service consumer can invoke the services provided by the service provider by reading the temporary node nodes on the ZK to obtain the information provided by the service provider. Example: Ali's Dubbo is the use of ZK as a registration center.

(2) Publish subscription service

The Publish subscription model, which is the configuration center, can publish application configurable items to ZK for subscribers to dynamically acquire the configuration, use the same set of configurations for the same cluster, implement the centralized and dynamic management of the configuration, avoid restarting the application service after the configuration is modified.

(3) Load Balancing

In a distributed system, services are provided by multiple servers in a cluster. To make each server more load-balanced, you need a framework for requesting distribution based on service load. And ZK is like this, can be dynamic registration and discovery Services, is the service more transparent.

(4) Distribution coordination/notification

(5) Distributed lock

ZK has strong transactional consistency

Lock service is divided into exclusive and sequential locks
Exclusive Lock: Multiple servers create a node on ZK at the same time, and the successful creator acquires the lock successfully.

(6) Distributed Queue Service

Distributed queues are divided into two types:
FIFO, in accordance with the principle of the use of distributed sequential locks.
Control the number of queue elements, waiting for the number of members in the queue to reach the specified value before you can begin the next processing operation.

Content from: http://newliferen.github.io/2015/07/24/ZooKeeper%E5%85%A5%E9%97%A8/

Zookeeper Getting Started learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.