CAP Theorem

Pick two from the following:

  • C onsistency - Every read receives the most recent write1
  • A vailability - Every request receives a response
  • P artition Tolerance - The system can function despite partitioning based on network failures

However, the you cannot really elect to have or not have partitions, your system will experience them or it won’t. So then, it becomes a trade off between Consistency and Availability2

Pairings:

CP - Availability is compromised because writes won’t happen unless the partitioned node responds. This is a good choice if you need atomic rads and writes. AP - Consistency is compromised because nodes return the most recent version of the data that they have. AP is a good choice if eventual consistency is allowable and the system needs to function despite errors


References

1.
Sathupadi, K. A plain English introduction to CAP theorem. at http://ksat.me/a-plain-english-introduction-to-cap-theorem (2012).
2.
Robinson, H. The CAP FAQ. at https://github.com/henryr/cap-faq/blob/master/README.md (2013).

Links to this note