CAP theorem states: you can have at most 2 of consistency, availability, partition tolerance

Ever wondered why you can't always get the latest news instantly?

Image: Los Alamos National Laboratory, Attribution, via Wikimedia Commons

CAP theorem states: you can have at most 2 of consistency, availability, partition tolerance

Ever wondered why you can't always get the latest news instantly?

Imagine you're trying to watch a live sports game online, but sometimes the video lags or freezes even though your internet is working fine.

The internet is like a sports game broadcast. Sometimes, to keep the video smooth (consistency), you might miss a few seconds (delay), or you might get a video that looks outdated (old data). But if you want to keep watching without interruptions (availability), you have to accept that you might not always see the latest play (old data).

Example

You stream the game, and at one point, you see a replay instead of the live action because the server took a moment to update.

Remember this

The CAP theorem explains why you can't always have the latest news (consistency) and uninterrupted service (availability) at the same time.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath