<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3" -->

---
title: Davide's Code and Architecture Notes - CAP Theorem: it's...
description: An explanation of the CAP theorem that goes beyond the common 'pick two' simplification. It defines Consistency, Availability, and Partition tolerance, walks...
canonical: https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two» | daily.dev
og:description: An explanation of the CAP theorem that goes beyond the common 'pick two' simplification. It defines Consistency, Availability, and Partition tolerance, walks...
og:url: https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3
og:image: https://api.daily.dev/og/posts/eJs2NFDK3.png
og:image:alt: Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two»
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.

# Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two»

**[Code4IT](https://daily.dev/sources/code4it)** · 9 min read · 0 upvotes · 0 comments

## Summary

An explanation of the CAP theorem that goes beyond the common 'pick two' simplification. It defines Consistency, Availability, and Partition tolerance, walks through CP and AP tradeoffs with concrete node-sync examples, explains why CA cannot exist since network partitions are unavoidable, and argues the real choice is a spectrum of consistency and availability levels rather than a binary pick.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.code4it.dev/architecture-notes/cap-theorem>

## Questions this post answers

### What is the difference between CP and AP systems in the CAP theorem?

A CP system sacrifices availability, returning an error instead of stale data when a network partition prevents synchronization, and typically uses the ACID consistency model so transactions either complete on every node or roll back. An AP system sacrifices strong consistency, always returning a value even if outdated, typically using the BASE model (basically available, soft state, eventually consistent), common in non-relational databases.

_daily.dev helps engineers weighing CP versus AP tradeoffs find deeper distributed systems guidance._

### Why can't a distributed system have both consistency and availability without partition tolerance?

Because network partitions cannot be avoided with current technology, so every distributed system must deal with them, making the CA combination (consistency and availability without partition tolerance) impossible in practice. Only CP (consistency plus partition tolerance) or AP (availability plus partition tolerance) are realistically achievable, so picking is really between those two, not three options.

_Developers designing resilient systems can track distributed systems fundamentals like this on daily.dev._

## 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
- [Navigating the Distributed Systems: My Takeaways from MIT 6.824](https://daily.dev/posts/navigating-the-distributed-systems-my-takeaways-from-mit-6-824-vl2kd2mpf) · Medium · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3)

```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":"TechArticle","headline":"Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two»","url":"https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3"},"datePublished":"2026-10-04T13:07:16.344Z","dateModified":"2026-10-04T13:15:34.157Z","description":"An explanation of the CAP theorem that goes beyond the common 'pick two' simplification. It defines Consistency, Availability, and Partition tolerance, walks...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e735dd535984c3ee04e7d2050dedf24b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e735dd535984c3ee04e7d2050dedf24b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Code4IT","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Code4IT","logo":"https://media.daily.dev/image/upload/s--OaaG4G10--/f_auto,q_auto/v1791119049/logos/code4it?_a=BAMAMicg0","url":"https://daily.dev/sources/code4it"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,database,distributed-systems","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Code4IT","item":"https://daily.dev/sources/code4it"},{"@type":"ListItem","position":3,"name":"Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two»"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/davide-s-code-and-architecture-notes---cap-theorem-it-s-not-just-pick-two--ejs2nfdk3#faq","mainEntity":[{"@type":"Question","name":"What is the difference between CP and AP systems in the CAP theorem?","acceptedAnswer":{"@type":"Answer","text":"A CP system sacrifices availability, returning an error instead of stale data when a network partition prevents synchronization, and typically uses the ACID consistency model so transactions either complete on every node or roll back. An AP system sacrifices strong consistency, always returning a value even if outdated, typically using the BASE model (basically available, soft state, eventually consistent), common in non-relational databases. daily.dev helps engineers weighing CP versus AP tradeoffs find deeper distributed systems guidance."}},{"@type":"Question","name":"Why can't a distributed system have both consistency and availability without partition tolerance?","acceptedAnswer":{"@type":"Answer","text":"Because network partitions cannot be avoided with current technology, so every distributed system must deal with them, making the CA combination (consistency and availability without partition tolerance) impossible in practice. Only CP (consistency plus partition tolerance) or AP (availability plus partition tolerance) are realistically achievable, so picking is really between those two, not three options. Developers designing resilient systems can track distributed systems fundamentals like this on daily.dev."}}]}
```

