rgoussu@goussu: ~/library/system-design/exercises
~/library/system-design/exercises cat raft-with-gossip-glomers.md

Implement Raft with Gossip Glomers

# Climb Fly.io's distributed-systems challenges — echo to replicated logs to transactions — and finish by implementing Raft, verified by Maelstrom under injected partitions.

Exercisesaved 2026-08-08source #exercise#raft#consensus#distributed-systems#gossip#maelstrom

Goal

Work up the Gossip Glomers ladder from a trivial echo node to a linearizable, Raft-backed key-value store, with Jepsen's Maelstrom harness injecting partitions and checking your answers. Proves you can implement replication, ordering, and consensus — not just name them — and that your code survives the failure modes the concept notes describe.

Subject: full brief & instructions

Practices

Milestones

  1. Echo — wire a node up to Maelstrom; learn the message/reply plumbing before anything distributed happens.
  2. Unique ID generation — globally unique IDs with zero coordination: your first deliberate avoidance of consensus.
  3. Broadcast — gossip values to every node; then keep it working through partitions (retry + idempotence); then tune fan-out for the latency/message-count trade.
  4. Grow-only counter — an eventually consistent counter on the provided KV; feel exactly what "eventual" buys and what it refuses to promise.
  5. Kafka-style log — replicated append-only logs with offsets and committed reads.
  6. Totally-available transactions — weak-isolation transactions that stay available when the network splits.
  7. Raft — leader election, log replication, and quorum commit from the Raft paper, following Maelstrom's Raft walkthrough; pass the linearizable-KV workload with partitions enabled.

Stretch goals

  • Log compaction and snapshotting once the log grows unbounded.
  • Add leases and fencing tokens to the Raft KV, then race a paused client against a new leader to see why the token matters.
  • The MIT 6.5840 Raft labs — persistence and a harsher test suite for the same protocol.

Related