System Design
18. Advanced Distributed ArchitectureAnimated
Conflict-Free Replicated Data Types (CRDTs)
Data that merges automatically.
The idea
Operations or states are designed so replicas always converge without coordination.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Each replica accepts writes locally, even offline.
- step:
- 1/4
- at:
- Replica A
1/7
The green dot is a request moving through the system.
Step by step
- 1Each replica updates locally
- 2Replicas exchange state or ops
- 3Merge is commutative and idempotent
- 4All converge
Where it is used
Collaborative editing and counters.
Watch out for
Metadata growth.