Design a masterless, highly scalable, partition-tolerant key-value store providing sub-10ms read/write latencies, configurable consistency levels, and automatic data replication.
Hashes key using Consistent Hashing ring to route requests directly to coordinator node.
First node on the Hash Ring receiving the request. Replicates writes to N successive nodes.
In-Memory MemTable + Write-Ahead Log (WAL) + On-disk SSTables for high-speed writes.
Peer-to-peer decentralized protocol for node discovery, heartbeats, and cluster state sync.
Client hashes "user_123" and sends request to coordinator.
Write acknowledged locally in < 1ms.
Concurrent write replication over TCP.
Once W acknowledgments received (e.g. W=2 out of N=3), return success.
Operation completed under 5ms.