Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Raft Is So Fetch: The Raft Consensus Algorithm Explained Through Mean Girls (cockroachlabs.com)
214 points by mikaelaustin on Oct 3, 2022 | hide | past | favorite | 53 comments


I've been working through a basic implementation over the weekend [0] in Go. I am skipping dynamic cluster management and log compaction/snapshots. I mostly got leader election working and the basics of log replication. But it's not yet correct because nodes that are down when new messages come in are not correctly brought up to date. :D Still working through issues. When it's less buggy I'll write a post.

If you haven't read the paper, just try it out [1]! It's pretty approachable as far as these things go. It even includes its own cheatsheet inside the paper at Figure 2 (page 4).

[0] https://twitter.com/phil_eaton/status/1576281031367221249

[1] https://raft.github.io/raft.pdf


I believe Hashicorp has an OSS GO implementation of raft if I remember correctly.


Yup! etcd [0] and hashicorp [1] have Raft libraries for Go. I've written about using the hashicorp one before [2, 3].

[0] https://pkg.go.dev/go.etcd.io/etcd/raft/v3

[1] https://github.com/hashicorp/raft

[2] https://notes.eatonphil.com/distributed-postgres.html

[3] https://notes.eatonphil.com/minimal-key-value-store-with-has...


Why did you pick HC raft over etcd?


The Hashicorp one came up first in a google search months ago. So, basically no reason.


love it


Etcd will spam your logs on quorum loss. It can easily fill your disk before the node comes back online or you wake up to fix it. Etcd logging is playing with fire. Just be careful.


To defend etcd's implementation though, it is what cockroachdb uses.

https://github.com/cockroachdb/cockroach/blob/master/go.mod#...


IMHO, the code is easier to follow than etcd's.


yes it’s more modular with clear contract between the parts


Ok, FYI but “fetch” was relegated in the movie to irrelevance, ie, “stop trying to make fetch a thing.” So for the “fetch”-aware audience, the title reads, “Raft Is *Irrelevant*: … Explained Through Mean Girls”


You're confusing the irrelevance of the word with its meaning. The word fetch did not catch on (which was the joke), but the word did not mean irrelevant, it meant “cool” or something in that vein.


yes, I believe the phrase that the young lady kept using was, "that is so fetch" with positive connotations.

Rachel McAdams finally snapped at her that the word was not going to catch on and that she should just stop. Tears were then shed.


Today, we would call it a failed attempt to force a meme.


I don't think they're saying the word fetch means irrelevance. They're saying fetch is something irrelevant. :)


> for the “fetch”-aware audience, the title reads, “Raft Is *Irrelevant* [...]”

No, they're claiming that "fetch" is interchangeable with "irrelevant" according to the movie.


"You love him, and he totally complimented you. That is so fetch."

This is clearly not stating that the actions by both parties are "irrelevant", it's clearly slang for "cool" or "awesome". The movie was alluding to the word itself being irrelevant in its use, not the word meaning or being synonymous with "irrelevant". I hope this cleared things up for you.


But the entire premise of the scene https://www.youtube.com/watch?v=Pubd-spHN-0 is that the act of telling someone to "stop trying to make fetch happen" is toxic and mean-spirited, and if someone actually does want to make "fetch" happen, they should be encouraged to do so.

And if your "fetch" is the normalization of Mean Girls as a valid lede for didactic technical discourse, then you go Glen Coco.


This, in fact, is a delightful analysis and response. You go, Glen Coco. :)


My interpretation was that the author's unconscious was trying to tell him, "stop trying to make this analogy to Mean Girls happen, it's not going to happen." But that's my unconscious mind telling me to RTFA


By the way, for anyone who hasn't seen Mean Girls yet, you definitely have to watch it.

I watched it with my girlfriend, just for her to enjoy, and was not expecting to enjoy it as much as I did. Now it's actually one of my favorite movies, plus growing up homeschooled it spoke to my soul on some deep levels. It's very well-written!


It's honestly one of the most quotable movies I've ever seen. So many iconic lines - "She doesn't even go here", "It's October Third", the entire clique lunch room joke, "Get in loser we're going shopping", "I can't. I'm sick.", literally anything that Karen says...

The musical version also has some great songs like Meet The Plastics


