编程知识 cdmana.com

Zookeeper浅谈

{"type":"doc","content":[{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"一、ZooKeeper是什么?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ZooKeeper 是一个开源的分布式服务框架Hadoop的一个子项目,Zookeeper 实现诸如数据发布\/订阅、统一命名服务、分布式协调\/通知、配置管理、分布式锁和分布式队列等功能,通俗的讲zookeeper是一个支持增删查改的类似文件系统特点的数据库,按照规则去给节点分配任务。zookeeper底层实现了存储文件和通知回调功能它的数据结构类似于一个标准的文件系统,相比较文件系统zk的每个节点都可以存储数据,但是大小限制为1M。"},{"type":"text","marks":[{"type":"strong"}],"text":"通常我们在使用dubbo的时候会建议使用zookeeper作为注册中心,也可以用redis,eureka作为注册中心,当然我只用过zookeeper,dubbo相当于搭载一个服务框架,zookeeper则是服务注册的中心。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/8a\/fb\/8a384147ed1dcyya6b38598eca0dbffb.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":true,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"zk的数据结构"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/d2\/f8\/d2780370c6db4e47b1f07b95bf7a9bf8.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":true,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"zk服务的配置文件"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://www.infoq.cn/article/HKAjAfdsJs6kLFl0udPt?utm_source=rss&utm_medium=article

Scroll to Top