Distributed System Basic 101 (CAP, ACID and BASE)

  • by

The fundamental theories of Distributed System are CAP, ACID and BASE:

  1. CAP:
  • Consistency: Every read receives the most recent write or an error.
  • Availability: Every request receives a non error response, without the guarantee that it contains the most recent write.
  • Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped.

Distributed system only provides tow out of three features. So it is often a problem of choosing between consistency and availability. For example DynamoDb choose availability over consistency.

2. ACID:

  • Atomicity
  • Consistency
  • Isolation
  • Durability

ACID is usually mentioned in database transactions. For implementation, often use Two phase locking (2PL) and multiversion concurrency control (MVCC).

3. BASE

  • Basically Available
  • Soft state
  • Eventually consistent

Base is eventual consistency in order to achieve high availability.

This blog introduce three basic models of distributed system: CAP, ACID, BASE. And this blog is a under category of distributed system.