Consistency
Every read sees the latest write, or gets an error.
Example
You transfer $100 and check your balance: with consistency you see the $100 gone, or an error, but never the old balance.
Test yourself: Consistency
Scaling
Why can scaling horizontally give inconsistent data?
With 5 machines, for a few seconds 1 may have the new data and 4 the old.
CAP theorem
There are 3 nodes. When does a write count as successful with consistency?
With consistency, the data reaches all 3 nodes before confirming: any of them returns the same.
0/2
â–¶ PlayLessons that use it
Scaling
Bigger or more machines
Databases
Where data is kept
SQL databases
Tables that relate
Normalize and denormalize
Each piece of data in one place
ACID and BASE
Two promises about data
CAP theorem
Pick 2 of 3
PACELC theorem
CAP plus latency
Monoliths and microservices
1 block or many pieces
Requirements and estimates
Ask before you draw
