Thiago P.


Written in Systems, Databases

← back to the notes


CAP is a set of principles that a distributed system which storse state can fallow.

It is said that such a system can only choose 2 out of the 3 though some argue that this is only partially true.

One must choose either CP or AP. Partitions, i.e. network failures are unavoidable, and thus must always be included. While a single node in the system may choose CA the entire system as a whole cannot.

Here is an example of choosing CP. For every node in the system to return the most recent response (C), that response must have already propagated to every node in the system. If a client attempts to make a request to a node for which the request has not yet propagated to, then in the CP combination, the system will temporarily become unavailable in order to finish propagating the response.


Base is a set of principals similar to ACID. BASE is looser and less restrictive than ACID and is used by NoSQL databases.