Zookeeper Overview & Architecture & properties

table of Contents

1 Overview

2. Architecture

3. Characteristics


Outline

ZK as a framework for a distributed coordination services. Mainly to solve the consistency problem of distributed cluster applications, such as how to avoid multi-user simultaneous data write operation resulting in dirty dirty read. Essentially a small distributed file storage system (The official suggested here are small files should not exceed 1MB each). Manner similar tree-based file system data storage, and it can be effectively managed node. Maintain, and monitor the status of your stored data to achieve the cluster-based data management.

Architecture

Here Insert Picture Description

Leader assure an orderly transaction processing, it is necessary to forward a unified operation for the cluster of everything to the Leader to perform.

Follower handle unsolicited sexual things, if you encounter things that request is forwarded to the Leader, Follower while participating in Leader elections. In addition, for the visit than the larger cluster ZK, an increase Observer role.

Interpretation Leader election mechanism: https://blog.csdn.net/aubekpan/article/details/87254980

Observer: ZK observation state changes on the cluster data and the synchronization state, if the non-transactional requests can be processed separately. And does not participate in the vote only non-transactional service, typically used in a cluster without affecting the transaction processing capabilities, enhance non-transaction processing capabilities of the cluster, never increase concurrent read requests.

characteristic

1, global data consistency: Each server retain an identical copy of the data, regardless of the client's data show even where Taiwan is consistent.

2, reliability: if one of the servers message is accepted, then all servers will be accepted.

3, the order of: the sub-global order and two kinds of partial order, if the global order is a case where the node A issues the message before the message B, the message A on all nodes before release message B. Partial order means that if a message B has issued the same client after the message A, A ahead of B is bound.

4, data updating atomic: either a successful data update (node ​​successfully more than half), or fails, the absence of intermediate state.

5, real-time: ZK ensure that clients will receive server updates information in a range of time intervals, or server failure.

Guess you like

Origin blog.csdn.net/aubekpan/article/details/90904307