शब्दकोश · डेटाबेस

CAP Theorem

The CAP theorem states that a distributed data store facing a network partition must choose between consistency and availability.

अपडेट: अक्टूबर 6, 2026

The CAP theorem says that a distributed data store can provide at most two of three guarantees at once: Consistency, Availability, and Partition tolerance. Since network partitions cannot be ruled out, the real choice during a partition is between consistency and availability.

Why it matters

CAP frames the design trade-offs behind distributed databases. A system that favors consistency (CP) may reject requests while a partition lasts. One that favors availability (AP) keeps answering but may return stale or conflicting data that must be reconciled later. Normal operation without a partition can offer both, so CAP describes behavior under failure.

Example

Two data centers lose their link.
CP choice: the minority side refuses writes -> consistent, less available
AP choice: both sides accept writes     -> available, may diverge

Common mistakes

  • Reading it as "pick any two" at design time. Partition tolerance is not optional in a distributed system.
  • Labeling a whole database CP or AP when many systems let you tune this per operation.
  • Mixing up CAP consistency with the "C" in ACID, which concerns constraints.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.