Lab 02 / Distributed systems
Agreement isn't automatic.
A key finds its owner. A write reaches a replica. A node goes offline. Explore the consequences, one reproducible step at a time.
Interactive cluster simulation
Cluster configuration
0Logical tick
4 / 4Live replicas
0Keys moved on last membership change
node-A
node-B
node-C
node-D
Event timeline
Cluster initialized. Node A is the fixed primary. Step to write version 1.
- Cluster initialized. Node A is the fixed primary. Step to write version 1.
Two models, one control panel.
The hash ring models key placement only. The replication view models a single key replicated to all N nodes. Ring ownership does not control replica placement; combining the displays does not make this a distributed database.
Explicit assumptions
- Node A is a fixed primary. There is no election, consensus protocol, clock skew, partition healing, or concurrent writer.
- A write commits only with a live primary and at least W live replicas. The first W live replicas acknowledge immediately; others receive queued snapshots on logical ticks.
- A quorum read selects the first R live replicas in node order and returns their maximum version. Single-node reads bypass quorum deliberately.
- Failures preserve memory. Recovery re-enables queued delivery. Same-tick writes coalesce; offline replicas retain the latest snapshot. This is not a real transport or durability guarantee.
- R + W > N guarantees set intersection for a fixed membership, not linearizability by itself.
- The hash is deterministic and non-cryptographic. Key movement counts include keys becoming unassigned when every node is down.