下载APP
登录
关闭
讲堂
算法训练营
Python 进阶训练营
企业服务
极客商城
客户端下载
兑换中心
渠道合作
推荐作者
当前播放: 07 | ZooKeeper架构解析
00:00 / 00:00
标清
  • 标清
1.0x
  • 2.0x
  • 1.5x
  • 1.25x
  • 1.0x
  • 0.5x
网页全屏
全屏
00:00
付费课程,可试看

ZooKeeper实战与源码剖析

共47讲 · 约450分钟
2938
免费
01 | 课程介绍
免费
02 | 内容综述
免费
03 | 什么是ZooKeeper?
免费
04 | ZooKeeper提供什么服务?
免费
05 | 开始使用ZooKeeper
06 | 使用ZooKeeper实现Master...
07 | ZooKeeper架构解析
08 | ZooKeeper API简介
09 | ZooKeeper API:Watch示...
10 | 使用ZooKeeper实现分布式...
11 | 使用ZooKeeper实现分布式...
12 | 使用ZooKeeper实现选举
13 | 使用Apache Curator简化Z...
14 | 如何安装配置一个ZooKeepe...
15 | 如何进行ZooKeeper的监控...
16 | 通过ZooKeeper Observer...
17 | 通过动态配置实现不中断服...
18 | ZooKeeper节点是如何存储...
19 | 使用ZooKeeper实现服务发...
20 | 使用ZooKeeper实现服务发...
21 | 使用ZooKeeper实现服务...
22 | Kafka是如何使用ZooKeeper...
23 | 什么是Paxos协议?
24 | 对比Chubby和ZooKeeper
25 | Raft协议解析
26 | 什么是etcd?
27 | etcd API: KV部分
28 | etcd API:Watch和Lease...
29 | 使用etcd实现分布式队列
30 | 使用etcd实现分布式锁
31 | 如何搭建一个etcd生产环境...
32 | 存储数据结构之B+tree
33 | 存储数据结构之LSM
34 | 本地存储技术总结
35 | ZooKeeper本地存储源码解...
36 | 网络编程基础
37 | 事件驱动的网络编程
38 | Java的事件驱动网络编程
39 | ZooKeeper的客户端网络通...
40 | ZooKeeper的服务器网络通...
41 | ZooKeeper的Request Proc...
42 | Standalone的ZooKeeper是...
43 | Quorum模式下ZooKeeper节...
44 | ZooKeeper的Leader Elect...
45 | ZooKeeper的Zab协议
46 | 客户端和服务器端交互:Wa...
47 | 结束语

精选留言(4)

  • 2019-09-19
    每个znode的配置文件下 都有3个server的配置 这些server如何理解 是主机吗 znode和主机是1:N的关系吗

    作者回复: 不是的。这3个配置是集群中所有的节点(一个机器上装一个ZooKeeper节点)。例如下面的配置表示集群中的3个节点配置:

    server.1=ali-1:2222:2223
    server.2=ali-2:2222:2223
    server.3=ali-3:2222:2223

    myid文件保存节点的id。例如,如果myid的内容为2,就代表这个机器上的节点是server.2=ali-2:2222:2223。

    2
  • ClientA:
     08:49:13,323 [myid:127.0.0.1:2182] - INFO [main-SendThread(127.0.0.1:2182):Cli] - Session establishment complete on server localhost/127.0.0.1:2182, sessionid = 0x30000timeout = 30000
    Client B:
     09:23:29,494 [myid:127.0.0.1:2183] - INFO [main-SendThread(127.0.0.1:2183):ClientCnxn$SendThread@1394] - Session establishment complete on server localhost/127.0.0.1:2183, sessionid = 0x300001aeecf0000, negotiated timeout = 30000

    每次客户端连接的都不一样,这个是随机的吗?不是都主动连接到leader?

    展开

    作者回复: 是的。假设connectString中有三个节点的访问信息。每次客户端建立连接都是随机选取一个节点。这样可以起到负责均衡的作用。

  • 老师,ZK只有一个node时是standalone,集群是quorum模式,是这样子吗?

    作者回复: 是的。

  • 2019-08-22
    myid 文件需要放在每个节点的dataDir目录下

    作者回复: 是的