Skip to catalogue

101

CAP theorem

During a partition you choose: answer with stale or different data, or stop answering. You do not get both.

What is CAP theorem?

CAP says a distributed store, while the network is split, cannot be both consistent and available. Consistent means every read sees the latest write. Available means every request gets a response. Outside a partition you can have both. The theorem is about the split.

Why does CAP theorem matter when vibe coding?

Models promise “strongly consistent and always up, globally.” That sentence is the bug. Make them pick a side for the partition and write it down.

How do you do CAP theorem?

For each datum, say what a user sees if a region cannot talk to the other: error, or a stale read. Payments and inventory usually prefer the error. Feeds can prefer stale.

How do you ask a model for CAP theorem?

State the CAP choice for (data). During a network partition, either reject writes/reads or serve stale. Do not claim strong consistency and full availability across regions.

What goes wrong with CAP theorem?

Quoting CAP to avoid indexes and transactions on one database. One node is not a partition story.

adjacent