The CAP theorem is a fundamental principle in distributed systems stating that a networked shared-data system can guarantee only two of three properties: Consistency (all nodes see the same data simultaneously), Availability (every request receives a non-error response), and Partition tolerance (the system continues operating despite network failures that split nodes). Formulated by computer scientists Eric Brewer and later formally proven, it establishes that during a network partition, a system designer must choose between consistency and availability, as both cannot be maintained.
