🏗️CAP Theorem
Also known as CAP, Brewer's Theorem, Consistency Availability Partition Tolerance
When a network splits, a system must give up one of two things.
Think of it like
Think of it like two shop tills that lose their link. Either they stop selling, or they risk selling the last item twice.
Example
Lucy's bank app loses the link between its two data centers. It picks C over A. Some customers see an error for a minute, but no balance is ever wrong.
Why it matters
It explains why some databases refuse writes in a crisis. Others take them and fix things up later.
Definition
Common mistake
Key takeaways
- 1Consistency. Every read is up to date.
- 2Availability. Every request is answered.
- 3Choose during a split. You cannot have both.