Cap Theorem hard
If a system offers Causal Consistency but NOT Linearizability, what anomaly might a user observe?
- A A 'Time Travel' scenario where a user sees a reply to a message appearing before the original question was ever posted.
- B The total and permanent loss of data that was previously acknowledged as successfully committed to the database.
- C Seeing a stale value for an unrelated key while still seeing their own actions and causal chains appearing in the correct order.
- D Incoming writes failing randomly across the cluster because the system cannot achieve a global network consensus.
Answer: C. Seeing a stale value for an unrelated key while still seeing their own actions and causal chains appearing in the correct order.
Causal Consistency is a 'middle-ground' that is stronger than Eventual Consistency but weaker than Linearizability. It guarantees that if event A causes event B, everyone sees A before B. However, it doesn't guarantee a global real-time order for unrelated events. A user might see a stale value for a variable X that they haven't touched, while still seeing the correct latest value for variable Y that they just updated. Linearizability would force every read to see the absolute latest global state.
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?