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
140
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CAP Theorem
Michał Łomnicki
November 21, 2012
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
77
[PL] Transakcje w bazach danych
mlomnicki
1
290
Ruby Tricks 2
mlomnicki
3
79
SchemaPlus
mlomnicki
1
49
Other Decks in Technology
See All in Technology
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
はじめてのWDM
miyukichi_ospf
1
130
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
2.3k
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
3
790
キャリアの中で本を作る / Making a Book During Your Career
ak1210
0
130
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
190
生成AIの活用/high_school2026
okana2ki
0
120
知らん間に、回ってる
ming_ayami
0
370
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
12
1.9k
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3k
美しいコードを書くためにF#を学んでみた話
yud0uhu
1
390
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
150
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
360
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Believing is Seeing
oripsolob
1
170
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
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?