CSE Roadmap

Specialist tier · about 2 hours · 5 parts

Part 5 of 5 · 5 min read

Exercises

Easy

Easy 1: Define leaderless replication (15 minutes)

State, in one sentence, what makes leaderless replication different from single-leader or multi-leader replication.

Done when: having no designated leader or follower roles, with any node able to accept a write or read, is correctly described.

Hint

No designated leader or follower roles exist; any node can accept a write or serve a read directly.

Easy 2: Name what w and r represent (15 minutes)

State what w and r represent in a leaderless replication system.

Done when: the write quorum and read quorum, each a minimum number of confirming or responding nodes, are correctly named.

Hint

The write quorum (w), the minimum nodes that must confirm a write, and the read quorum (r), the minimum nodes that must respond to a read.

Easy 3: Name what hinted handoff does (15 minutes)

State what hinted handoff does once a temporarily unreachable node comes back online.

Done when: forwarding the data that was temporarily held by another node to the correct, now-reachable node is correctly described.

Hint

It forwards the data that was temporarily held by a substitute node to the correct, now-reachable node.

Medium

Medium 1: Check whether a quorum configuration guarantees overlap (25 minutes)

A system has 5 total replicas, with w set to 2 and r set to 2. Determine whether this configuration guarantees every read overlaps with every successful write.

Done when: no is correctly concluded, since w plus r equals 4, which does not exceed the total replica count of 5, so a read and a write could use entirely non-overlapping sets of nodes.

Hint

No, since w plus r equals 4, which does not exceed the 5 total replicas, so a read and a write could potentially use entirely non-overlapping sets of nodes.

Medium 2: Fix the quorum configuration (25 minutes)

Using the same 5-replica system from the previous exercise, propose a new value for r, keeping w at 2, that would guarantee overlap.

Done when: any value of r such that w plus r exceeds 5 is correctly proposed, such as r equal to 4.

Hint

Any r such that w plus r exceeds 5, such as r equal to 4 (since 2 plus 4 equals 6, which exceeds 5).

Medium 3: Decide when a sloppy quorum would trigger (30 minutes)

A write normally requires 2 of 3 specific nodes to confirm, but only 1 of those 3 is currently reachable. Determine whether a sloppy quorum would be needed to let this write succeed.

Done when: yes is correctly concluded, since the normal write quorum of 2 cannot be met using only the 1 reachable usual node, so a sloppy quorum using a different, available node would be needed instead.

Hint

Yes, since only 1 of the 3 usual nodes is reachable, which cannot satisfy the normal write quorum of 2, so a sloppy quorum using a different, available node would be needed.

Hard

Hard 1: Explain the consistency risk of a sloppy quorum (30 minutes)

Explain what temporary inconsistency risk a sloppy quorum introduces, compared to a normal quorum using only the usual nodes.

Done when: the explanation correctly notes that until hinted handoff completes, the data physically resides on a node that was not one of the usual, intended nodes for it, so a read quorum consulting only the usual nodes could miss this write entirely until the handoff finishes.

Hint

Until hinted handoff completes, the write's data sits on a node that is not one of the usual, intended nodes, so a read quorum consulting only the usual nodes could completely miss this write until the handoff finishes.

Hard 2: Compare leaderless replication's conflict risk to multi-leader's (35 minutes)

Explain why leaderless replication, like multi-leader replication covered on the previous page, can also experience write conflicts, and why neither has single-leader replication's single ordering point to prevent them.

Done when: the explanation correctly notes that in leaderless replication, as in multi-leader replication, more than one node can accept a write to the same data without a single point first establishing an order between them, which is exactly the structural property that permitted write conflicts on the previous page and permits them here as well.

Hint

In both leaderless and multi-leader replication, more than one node can accept a conflicting write to the same data without any single point first establishing an order between those writes, which is the exact structural gap that makes write conflicts possible in both shapes.

Hard 3: Choose quorum sizes for a stated availability-versus-consistency requirement (40 minutes)

A system has 5 replicas and strongly prioritizes read performance and availability over absolute certainty that every read sees the very latest write. Propose reasonable values for w and r, and explain the trade-off.

Done when: reasonable values are proposed, such as a low r (for example, 1) favoring fast, highly available reads at the cost of occasionally missing the very latest write, paired with a correspondingly higher w to maintain some overlap guarantee, or an explicit acknowledgment that overlap is being intentionally sacrificed for availability, with the trade-off correctly explained either way.

Hint

A low r, such as 1, favors fast, highly available reads at the cost of sometimes missing the very latest write; pairing it with a correspondingly higher w, or explicitly accepting that overlap is not guaranteed, reflects the system's stated priority on availability and read performance over absolute read-your-latest-write certainty.