TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Raft Consensus Animated (2014)

411 pointsby pkilgorealmost 3 years ago

26 comments

benbjohnsonalmost 3 years ago
Author here. I made this visualization over a decade ago and I&#x27;m glad it&#x27;s still useful for folks! Let me know if you have any questions.<p>I&#x27;ve also been trying on-and-off again some different techniques for doing the visualization as I&#x27;d like to do more of these. I&#x27;m currently looking at trying to make it work with Remotion[1]. The JavaScript version I did for Raft was time intensive and I ended up having to write an entire (albeit terrible) implementation of Raft to even get it to work. lol.<p>[1] <a href="https:&#x2F;&#x2F;www.remotion.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.remotion.dev&#x2F;</a>
评论 #32489601 未加载
评论 #32489415 未加载
评论 #32489963 未加载
评论 #32495579 未加载
kretaceousalmost 3 years ago
I&#x27;ve only heard about Raft Consensus algorithm thrown around in a few GitHub repos&#x2F;HN comments but never got a chance to really know it.<p>This webpage cleared some long-standing doubts about what distributed computing means, what a consensus algorithm is and what his Raft thing is.<p>Kudos to the developer. You got a newbie interested in the field!
travisgriggsalmost 3 years ago
This is the first I have heard of Raft, but enjoyed the animations and ideas. I work on multi-node radio communications for ag automation. I had two questions after watching this:<p>- Is Raft alone in this space, or are there other popular algorithms&#x2F;libraries that fill the same space?<p>- What happens when the node count gets larger than a handful? What happens when you hit hundreds or even thousands of nodes, that are trying to achieve consensus? In particular, the part where all of the nodes respond (semi) simultaneously to a broadcast node. In a radio spectrum world, that would be a disaster. N:1 communication slots are choke points for timely communication.
评论 #32486798 未加载
评论 #32486778 未加载
评论 #32491435 未加载
评论 #32489718 未加载
daenzalmost 3 years ago
Is it a weakness to only commit on majority consensus? I&#x27;m thinking of a very unstable global network, where partitions are happening everywhere. In that scenario, only one cluster can reach consensus (if you&#x27;re lucky). If the partitions are such that no cluster has majority, nothing can proceed.<p>Is there a better way to proceed with tentative consensus, until a majority cluster can be realized, and then have a conflict resolution strategy? People operate this way.
评论 #32489335 未加载
评论 #32487442 未加载
评论 #32487431 未加载
评论 #32490239 未加载
majewskyalmost 3 years ago
Great timing. I&#x27;m part of a German podcast on fundamentals of computing [1], and we just recorded an episode on Distributed Systems that discusses Raft as an example. We will probably be adding an addendum to link to this.<p>[1] <a href="https:&#x2F;&#x2F;www.schluesseltechnologie-podcast.de" rel="nofollow">https:&#x2F;&#x2F;www.schluesseltechnologie-podcast.de</a>
评论 #32492250 未加载
stevewatson301almost 3 years ago
On a related note, I’ve found <a href="https:&#x2F;&#x2F;martinfowler.com&#x2F;articles&#x2F;patterns-of-distributed-systems&#x2F;" rel="nofollow">https:&#x2F;&#x2F;martinfowler.com&#x2F;articles&#x2F;patterns-of-distributed-sy...</a> to be quite instructive in understanding distributed systems in general.
ollemaslealmost 3 years ago
More generally, the Raft page on Github lists some good resources on that subject (including that really good animation):<p><a href="https:&#x2F;&#x2F;raft.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;raft.github.io&#x2F;</a>
bberrryalmost 3 years ago
I&#x27;ve had a surprisingly hard time finding a bare-bones Raft implementation in Java purely for leader election.<p>The same hunt also surprised me that there is no common way to do leader election among pods in Kubernetes.
评论 #32487119 未加载
评论 #32487462 未加载
tomcamalmost 3 years ago
This is just ridiculously good. I am normally a word learner but lately my mind has been going a little bit more visual. This was very very well thought out and helped me enormously.
Verviousalmost 3 years ago
Previous discussion (in 2020): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25326645" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25326645</a><p>Also, I personally think the current blockchain literature is much more intuitive and easier to follow, for learning about consensus. The Byzantine case isn&#x27;t really that different than the crash case if we assume cryptography. On the other hand, Raft is a spiderweb of a protocol, very easy to get wrong.
ziyunlialmost 3 years ago
I am working on MIT 6.824[0] by myself as a side project. This visualization is very very helpful at the beginning just so that I can build up the right mental model and understand how components interact with each others.<p>[0]: <a href="https:&#x2F;&#x2F;nil.csail.mit.edu&#x2F;6.824&#x2F;2020&#x2F;schedule.html" rel="nofollow">https:&#x2F;&#x2F;nil.csail.mit.edu&#x2F;6.824&#x2F;2020&#x2F;schedule.html</a>
dangalmost 3 years ago
Related:<p><i>Raft Visualization</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25326645" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25326645</a> - Dec 2020 (35 comments)<p><i>Raft: Understandable Distributed Consensus</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8271957" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8271957</a> - Sept 2014 (79 comments)
edfletcher_t137almost 3 years ago
This is genuinely lovely and informative. Thank you!
purplebluealmost 3 years ago
Excellent!<p>A couple of questions:<p>1) In the case of a network partition, the client that is currently connected to the leader, do they get notified that there&#x27;s a partition, or that the cluster is not in a healthy situation?<p>2) If a client writes to the partition that will get rolled back, and all their transactions get rolled back after the partition heals, do they get notified that their data was rolled back?
评论 #32486884 未加载
cphooveralmost 3 years ago
It would be cool to also see an animated visualization of the paxos consensus algorithm
评论 #32486542 未加载
lifeisstillgoodalmost 3 years ago
So, I am imagining making a distributed storage (maybe some global database)<p>If implement raft on top of S3 I can kinda see this working. Is there a sensible &quot;file system on top of S3 like storage&quot; out there already?
评论 #32491085 未加载
alexnewmanalmost 3 years ago
I’ve worked on two implementations of raft, and two other multi paxos implementations and still think single decree paxos + 2PC is probably a better idea just super hard to implement.
dec0dedab0dealmost 3 years ago
I ran into this while setting up Hashicorp Vault a year or two ago. It was good at helping me understand what&#x27;s happening, but I don&#x27;t particularly like raft. I want to be able to recover from one server, and I don&#x27;t want to have to wait for a majority on every transaction should I add many servers. I know it&#x27;s an impossible problem to solve generally, but I think in many situations an alert saying some specific data had a conflict and might not have been resolved correctly is a much better outcome than an outage.
评论 #32486630 未加载
cosmoticalmost 3 years ago
Largely unrelated to the content but cutting the fade animations would really improve the presentation.
waynesonfirealmost 3 years ago
Have there been any notable ammendments made to the protocol whether to improve correctness or performance?
sizzlealmost 3 years ago
How does this relate to validator nodes for blockchain consensus, same concept?
kpatrickover 2 years ago
Thank You!
coozealmost 3 years ago
is this similar to how the ethereum network operates? This is an awesome animation
评论 #32489432 未加载
alpbalmost 3 years ago
Unsolicited feedback: use fewer text-appear animations, and allow people to skip through stuff. I&#x27;ve spent a full minute clicking next next and still haven&#x27;t seen a visualization aside from text slides loading slowly with animations. It&#x27;s like a long YouTube ad that you cannot skip.
评论 #32487698 未加载
评论 #32486832 未加载
评论 #32486551 未加载
评论 #32487515 未加载
评论 #32486820 未加载
评论 #32486263 未加载
评论 #32486953 未加载
Uhhrrralmost 3 years ago
After clicking six times and learning nothing, I left.
grogenautalmost 3 years ago
Ugh... how slow the animations are... I read much much faster than that but it feels like playing through an old JRPG that doesn&#x27;t let you speed up the text playback.
评论 #32490201 未加载