Cap Theorem hard
Which consistency level encompasses 'Read-Your-Writes', 'Monotonic Reads', and 'Consistent Prefix Reads'?
- A Strong Consistency, which ensures that all global nodes are perfectly synchronized with the same data in real-time.
- B Causal Consistency, which ensures that all related events are seen in their proper logical order by all users.
- C Session Consistency, which ensures that an individual user's view of the data is logically consistent and sane.
- D Static Consistency, which ensures that once the data is written, it can never be modified or deleted by any user.
Answer: C. Session Consistency, which ensures that an individual user's view of the data is logically consistent and sane.
Session Consistency is a 'client-centric' model. It doesn't promise that User A and User B see the same thing at the same time. However, it guarantees that User A's experience is consistent: they see their own writes, their data never 'reverts' to an older version (Monotonic Reads), and they see updates in the correct order. This provides a 'Strongly Consistent' feel for the specific user while allowing the backend to remain highly available (AP).
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is a 'Split Brain' scenario?
- The PACELC theorem extends CAP by stating: Even when there is NO partition (E), the system must choose between:
- Why is a CA (Consistent + Available) system generally considered impossible for distributed web applications?
- In CAP, 'Consistency' is equivalent to:
- In the CAP Theorem, what does the 'P' stand for?
- What causes a Network Partition?