Cap Theorem medium
Is traditional Active-Passive (Primary-Secondary) replication with async replication CP or AP?
- A It is effectively neither; it risks both data loss (low consistency) and downtime (low availability) during failure.
- B It is strictly CP, as the protocol ensures that no data can ever be lost during a localized server crash.
- C It is strictly AP, prioritizing the ability of the secondary nodes to immediately handle any incoming write traffic.
- D It achieves perfect CA status by utilizing high-speed localized fiber optic links between the primary and secondary.
Answer: A. It is effectively neither; it risks both data loss (low consistency) and downtime (low availability) during failure.
Traditional Master-Slave setups with asynchronous replication often fail to provide the guarantees of either AP or CP. Because replication is 'Async', a primary crash can lead to 'Data Loss' (violating Consistency). Because 'Failover' often takes 30-60 seconds of manual or automated intervention, the system experiences 'Downtime' (violating Availability). It attempts to be CA but often becomes 'the worst of both worlds' during a true network partition.
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?