CAP theorem
Let's learn about the CAP theorem and its properties in this lesson.
The CAP theorem was originally stated by Brewer , introduced as a trade-off between consistency, availability, and partition tolerance.
CAP properties of distributed shared-data systems
There are three desirable properties when designing distributed shared-data systems:
- Consistency
- Availability
- Partition tolerance
Consistency
All nodes in a distributed network have a single actual replica of data, meaning “all nodes in the system agree on the current state of the system.”
Availability
“The system is operational and instantly processing incoming requests”.
This property guarantees high availability of data, i.e., every request receives a response.
Partition tolerance
“Partition tolerance is the ability of distributed systems to continue operating correctly even in the presence of a network partition.”
Network partitions occur when a network splits into several parts that cannot communicate with each other. Hence, the partition tolerance also allows the system to continue to operate correctly if a group of nodes fails, despite arbitrary message loss or failure of a part of the system (
Get hands-on with 1400+ tech skills courses.