CAP teorem kaže da distribuirani sustav može garantirati najviše dva od tri svojstva — Konzistentnost, Dostupnost i Toleranciju particija — istovremeno. Budući da su mrežne particije neizbježne, pravi izbor je između konzistentnosti i dostupnosti tijekom particije.
Tri svojstva
CONSISTENCY (C) → every read sees the latest write (all nodes agree on the data)
AVAILABILITY (A) → every request gets a response (the system stays responsive)
PARTITION TOLERANCE (P) → the system keeps working despite network partitions
(communication breaks between nodes)
→ CAP: you can only fully guarantee TWO of these three simultaneously.
