Twierdzenie CAP stwierdza, że rozproszony system może gwarantować co najwyżej dwie z trzech właściwości — Consistency (Spójność), Availability (Dostępność) i Partition tolerance (Tolerancja podziału) — jednocześnie. Ponieważ podziały sieciowe są nieuniknione, rzeczywisty wybór jest między spójnością a dostępnością podczas podziału.
Trzy właściwości
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.
