Does Consul key-value store give us any guarantees on ordering of two writes with two different keys?

Suppose we have only two nodes A and B.

When we issue these two commands on the node A,

$ curl -X PUT -d one .../v1/kv/key1
$ curl -X PUT -d two .../v1/kv/key2

(ie. PUT one key1 happens-before PUT two key2) and then GET of /v1/kv/key2 on the node B returned two, is it guaranteed that GET of /v1/kv/key1 on the node B returns one ? In other words, does Consul KVS honor happens-before relationship between the two writes on the node A?

Consul uses a consensus protocol to provide Consistency (as defined by CAP).

Yeah, but my understanding is the CAP theorem doesn't talk about multiple registers. These two writes may eventually propagate to the node B, but is it guaranteed we will never see an unexpected intermediate state?


Consul claims linearizability. "All servers participate in the Raft consensus algorithm to ensure that transactions occur in a consistent, linearizable manner."

If the puts were synced in another order than they were received, you could see them out of order when reading from another node, violating the linearizability guarantee. Thus, they should always be observed in order.

However, since previous linearizability violations have been "solved" by decreasing a timeout value and then lying in marketing, claiming Jepsen never found any bugs, I wouldn't count on it being completely linearizable, at least for the next few years.

Need Your Help

Java table system not working

java swing jtable

I am completely new to Java and have been set an assignment where we must create a book library system. The table must have 7 columns. however I can only currently get 2 and then the code stops wor...

In MySQLi prepared statements what does STMT stand for?

php mysqli prepared-statement

MySQLi prepared statements use the variable $stmt but I couldn't find what STMT stands for or why it is used. For other variables (such as $query and $results) have always made sense to me, and I was