Cap Theorem medium
How do Vector Clocks improve upon simple Timestamps (Last-Write-Wins) for conflict resolution?
- A They enable the detection of concurrent writes by tracking causal history, allowing for manual conflict resolution.
- B They consume significantly less storage space and network bandwidth compared to standard 64-bit UTC timestamps.
- C They utilize specialized hardware to synchronize global system time using high-precision atomic clocks.
- D They implement a proactive network health monitor that allows the system to automatically prevent partitions.
Answer: A. They enable the detection of concurrent writes by tracking causal history, allowing for manual conflict resolution.
Simple 'Last-Write-Wins' (LWW) resolution uses physical clocks, which are prone to skew and can silently overwrite valid data. Vector Clocks track logical causality (e.g., [NodeA:1, NodeB:2]). If two versions of data are not causally related, the system identifies them as 'Siblings' (conflicting writes). This prevents silent data loss and allows the application (or user) to merge the changes safely.
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?