• 什么是Zookeeper


    官方文档

    ZooKeeper: A Distributed Coordination Service for Distributed Applications

    ZooKeeper:一个开源的分布式的,为分布式应用提供协调服务的应用

    ZooKeeper is a distributed, open-source coordination service for distributed applications. It exposes a simple set of primitives that distributed applications can build upon to implement higher level services for synchronization同步, configuration配置 maintenance维护, and groups分组 and naming命名. It is designed to be easy to program to, and uses a data model styled after the familiar directory tree structure of file systems. It runs in Java and has bindings for both Java and C.

    Design Goals

    设计目标

    ZooKeeper is simple.简单 ZooKeeper allows distributed processes to coordinate整合 with each other through a shared hierarchal分级的 namespace which is organized similarly to a standard file system. The name space consists构成 of data registers寄存器 - called znodes, in ZooKeeper parlance - and these are similar to files and directories. Unlike a typical file system, which is designed for storage, ZooKeeper data is kept in-memory, which means ZooKeeper can acheive high throughput and low latency numbers.

    ZooKeeper is replicated.可重复 Like the distributed processes it coordinates, ZooKeeper itself is intended to be replicated over a sets of hosts called an ensemble.

    The servers that make up the ZooKeeper service must all know about each other. They maintain an in-memory image of state, along with a transaction logs and snapshots in a persistent store. As long as a majority of the servers are available, the ZooKeeper service will be available.

    Clients connect to a single ZooKeeper server. The client maintains a TCP connection through which it sends requests, gets responses, gets watch events, and sends heart beats. If the TCP connection to the server breaks, the client will connect to a different server.

    ZooKeeper is ordered.有序的 ZooKeeper stamps each update with a number that reflects the order of all ZooKeeper transactions. Subsequent operations can use the order to implement higher-level abstractions, such as synchronization primitives.

    ZooKeeper is fast.快速It is especially fast in "read-dominant" workloads. ZooKeeper applications run on thousands of machines, and it performs best where reads are more common than writes, at ratios of around 10:1.

    Data model and the hierarchical namespace

    数据结构和分等级的命名空间

    The name space provided by ZooKeeper is much like that of a standard file system. A name is a sequence of path elements separated by a slash (/). Every node in ZooKeeper's name space is identified by a path.

    Zookeper的应用场景

    终于可以说人话了,好轻松!!
    Zookeeper从设计模式角度来看,是一个基于观察者模式设计的分布式服务管理框架,它负责存储和管理大家都关心的数据,然后接收观察者的注册,一旦这些数据发生变化,Zookeeper就负责通知已经注册的那些观察者做出相应的反应。从而实现类似Master/Slave管理模式

    应用场景(第一句话中就提到了)

    *统一命名空间
    *配置管理
    *集群管理
    *共享锁(Locks)/同步锁

  • 相关阅读:
    激战运钞车高清在线观看
    AutoLISPDCL各种控件
    你懂的
    AutoLISP简单DCL对话框
    我奋斗了18年不是为了和你一起喝咖啡
    AutoLISP选择集操作
    我奋斗了18年才和你坐在一起喝咖啡
    AutoLISP取得多段线顶点坐标
    AutoLISP确定图纸幅面DCL对话框设计
    AutoLISP对话框DCL控件属性
  • 原文地址:https://www.cnblogs.com/cenzhongman/p/7141722.html
Copyright © 2020-2023  润新知