Cap Theorem medium
Your database uses Last-Write-Wins based on client timestamps. What is a major risk?
- A Clock Skew causing silent data loss, where a correct write is overwritten by a stale update with a 'future' timestamp.
- B High memory consumption because the cluster must store a separate index for every millisecond of the system uptime.
- C The creation of permanent deadlocks between nodes that are attempting to synchronize their internal physical clocks.
- D Excessive CPU overhead required to perform high-resolution timestamp calculations during every individual write event.
Answer: A. Clock Skew causing silent data loss, where a correct write is overwritten by a stale update with a 'future' timestamp.
In distributed systems, physical clocks are never perfectly synchronized (Clock Skew). If Node A's clock is 50ms ahead of Node B's, a write to Node A will appear to have happened in the 'future'. A subsequent write to Node B might be discarded by the LWW logic, even though it was the logically correct update. This makes LWW simple and fast (AP), but dangerous for data integrity compared to logical clocks (Vector Clocks).
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?