Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CAP Theorem
Search
Michał Łomnicki
November 21, 2012
Technology
2
130
CAP Theorem
Michał Łomnicki
November 21, 2012
Tweet
Share
More Decks by Michał Łomnicki
See All by Michał Łomnicki
DDD, Rails and persistence
mlomnicki
1
280
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
130
Having fun with legacy apps
mlomnicki
1
67
[PL] Transakcje w bazach danych
mlomnicki
1
260
Ruby Tricks 2
mlomnicki
3
73
SchemaPlus
mlomnicki
1
44
Other Decks in Technology
See All in Technology
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.4k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
160
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
150
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
110
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.2k
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.8k
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Deep Space Network (abreviated)
tonyrice
0
47
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
For a Future-Friendly Web
brad_frost
182
10k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Done Done
chrislema
186
16k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
49
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
180
Testing 201, or: Great Expectations
jmmastey
46
8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
CAP Theorem The art of choice @mlomnicki
CAP Theorem by Eric Brewer in 2000 Proven in 2002
by Seth Gilbert & Nancy Linch
CAP Theorem Consistency Availability Partition tolerance At most 2 of
3 properties may be satisfied
CAP Theorem
RDBMS (single-site and cluster) Consistency Availability Partition tolerance
Distributed RDBMS Consistency Availability Partition tolerance
NoSQL Consistency Availability Partition tolerance ...also DNS is AP
BigTable Consistency Availability Partition tolerance P is on GFS side
Prevayler/Madeleine Consistency Availability Partition tolerance
NewSQL Consistency Availability Partition tolerance Impossible according to the theory
...but Stonebraker doesn't agree
Real life stories
What you think you have
What you really have
..to be fair
The art of choice Scalability over Consistency Consistency over Scalability
Forfeit Partition Tolerance Consistent system - easy High Availability -
hard known & proven HA workarounds Facebook - MySQL + memcache Vertical scalability
Forfeit Consistency High Availability Horizontal scalability - better "Eventually consistent"
(BASE) HA = race conditions workarounds?
What you need Extremely efficient Reliable (in data sense)
ACID Atomicity Consistency Isolation Durability
BASE Basically Available Soft state Eventual consistency
ACID people don't care ...but think data is consistent anyway
you can't enforce consistency at ActiveRecord level
BASE consistency relaxed to make horizontal scalability easier inconsistencies handled
by developer
beware of vendors they don't always tell the truth NoSQL
is never ACID-compilant NoSQL - lack of atomic operations across documents/collections Prevayler - poor isolation HBase - poor durability
SQL is ACID except MySQL with MyISAM MVCC over locking
but must follow the rules foreign keys, unique indexes transaction isolation levels
Links CAP preso CAP proof CAP explained CAP and NoSQL
Comparision Stonbraker on CAP Sharding limits more on CAP
Questions?