Design a coordination service like Raft or Paxos that replicates a small, strongly consistent log for configuration, locks, and leader election. Clients need linearizable reads and writes within a quorum.
Functional requirements
- Replicated fault-tolerant log with committed ordering
- Leader election with stable terms and fencing
- Linearizable compare-and-swap or put operations
- Watch or long-poll notifications on key changes
- Snapshot and compaction for bounded recovery time
Non-functional requirements
- Survive minority failures without losing committed entries
- Bounded election time and clear availability during partitions
- Durable persistence on a majority before acknowledging clients
- Low jitter for small-key workloads typical of metadata