Re "It's honestly one of the most quotable movies I've ever seen."

When I read the title "Raft is so Fetch", I was going to come here to simply leave the comment "Strop Trying to make Fetch a thing!", without context ~ and then I read the rest of the title and realized it was supposed to be a Mean Girls reference.


The quote is "Stop trying to make fetch happen", and the proudest moment of my entire career is using that line as a code comment in a completely appropriate situation.


fetch().catch()?


Four for you glen coco, you go glen coco!


Couldn't agree more. This movie has so many memorable lines.

In general, anything involving Tina Fey is great.


in general, Tina Fey overdoes Tina Fey, I wish she'd stop trying to make Tina Fey happen, but she is associated, like as a writer, with a lot of really funny stuff. edit: acting, Amy Poehler(sp?) really inhabits her comedic roles, whereas Tina Fey is always Tina Fey.

related to the overall thread (rather than directly to your comment), "chick flicks" are in general quite well made, or at least I find that formula far superior to the male equivalent of action films which have fewer meaningful standouts.


I'm a 40 year old man and Mean Girls is one of my favourite movies of all time, not even in a guilty-pleasure kind of way. I love it.


Every few years someone produces a movie in which the antagonist throws away an insult as they're walking toward the parking lot and I fully expect them to walk in front of a bus.

I'm half convinced that directors do this on purpose, as a fake-out homage to Mean Girls.


Another 40 year old man here too, and yes I agree.

Now... pass me the marijuana tablets.


"Oh my God, Karen, you can't just ask people why they're white."


Today is also October 3rd.


The Devil Wears Prada too.


Also the fact that the characters unsuccessful attempt to make fetch happen, made fetch happen is deliciously meta.


A very happy October 3rd to all who celebrate.


Is it important outside of germany?


So funny how you can immediately see who's bothered to read the post by the questions they ask which have been answered in the post, in this case not only in text but with a gif as well :D.


LanternLight83 on the side there didn't just not read the post, he searched for what was being discussed to get the context. As opposed to, you know, clicking on the post and reading the first two sentences.


Googled it, it's a Mean Girls thing, kinda wholesome to see such fandom around such an arbitrary date that was just mentioned


Along the same lines: Britney Spears' Guide to Semiconductor Physics http://britneyspears.ac/lasers.htm


Looks like routergod.com is down but archive.org has saved it...

Gunney Sgt. Hartman at CCNA Boot Camp

https://web.archive.org/web/20080213122747/http://www.router...

and lots more:

https://web.archive.org/web/20080213020500/http://www.router...


Lol, this is hysterical, it's basically physics with Britney pictures along the way that barely relate.


>>When Regina shows up to lunch wearing sweatpants on a Monday she is dramatically booted from her role as leader of the Plastics

But, isn't she still part of the clique? Therefore, when Cady takes over as Queen Bee, there are now 4 in the clique and Cady will require 2/4 votes for consensus, which is the same as before (2/3). But if there is a third coup, it would then take 3/5 votes. That is unless Regina and Cady are kicked out as well as knocked down.


Still part of the clique in sweat pants? Eugh, no way. She can sit with the art freaks.


I wear a pink shirt every Wednesday so it's nice to see this culture appreciated here.


I feel like this article is missing an opportunity by not addressing the fact that Cady introduces destructive information into the system (the 'fact' of the diet bars that aren't) which the leader trusts implicitly without attempting to verify.


missing another opportunity when she says she likes Aaron Samuels and girls consensus says NO, she cant


So this title means Raft will never catch on? Is that by design? Maybe I'm missing the joke.


What a great read! I came in knowing nothing about Raft and I came out chuckling and knowing enough about Raft to want to dive deeper. 4 for you Mikael Austin, you go Mikael Austin!


You aren't supposed to post your own articles without a Show HN. See the rules about self promotion. Flagging.


I feel like cute attempts to explain Raft should come with a huge disclaimer. Although Raft authors claim it is easier to understand, and there are various pop explanations of Raft which make it seem easy to understand, in studies Raft and Paxos understanding among students is about the same, with the great majority of students failing to understand either one. Importantly, students who say subjectively Raft is easier to understand than Paxos are less likely to understand Raft than students who say they are equally hard.


I feel like the fact that it's cute is the disclaimer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: