<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cap-theorem-wwjvmwlxj" -->

---
title: CAP Theorem | daily.dev
description: CAP theorem explained through the example of a like count showing different values on two devices due to a network partition. When a network split happens,...
canonical: https://daily.dev/posts/cap-theorem-wwjvmwlxj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: CAP Theorem | daily.dev
og:description: CAP theorem explained through the example of a like count showing different values on two devices due to a network partition. When a network split happens,...
og:url: https://daily.dev/posts/cap-theorem-wwjvmwlxj
og:image: https://api.daily.dev/og/posts/wwjVmwlXJ.png
og:image:alt: CAP Theorem
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CAP Theorem

**[KodeKloud's Squad](https://daily.dev/sources/kodekloud)** · [@kodekloud](https://daily.dev/kodekloud) · 1 min read · 21 upvotes · 1 comments

## Summary

CAP theorem explained through the example of a like count showing different values on two devices due to a network partition. When a network split happens, systems must choose availability (show a possibly stale answer immediately) or consistency (wait until certain). Social platforms like Instagram, X, and YouTube favor availability since stale counts are low-risk, while banks and ticketing systems favor consistency since stale data can cause real harm. The core argument is that this tradeoff is a product decision, not a database configuration detail: teams should first ask how wrong a value can be and for how long before choosing a datastore.

## Content

You tap ❤️ on a photo. The count goes to 101.

Your friend opens the same photo two seconds later and sees 100. Nothing is broken. Two servers just lost contact for a moment, and the app had to pick one of two answers:
→ Show something now, and fix it in a second.
→ Show nothing until it's certain.

That's the whole CAP theorem. When the network splits, and it always eventually splits, you choose availability or consistency. You don't get both.

Instagram, X, YouTube choose AP. A stale like count costs you nothing.
Banks, ticketing, checkout choose CP. A stale balance costs you a lawsuit.

The trap I see most in design reviews: engineers treat this as a database config question. It isn't. It's a product question. "How wrong can this number be, for how long, before the user gets hurt?" Answer that first, then pick the datastore. Your likes can wobble. Your money never does.

What's your system - AP or CP? And does your team actually agree on the answer? 👇

[**hashtag#CapTheorem**](https://www.linkedin.com/search/results/all/?keywords=%23captheorem&origin=HASH_TAG_FROM_FEED) [**hashtag#SystemDesign**](https://www.linkedin.com/search/results/all/?keywords=%23systemdesign&origin=HASH_TAG_FROM_FEED) [**hashtag#BackendDevelopment**](https://www.linkedin.com/search/results/all/?keywords=%23backenddevelopment&origin=HASH_TAG_FROM_FEED) [**hashtag#DevOps**](https://www.linkedin.com/search/results/all/?keywords=%23devops&origin=HASH_TAG_FROM_FEED) [**hashtag#CloudComputing**](https://www.linkedin.com/search/results/all/?keywords=%23cloudcomputing&origin=HASH_TAG_FROM_FEED) [**hashtag#Databases**](https://www.linkedin.com/search/results/all/?keywords=%23databases&origin=HASH_TAG_FROM_FEED)

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> I tolerate stale likes much better than stale bank balances

## Similar posts on daily.dev

- [Understanding the CAP Theorem: Consistency, Availability, and Partition Tolerance in System Design](https://daily.dev/posts/understanding-the-cap-theorem-consistency-availability-and-partition-tolerance-in-system-design-2k0fwmfcf) · freeCodeCamp · 3 upvotes · 0 comments
- [Copying data is not an anti-pattern. Copying data without a strategy is.](https://daily.dev/posts/copying-data-is-not-an-anti-pattern-copying-data-without-a-strategy-is--f86im5ezw) · ITNEXT · 1 upvotes · 0 comments
- [A Product Data Scientist’s Take on LinkedIn Games After 500 Days of Play](https://daily.dev/posts/a-product-data-scientist-s-take-on-linkedin-games-after-500-days-of-play-mgyx7uo3k) · Towards Data Science · 0 upvotes · 0 comments
- [Two ways to measure the cumulative impact of experiments](https://daily.dev/posts/two-ways-to-measure-the-cumulative-impact-of-experiments-3tqdh1srd) · Datadog · 0 upvotes · 0 comments

---

Tags: [#career](https://daily.dev/tags/career), [#distributed-systems](https://daily.dev/tags/distributed-systems)

[View this post on daily.dev](https://daily.dev/posts/cap-theorem-wwjvmwlxj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/cap-theorem-wwjvmwlxj","headline":"CAP Theorem","text":"CAP theorem explained through the example of a like count showing different values on two devices due to a network partition. When a network split happens, systems must choose availability (show a possibly stale answer immediately) or consistency (wait until certain). Social platforms like Instagram, X, and YouTube favor availability since stale counts are low-risk, while banks and ticketing systems favor consistency since stale data can cause real harm. The core argument is that this tradeoff is a product decision, not a database configuration detail: teams should first ask how wrong a value can be and for how long before choosing a datastore.","url":"https://daily.dev/posts/cap-theorem-wwjvmwlxj","datePublished":"2026-08-19T06:17:06.391Z","dateModified":"2026-09-13T21:32:02.483Z","author":{"@type":"Person","name":"KodeKloud","url":"https://daily.dev/kodekloud","image":"https://media.daily.dev/image/upload/s--9AGXcZfF--/f_auto/v1750311111/avatars/avatar_PxTFk9jg2nhghlt9fcpi8?_a=BAMClqZW0","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":930}},"image":"https://media.daily.dev/image/upload/s--2JUqULr2--/f_auto/v1787120226/posts/wwjVmwlXJ?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":21},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"comment":[{"@type":"Comment","text":"I tolerate stale likes much better than stale bank balances","datePublished":"2026-08-27T19:57:57.981Z","url":"https://daily.dev/posts/wwjVmwlXJ#c-NPjQs4lQi","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/kodekloud","name":"KodeKloud's Squad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"KodeKloud's Squad","item":"https://daily.dev/squads/kodekloud"},{"@type":"ListItem","position":3,"name":"CAP Theorem"}]}
```

