CAP Theorem in Interviews
State CAP theorem carefully and give a real system example of CP vs AP choice.
Answers use simple, clear English.
Quick interview answer
In a partition, a distributed system cannot be both fully available and fully consistent — you trade. CP example: strongly consistent config store that refuses writes on minority partition. AP example: DNS/eventual caches that keep answering possibly stale data.
Detailed answer
In a partition, a distributed system cannot be both fully available and fully consistent — you trade. CP example: strongly consistent config store that refuses writes on minority partition. AP example: DNS/eventual caches that keep answering possibly stale data. Most databases offer tunable consistency; CAP is a lens, not a product label.
Real example & use case
During AZ network split, a CP leader election system blocks writes on the minority side rather than diverge.
Pros & cons
Pros of discussing CAP: shows distributed literacy. Cons: oversimplified slogans without mentioning latency and PACELC.