As asked
Explain the CAP theorem in concrete terms. Give an example of a real system that chooses AP and one that chooses CP, and explain what each gives up.
Sample answer outline
The candidate should explain that during a network partition you can choose consistency (returning an error if the node cannot confirm the latest state) or availability (returning a potentially stale response). AP example: Cassandra and DynamoDB (eventual consistency, always available). CP example: etcd and ZooKeeper (consistent, reject writes if quorum is lost). They should also mention that PACELC extends CAP to describe the latency versus consistency tradeoff in the normal (no-partition) case.
Expect these follow-ups
- What does eventual consistency actually mean in practice for a user reading their own writes?
- How does the PACELC model extend CAP theorem?