Gossip
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 · 6 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.

    How long until all 1,000 nodes hear one update?

      What do full-state digests cost as the cluster grows 10×?

        Build-up · 5 steps

        Watch one update spread through 12 nodes

        Push gossip with fanout 2 on a 12-node cluster. Badges show the round in which each node first heard the update.

        Step 1 of 5

        One node hears the news

        Push gossip at fanout 2: each round, every node that knows tells 2 random peers. Nobody keeps a list of who has been told, so there is nothing central to lose.

        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

          “Each node counts the orders it serves, and you gossip them to show a cluster-wide total. What does each node gossip?”

          Your move. Pick an approach:

        2. Deep dive 2 of 4

          Interviewer

          “Your 1,000 nodes push rumours that stop after 3 needless calls, and 1.1% never hear. What do you change?”

          Your move. Pick an approach:

        3. Deep dive 3 of 4

          Interviewer

          “One CPU-starved node processes acks late and keeps accusing healthy peers of being dead. What do you change?”

          Your move. Pick an approach:

        4. Deep dive 4 of 4

          Interviewer

          “You’re writing the seed config for a new cluster spread over three racks. What seed list does each node get?”

          Your move. Pick an approach: