Loading...
set(key, value)
get(key) -> value
delete(key)
update(key, comp, value) -> oldValue
For in-memory storage, we choose a hash table to store the KV pair.
We should shard the servers using hash of the key, and placing the servers in a consistent hash ring.
We each shard, we should create replicas.
Gateway
Shard 0 to N
Shard 0 to N replica
Consistency between replicas
There are several options, that can be made configurable
Handling shard failures
Shard node failures
Network partition
Replication failures