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
69
[PL] Transakcje w bazach danych
mlomnicki
1
270
Ruby Tricks 2
mlomnicki
3
73
SchemaPlus
mlomnicki
1
46
Other Decks in Technology
See All in Technology
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
4
1.9k
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
250
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
340
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
130
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
250
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
150
Kiro Meetup #7 Kiro アップデート (2025/12/15〜2026/3/20)
katzueno
1
180
Kiroで見直す開発プロセスとAI-DLC
k_adachi_01
0
110
システム標準化PMOから ガバメントクラウドCoEへ
techniczna
1
160
Phase04_ターミナル基礎
overflowinc
0
1.1k
Phase11_戦略的AI経営
overflowinc
0
700
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
220
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Rails Girls Zürich Keynote
gr2m
96
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The untapped power of vector embeddings
frankvandijk
2
1.6k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
300
Writing Fast Ruby
sferik
630
63k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
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?