What the typical distributed KVS look like?

Viewed 60

In my understanding, the distributed KVS typically looks like:

  • There is a leader which manages metadata
  • There are multiple followers which manage data
  • A client interacts with leader
  • When a client asked to WRITE a data to the leader, it decides which node should own the data then pass it by some hash algorithm (e.g. consistent hash)
  • Also, the leader copies the data to some other nodes in order not to lose the data in case some outage

This is my understanding. My point is that in this architecture, the data is not copied to all the follower nodes.

However, in etcd, it replicates all the data using Raft. In my understanding it should not be called distributed kvs but just a master-replica replication.

Is there any definition of distributed kvs? Should they be called distributed kvs if it consists of multiple servers? Please let me know it I'm missing some points.

1 Answers

I believe that your deffinition of distributed KVS (Key-Value Store) is really specific. Here is wiki definition of distributed data store:

A distributed data store is a computer network where information is stored on more than one node, often in a replicated fashion. It is usually specifically used to refer to either a distributed database where users store information on a number of nodes, or a computer network in which users store information on a number of peer network nodes.

Etcd fits into this definition. I'd also argue that etcd is more than replication, as there is consensus algorithm (raft as you mentioned) in its hearth. It gives some guarantees that (I believe) replication doesn't give:

  • Faul tolerance up to (n-1)/2 nodes
  • None of committed values will be lost by any node failure (as long as we are in fault tolerance boundary)
Related