Live data from Hacker News

Raft: Understandable Distributed Consensus (2014)

thesecretlivesofdata.com

1–10 of 91 posts

Re: Raft: Understandable Distributed Consensus (2014)

#3
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 this with understandability as a first goal.

Re: Raft: Understandable Distributed Consensus (2014)

#6
Author here. I'm happy to answer any questions although this project was from 10+ years ago so I could be a little rusty.

Over the years I've been trying to find better ways to do this kind of visualization but for other CS topics. Moving to video is the most realistic option but using something like After Effects takes A LOT of time and energy for long-form visualizations. It also doesn't produce a readable output file format that could be shared, diff'd, & tweaked.

I spent some time on a project recently to build out an SVG-based video generation tool that can use a sidecar file for defining animations. It's still a work in progress but hopefully I can get it to a place where making this style of visualizations isn't so time intensive.

Re: Raft: Understandable Distributed Consensus (2014)

#8
post #4

While understandable, implementing it is however far from easy.

Right, but Paxos is double hard in comparison. I’ve read both papers multiple times, tried to implement and failed, and I still don’t think I understand Paxos.

IMO, Paxos has a lot less edge cases than Raft, mostly because of the complexity of the implementation covers them/forces you to think about how to handle them.

Re: Raft: Understandable Distributed Consensus (2014)

#9
post #4

While understandable, implementing it is however far from easy.

Having implemented it twice (for fun/learning, though) I think you're right - yet it's also the easiest, imho. The paper, and resources around implementing it (posts, other implementations) are great. Also, the authors still reply on github when issues are opened, which is great.

Re: Raft: Understandable Distributed Consensus (2014)

#10
post #4

While understandable, implementing it is however far from easy.

Right, but Paxos is double hard in comparison. I’ve read both papers multiple times, tried to implement and failed, and I still don’t think I understand Paxos.

I'm on the other side.

I think Leslie Lamport asserted that Paxos is minimal, and that "all other consensus algorithms are just Paxos with more steps". I'm inclined to believe him.

I've implemented Paxos but I can't get through "Raft for dummies" style blog posts.

Regarding Raft [1]:

  > The consensus problem is divided into three sub-problems: Leader election, Replication and Safety.
What is leader election? It's a distributed system coming to consensus on a fact (i.e. who the leader is.) Then once you have the leader, you do additional steps. The entirety of Paxos is a distributed system coming to consensus on a fact.

When I read these posts, i see things like "timeout", "heartbeat", and I think: timeout according to whom? I read "once the leader has been elected", um, hangon, according to whom? Has node 1 finally agreed on the leader, just while node 3 has given up and started another election? I don't doubt that Raft is correct, but the writing about it seems simple by glossing over details.

Paxos, on the other hand, seems timeless. (And the writing about it doesn't trigger my "distributed system fallacies" reaction)

[1] https://www.brianstorti.com/raft/

Post reply on HN