Cap Theorem medium
In a CP system (like etcd/Zookeeper), what happens to Availability during a leader election?
- A The entire system becomes either strictly Read-Only or completely Unavailable for all write operations.
- B Availability remains at 100% as the secondary nodes immediately take over all client write traffic.
- C Incoming writes are buffered in high-speed local memory until the consensus group elects a new leader.
- D The system automatically partitions into two independent clusters that each continue to accept writes.
Answer: A. The entire system becomes either strictly Read-Only or completely Unavailable for all write operations.
In CP systems (like etcd, Zookeeper, or MongoDB with majority writes), any write must be serialized by a single Leader. If the Leader fails or is partitioned, the remaining nodes must elect a new Leader to ensure data consistency. During this election process (which can take several seconds), the system cannot reach a consensus, and thus all write operations are blocked. This is a direct sacrifice of Availability to ensure that no conflicting data is ever accepted.
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?