23

this is really dumb but what does zookeeper do that raft doesn't - not talking about zab but zookeeper itself.

I get raft does leader election etc. w servers but what's the point of zookeeper? is there an analogy anyone has

Lauren Leder
  • 276
  • 1
  • 3
  • 15

3 Answers3

33

Raft is a consensus algorithm/protocol, Apache Zookeeper is a product, a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

Zookeeper uses Zab as the broadcast protocol to propagate state updates between nodes in the ensemble.

So, if that makes sense, you should compare Raft against Zab or Apache Zookeeper against some other similar system like etcd.

Trying
  • 14,004
  • 9
  • 70
  • 110
Luciano Afranllie
  • 4,053
  • 25
  • 23
  • Do you think that Apache Zookeeper can be used for executing the consensus as an external system as it is explained in the following question? https://stackoverflow.com/q/70088996/5029509 – Questioner Nov 30 '21 at 15:21
4

Raft is a consensus algorithm, Zookeeper is a Key Value Store driven by the atomic broadcast protocol ZAB. So Zookeeper enables you to asynchronously create ZNODEs like /a, /a/b, without having to block-wait operations to complete. This style is refered to as pipelining, and is enabled by the fact ZAB provides async linearizability guarantee.

andoryu-
  • 116
  • 4
0

Found a very good URL explaining RAFT [link].

And about Zookeeper, it is mainly used to store configurations which are commonly used by various application.

Benefit of using it, consider a project which is distributed in nature and it uses various common configurations. So to maintain consistency between these distributed systems, you store these configurations in central zookeeper, and all application get these configurations through zookeeper.

abhilash_goyal
  • 711
  • 1
  • 10
  • 31
  • 1
    Another good site explaining raft, if you're more of a visual person: http://thesecretlivesofdata.com/ – John Oct 06 '19 at 18:53
  • @abhilash_goyal , Do you think that Apache Zookeeper can be used for executing the consensus as an external system as it is explained in the following question? https://stackoverflow.com/q/70088996/5029509 – Questioner Nov 30 '21 at 15:22