CAP Theorem
Last updated
Last updated
The CAP Theorem is a fundamental principle in distributed computing. It says that a distributed system can only guarantee two out of the following three properties at the same time:
Consistency: Every read gets the most recent write or an error. Imagine a library catalog. If you update a book's location, everyone searching for it should see the new location.
Availability: Every request gets a response without guaranteeing that it contains the most recent write, like a convenience store that's always open but might sometimes run out of your favorite snack.
Partition Tolerance: The system continues to operate despite some messages being dropped (due to network failures). It's like having a team in different rooms; even if the intercom breaks, they keep working with the info they have.
Real-world examples
Social Media
Financial Systems
IoT
eCommerce
CDN (Content Delivery Networks)