E
EdH
Guest
EdH Asks: Confused about the consistency guarantee of zookeeper (Sequential vs Eventual Consistency)
As I understand, Zookeeper enforces "sequential consistency" which states any execution is the same as if all read/write ops were executed in some global ordering. Basically, a client may see stale data but it's guaranteed to see values in the order of the writes which are linearized.
I have two confusions
1. How is the ordering guarantee from sequential consistency preserved when a node goes down? For example, what happens in a following scenario?
Doesn't this break the ordering guarantee provided by the sequential consistency?
2. Am I correct in saying that all eventual consistency model provides an ordering guarantee as long as a client is always reading from the same node?
Is the lack of ordering guarantee in eventual consistency due to the fact that a client can read from any node and is not tied to a specific node when reading a value?
(Wouldn't systems that implement sequential consistency suffer from the same issue though in a scenario where a node goes down and a client is forced to read from a client with a stale data? Kinda goes back to my question #1)
Any clarification would be greatly appreciated. Thank you.
As I understand, Zookeeper enforces "sequential consistency" which states any execution is the same as if all read/write ops were executed in some global ordering. Basically, a client may see stale data but it's guaranteed to see values in the order of the writes which are linearized.
I have two confusions
1. How is the ordering guarantee from sequential consistency preserved when a node goes down? For example, what happens in a following scenario?
- Write x=1
- Write x=2
- Node A has the most recent value x=2, Node B is still on old value x=1
- A client reads x=2 from Node A
- Node A goes down.
- A client is now connected to Node B.
- A client now reads x=1 from Node B.
Doesn't this break the ordering guarantee provided by the sequential consistency?
2. Am I correct in saying that all eventual consistency model provides an ordering guarantee as long as a client is always reading from the same node?
Is the lack of ordering guarantee in eventual consistency due to the fact that a client can read from any node and is not tied to a specific node when reading a value?
(Wouldn't systems that implement sequential consistency suffer from the same issue though in a scenario where a node goes down and a client is forced to read from a client with a stale data? Kinda goes back to my question #1)
Any clarification would be greatly appreciated. Thank you.
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.