CAP theorem
Two data centres hold the same data. The link between them breaks. Each must now answer from its own copy, or refuse. CAP is the proof that there is no third way.
prerequisites
- Consistency models planned
mentioned lessons
- Failure detection planned
- Pacelc theorem planned
- Conflict resolution planned
red flags
“CAP means pick two of three.”
Networks fail whether you allow it or not. The only choice is consistency or availability, and only while the link is down.
“Available means the site is up.”
In CAP every running server must answer, even one that can reach no other. A store with
99.99%uptime can fail that.“Every database is CP or AP.”
Many are neither, and one database can choose differently for each request.
after this lesson you can answer
- What do C, A and P mean, exactly?
- Why can't a store stay consistent and available while the link is down?
- “Is this database CP or AP?” Why is that the wrong question?