Quorums
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 · 9 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 many replicas does QUORUM wait for across two regions?

      A node restarts for 10 minutes. How long do its hints take?

        What does one lightweight-transaction write cost across regions?

          Build-up · 6 steps

          Follow one write and one read

          N = 3, W = 2, R = 2. One client writes, another reads, and one replica missed the write.

          Step 1 of 6

          Three homes for key k

          The key is hashed onto the ring; its preference list is the next N = 3 distinct nodes clockwise. Every node can compute that list, so any node can take a request.

          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

            “Mumbai and Frankfurt hold three replicas each. Users are homed to one region. Which consistency level should their reads and writes use?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “Two devices edit the same shopping cart at once, through different coordinators. Neither saw the other’s write. Which version do you keep?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “A replica was down for a day when a row was deleted. Your team runs nodetool repair once a month. What do you change?”

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “Two people claim the username priya_k at the same moment. On Cassandra, how do you make sure only one gets it?”

            Your move. Pick an approach:

          Build-up · 6 steps

          Find the one range that differs

          Read repair fixes only keys someone reads, and hints expire. Anti-entropy compares whole replicas by hashing, not by shipping every key.

          Step 1 of 6

          Hash ranges into a tree

          Each leaf is a hash of one slice of a token range, and each parent is a hash of its children. Both replicas build a tree for the same range.