CAP theorem trade of Flashcards
What is CAP theorem
CAP theorem: 3 Commonly desirable properties in any highly distributed data system.
What does CAP stand for?
C : Consistency (replicas immediately updated)
A : Availability (no received request is lost)
P : Partition Tolerance (system continues to operate, even if a node fails)
CAP: Consistency and Availability
- Trade-off: The system may struggle during network problems.
- Reason: The system ensures data is consistent and always responds, but might face issues if network
failures occur, potentially causing parts of it to stop working.
CAP: Availability and Partition Tolerance
- Trade-off: Data might not be immediately consistent.
- Reason: The system stays operational and responsive even if parts of the network fail, but users might
see outdated data temporarily.
CAP: Consistency and Partition Tolerance:
- Trade-off: The system might not always be available.
- Reason: The system prioritizes making sure all parts have the same data, which may delay or prevent
some requests from being fulfilled instantly.
Base
Most chose to give up some consistency to ensure they remain available and partition tolerant. For example,
online shopping sites might allow a small delay in data consistency so that they can handle lots of users and
keep the site running smoothly even if some parts of the system are temporarily down.
This approach led to models like BASE (Basically Available, Soft state, Eventually consistent), where data
updates eventually spread through the system, but not instantly.