Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

etcd: Strong, linear and sequential consistency

I read the following on the front page in etcd:

etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network partitions and can tolerate machine failure, even in the leader node.

What do they mean by "strongly" consistent? How does their consistency model relate to perhaps more formal or established definitions of sequential and linear consistency?

like image 541
Josh Avatar asked Oct 24 '25 02:10

Josh


1 Answers

"Consistency" described in Distributed system is different than consistency described in "ACID transaction".

Consistency described in Paxos, Raft, Zookeeper etc. (etcd is based on Raft) closely resembles (D) Durability in ACID terminology. What they meant is that transaction is committed once data is written to disk in majority of nodes. Which further implies if majority of nodes up, then reads will get latest data written.[1]

Let's say, etcd has 5 node cluster, then transaction will be said as committed only when 3 nodes (Majority of nodes) commit the transaction.

what you are referring from sequential & linear consistency is (I) Isolation property in ACID.

etcd. have modes in which it can have "linear consistency" if it reads and writes data every time from majority of nodes. "Sequential consistency" with high performance in distributed systems is tough beast although database like H-Store have solved it already back in 2007.

[1] https://raft.github.io/raft.pdf

like image 85
WebServer Avatar answered Oct 27 '25 01:10

WebServer