CAP theorem

Formulated in 2000 and proven in 2002 there are actually 2 theorems depending on whether the system is asynchronous or partially synchronous. The practical rules proven by CAP are:

  1. Only 2 properties from (availability, consistency and partition tolerance) can be achieved
  2. A scalable system must be partition tolerant. Scalable => many machines => probability of Failures increases. A consistent and available system is not indefinitely scalable

Consistency models

In order to have a scalable and available system the following consistency models may be chosen

Parameters of a distributed data store

In a model were each data is stored in several nodes (each has a copy reflecting the value at some point) there are 3 parameters that determine the consistency of the system :

  1. N number of nodes sharing a copy of the data
  2. W number of nodes that have written the same new value of a data before the write returns as successful to the client
  3. R number of nodes queried for the data when a client attempts a single read on that data