Cap Theorem hard
In a 3-region Spanner/CockroachDB deployment, why use a 'Witness' replica in the third region instead of a full replica?
- A The Witness node is specifically optimized to serve high-speed local read requests in the third region without any network overhead.
- B The node is used to store high-compression archival backups that can be used to recover the regional cluster after a catastrophic failure.
- C The Witness participates in the Paxos consensus quorum to ensure availability during a region failure but stores no actual business data.
- D The Witness node significantly increases total system write throughput by sharing the computational load of the primary leader node.
Answer: C. The Witness participates in the Paxos consensus quorum to ensure availability during a region failure but stores no actual business data.
A Witness (or Tiebreaker) is a low-cost node that helps maintain a majority (Quorum) for the cluster. In a 3-region setup, if Region A fails, the nodes in Region B and the Witness in Region C form a majority (2 of 3), allowing the system to continue accepting writes (CP-Availability). Since the Witness doesn't store data, it saves significant storage costs, though it cannot serve reads to users in its own region.
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?