CAP ਪ੍ਰਮੇਯ ਕਹਿੰਦਾ ਹੈ ਕਿ ਇੱਕ ਵਿਤਰਿਤ ਪ੍ਰਣਾਲੀ ਵੱਧ ਤੋਂ ਵੱਧ ਦੋ ਵਿੱਚੋਂ ਤਿੰਨ ਗੁਣ — Consistency, Availability, ਅਤੇ Partition tolerance — ਇੱਕੋ ਸਮੇਂ ਗ੍ਰਹਿਣਸ਼ੀਲ ਕਰ ਸਕਦੀ ਹੈ। ਕਿਉਂਕਿ ਨੈਟਵਰਕ ਭਾਗਿਆਂ ਤੋਂ ਬਚਣਾ ਅਸੰਭਵ ਹੈ, ਅਸਲ ਵਿਕਲਪ ਇੱਕ ਭਾਗ ਦੌਰਾਨ consistency ਅਤੇ availability ਵਿਚਕਾਰ ਹੈ।
ਤਿੰਨ ਗੁਣ
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.
