What is the difference between zookeeper and raft?
Asked Answered
R

4

25

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

Rutilant answered 11/12, 2017 at 19:56 Comment(0)
S
35

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.

Sclerite answered 11/12, 2017 at 21:36 Comment(1)
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://mcmap.net/q/87375/-performing-consensus-of-a-p2p-network-outside-the-system-in-another-system-which-runs-the-consensus-by-real-machines-and-returns-the-results/5029509Fermentation
K
5

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.

Kwangtung answered 28/10, 2019 at 12:47 Comment(0)
F
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.

Faunus answered 12/12, 2017 at 7:45 Comment(2)
Another good site explaining raft, if you're more of a visual person: thesecretlivesofdata.comGone
@Faunus , 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://mcmap.net/q/87375/-performing-consensus-of-a-p2p-network-outside-the-system-in-another-system-which-runs-the-consensus-by-real-machines-and-returns-the-results/5029509Fermentation
D
0

Basically we are comparing RAFT protocol/algorithm to Paxos protocol/algorithm. Basically Paxos is a single decree consensus protocol while RAFT is a replicated state machine. In Raft voting is taken on moving the replicated state machine from state A to state B if accepted the entire cluster will be at state B, otherwise the entire cluster would be at state A. On the hand in Paxos it's about winning a single decree not the entire state.

RAFT is a much cleaner protocol, easier to understand, easier to implement correctly. Paxos it's more complex to implement correctly because if a decree is win it does not mean I can pin point the winning state.

Dayflower answered 2/6, 2024 at 12:38 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.