Layer 3 · Go deeper · 5 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
Build-up · 6 steps
Watch a Raft election, split vote and all
Five servers, randomised timeouts and an unlucky moment. The leader crashes, two followers stand almost together, and Raft still ends with one leader.
Step 1 of 6
Term 1: heartbeats hold
S1 leads term 1 and sends heartbeats, AppendEntries calls with no entries, every 50 ms. Each one resets every follower’s election timer, so nobody stands while the leader is alive.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Your etcd cluster spans three zones and must keep accepting writes if any one zone fails. How many members, and where?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Five members sit two in Mumbai, two in Hyderabad, one in Singapore. Where should the leader live?”
Assume round trips of 1 ms within Mumbai, 20 ms Mumbai–Hyderabad and about 60 ms from either city to Singapore.
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Your config service must never return stale reads, but appending every read to the log costs a disk write. What do you do?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“One member of your three-node etcd cluster has died. How do you replace it?”
Your move. Pick an approach: