Heartbeats
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 7 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.

    When does a phi accrual detector at φ = 8 suspect a node?

      How many messages a second does it take to watch 1,000 nodes?

        How many location pings a second do 300,000 online riders send?

          Build-up · 6 steps

          Watch a paused node get declared dead

          One owner beating every second, a three-beat timeout, and a GC pause longer than the timeout. Then what keeps the paused node from doing damage.

          Step 1 of 6

          Beats reset the clock

          Node A owns the work, holds fencing token n and beats every second. The monitor measures silence from the last beat it heard, not from any crash.

          4 interview moments

          You’re the candidate

          The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

          1. Deep dive 1 of 4

            Interviewer

            “One node’s GC pauses sometimes outlast your 1 s timeout. It’s declared dead, rejoins and flaps all day. What do you change?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “You must detect failures across a 5,000-node cluster. Who watches whom?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “A consumer’s poll loop has hung on one record for minutes, yet the coordinator says it’s healthy. What do you change?”

            Its background thread heartbeats every 3 s, and the session timeout is 45 s.

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “Your scheduler reassigns a silent worker’s jobs after 30 s. The worker was only paused, and wakes to finish the old job. What stops it?”

            Your move. Pick an approach: