ZooKeeper is a distributed key value store. It can be used as the basis to implement service discovery (similar to etcd). https://stackoverflow.com/a/48652680

如果ZooKeeper和Redis都是分布式KVstore, 他们有什么区别?

https://softwareengineering.stackexchange.com/questions/83170/redis-vs-zookeeper

Redis的机器挂了的话, 数据就没了. 好处是快.

ZooKeeper的一个机器挂了, 他能自己回复, 确保数据不丢失. 但是慢多了.

所以, 如果你想存储一些你不担心新丢失的数据, 只是为了提高读取速度, 用Redis.

如果你想存储一些长期的数据, 比如配置文件, 就用ZooKeeper

TODO

https://www.tutorialspoint.com/zookeeper/zookeeper_overview.htm

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them, which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

ZooKeeper 是一个开源的分布式协调服务,由 Apache 软件基金会开发和维护。它旨在帮助分布式系统管理和协调各种任务,如配置管理、命名服务、分布式锁、领导者选举等。ZooKeeper 提供了一个高度可靠且高性能的环境,使得分布式应用程序可以在复杂的集群环境中协调运作。

以下是 ZooKeeper 的一些关键特点和用途:

  1. 分布式协调: ZooKeeper 提供了共享的层次结构数据存储,允许分布式系统中的各个节点协同工作,共享配置信息、元数据等。