Live data from Hacker News

Raft: Understandable Distributed Consensus (2014)

thesecretlivesofdata.com

41–50 of 91 posts

Re: Raft: Understandable Distributed Consensus (2014)

#41

I am in the minority who thinks Raft is overrated. I tried teaching Raft one year instead of Paxos but ended up switching back. While it was much easier to understand how to implement Raft, I think my students gained deeper insight when focusing on single-decision Paxos. There is a lightbulb moment when they first understand that consensus is a property of the system that happens first (and they can point at the mome…

Agree, Raft is less modular and therefore harder to understand than MultiPaxos:

https://maheshba.bitbucket.io/blog/2021/12/14/Modularity.htm...

Re: Raft: Understandable Distributed Consensus (2014)

#42
post #36

I've run a reading group for distributed systems for the last 2 years now and I do think that Raft is a better introduction to Consensus than any Paxos paper I have seen (I mean the Paxos Made Simple paper literally has bugs in it). But when I learned consensus in school, we used Paxos and Multi-Paxos and I do believe that there was a lot to be gained by learning both approaches. Heidi Howard has several amazing pape…

There are several Multi-Paxos papers (some of them dating before Raft) that are intended as guidance for implementers:

https://paper-notes.zhjwpku.com/assets/pdfs/paxos_for_system...

https://www.cs.cornell.edu/home/rvr/Paxos/paxos.pdf

https://www.scs.stanford.edu/~dm/home/papers/paxos.pdf

Re: Raft: Understandable Distributed Consensus (2014)

#44

I am in the minority who thinks Raft is overrated. I tried teaching Raft one year instead of Paxos but ended up switching back. While it was much easier to understand how to implement Raft, I think my students gained deeper insight when focusing on single-decision Paxos. There is a lightbulb moment when they first understand that consensus is a property of the system that happens first (and they can point at the mome…

I've read both the Paxos and Raft papers a few times, and hacked on some implementations, but never quite got one over the line to working... Raft strikes me as a particular set of decisions made within a Paxos framework, such as having 1 entity for Proposers, Acceptor and Followers. It's frustrating that there isn't a clearly written defacto paper on Paxos - the story style confused the monkeys out of me.

> but never quite got one over the line to working...

I've never implemented something like this. But my first thought is "how do you implement the testing system?"

I feel like once you had a robust testing system that can verify things work correctly in all the different network partition and other scenarios, and allowing rapid iteration of setting up those scenarios, the implementation would be comparatively easy.

Re: Raft: Understandable Distributed Consensus (2014)

#45
post #4

While understandable, implementing it is however far from easy.

How do you write a testing framework/system for evaluating distributed algorithms like this?

Doing that in a way that's easy to automate, set up, evaluate, and tear down various scenarios seems like the hardest part to me.

Re: Raft: Understandable Distributed Consensus (2014)

#46

Earlier quoted context omitted.

I've read both the Paxos and Raft papers a few times, and hacked on some implementations, but never quite got one over the line to working... Raft strikes me as a particular set of decisions made within a Paxos framework, such as having 1 entity for Proposers, Acceptor and Followers. It's frustrating that there isn't a clearly written defacto paper on Paxos - the story style confused the monkeys out of me.

> but never quite got one over the line to working... I've never implemented something like this. But my first thought is "how do you implement the testing system?" I feel like once you had a robust testing system that can verify things work correctly in all the different network partition and other scenarios, and allowing rapid iteration of setting up those scenarios, the implementation would be comparatively easy.

Yeah, you kind of can’t test any of it until you test all of it…

Re: Raft: Understandable Distributed Consensus (2014)

#47

Ben's visualization here is great. The other biggest help to me aside from the paper and the thesis was Ongaro's TLA+ spec: https://github.com/ongardie/raft.tla/blob/master/raft.tla . It's the only super concise "implementation" I found that is free of production-grade tricks, optimizations, and abstractions. And for building an intuition, TigerBeetle's sim.tigerbeetle.com is great. What happens to consensus when the…

Interesting that TigerBeetle uses Viewstamp Replication over Paxos/Raft. TB says viewstamp replication lends itself to a more performant implementation and doesn't rely on disk storage as much. I'm surprised I'm not seeing this brought up more in Paxos/Raft discussions.

Re: Raft: Understandable Distributed Consensus (2014)

#48

DLT technology discussions are entirely incomplete without consideration of Hedera Hashgraph [0], an aBFT, leaderless, fair and fast DLT using a gossip-about-gossip consensus mechanism. It's absolutely a more robust and scalable technology than Paxos or any other DLT for that matter. I'd love to know what the HN crowd thinks about Hedera as the trust layer of the internet but.... nobody around here seems to have any.…

Paxos isn't a DLT, it's a consensus algorithm — granted, DLTs tend to require a consensus algorithm, but they're not the same things. As for Hedera Hashgraph being the trust layer of the internet, we tend to build the internet through the IETF and standards setting. Unfortunately HH is an endeavour from a private company so isn't especially likely to be taken on in that context. I'd also wonder what you mean by the t…

Great point, I wasn't being precise. My point stands, however! I must also correct your understanding re: "private company."

The DLT in question - Hedera - is built on the unique consensus algorithm, the "hashgraph". The hashgraph algorithm combines a gossip-about-gossip protocol with virtual voting.

In fact, services development is now in the hands of the largest open source foundation in the world. These implementations are entirely open source [0], and very recently the codebase has been donated in whole to the Linux Foundation.

Furthermore, Hedera is a Pioneer member of the newly founded Linux Foundation Decentralized Trust organization [1] - along with Chainlink, Deloitte, Hitachi, many other major organizations, some of whom are also on the Hedera governing council [2]. This foundation will be a big player in the future of decentralized web, and Hedera is the only L1 that I know of which is both primed for this future and actually scalable.

I understand the IETF and standards approach; and am not aware of a current draft or intention for such a draft. The idea of Hedera being the 'trust layer' of the internet is more about use cases like decentralized recovery, process validation, carbon offsets, extremely granular supply chain auditing, and any other application you might imagine that would benefit from having extremely fast (10k+ TPS), 100% guaranteed aBFT consensus on-chain. I'd love to hear what you might think up or where this could be particularly useful. Strong governance with 39 council members - including Google, IBM, Boeing, Tata, AP+, Hitachi and more... with decentralized network operation and stable fees (essential for enterprise application).

> Additional use cases include, but are not limited to, financial markets, matching engines (like those used in Uber or AirBnb), or supply chain negotiations (e.g., several competing factories bidding on parts from several competing parts suppliers).

So, admittedly the use cases maybe aren't evident or interesting to you and I right now at the TCP/IP layer, but I can certainly say there are a plethora of trust-based problems that could be solved with consensus only needing a few thousand ms. Think digital identity, healthcare, financial markets, IoT, supply chain, real-world asset tokenization... For any real-world, scaled application, a DLT must have very high throughput at high performance. It's the absolute highest performance and security possible in a leaderless consensus-based DLT as far as I know.

Literally carbon neutral or negative because of buybacks but even without Hedera buying carbon credits, it's the single most "green" i.e. power-efficient DLT on the market. Does HN still care about Bitcoin using too much power? They would like Hedera, to that extent. Predictable, very low fixed fees. Long list of the biggest tech players leading the open development process. What's not to love?

I urge you to help me invalidate these claims as it's pretty important I understand the tech here... But I'm very bullish on the token price as the technology is proven, robust, and overall extremely undervalued by retail - in my opinion. NFA.

> The Hashgraph consensus algorithm is an algorithm for asynchronous Byzantine fault tolerance intended for distributed shared ledgers. Its main distinguishing characteristic is it achieves consensus without exchanging any extra messages; each participant’s votes can be determined from public information, so votes need not be transmitted.

For more rigorous explanation, see [3] and the associated Coq proof of the algorithm [4].

[0]: https://github.com/hashgraph/hedera-services

[1]: https://www.lfdecentralizedtrust.org/

[2]: https://hedera.com/ecosystem/governing-council

[3]: https://hedera.com/papers

[4]: https://www.cs.cmu.edu/~crary/papers/2021/hashgraph.pdf

Re: Raft: Understandable Distributed Consensus (2014)

#49

This is one of my favorite pieces of software engineering because it took something difficult and tried to design something easy to understand as a main criteria for success. The PHD Thesis has a lot more info about this if anyone is curious, it is approachable and easy to read: https://web.stanford.edu/~ouster/cgi-bin/papers/OngaroPhD.pd... I think this was core to Raft’s success, and I strive to create systems like…

Weirdly it's also kinda worse is better: raft is non-deterministic and has an unboundedly long election cycle time. IIRC: - it assumes no hysteresis in network latencies and if there is a hysteresis it's possible that elections can be deterministically infinite. - this fact and the use of raft in production has caused real, large scale network outages. Paxos is of course a beast and hard to understand. There is an al…

I've made a longer comment in another thread; but have you investigated the hashgraph algorithm? Gossip-about-gossip and virtual voting combine to result in leaderless consensus, fair ordering and aBFT. It's very performant with over 10k TPS on-chain. I'm learning about DLT from the perspective of hashgraph which is why I don't understand why it doesn't get love - it seems to have all of the good and none of the bad.

Re: Raft: Understandable Distributed Consensus (2014)

#50
post #4

While understandable, implementing it is however far from easy.

How do you write a testing framework/system for evaluating distributed algorithms like this? Doing that in a way that's easy to automate, set up, evaluate, and tear down various scenarios seems like the hardest part to me.

[deleted]
Post reply on HN