CAP theorem ระบุว่าระบบกระจาย (distributed system) สามารถรับประกันคุณสมบัติได้มากที่สุด สองในสาม อย่าง — Consistency, Availability และ Partition tolerance — ในเวลาเดียวกัน เนื่องจาก network partition เป็นสิ่งที่หลีกเลี่ยงไม่ได้ ทางเลือกที่แท้จริงจึงอยู่ระหว่าง consistency และ availability ในช่วงที่เกิด partition
คุณสมบัติทั้งสาม
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.
