The CAP theorem is the idea that a distributed computing system is not able to provide partition tolerance, consistency and availability at the same time.
The theory proposes that when a network has been partitioned to ensure that a network failure will not prevent communication between servers, the distributed system must choose between consistency or availability.
The CAP theorem has primarily proven useful for establishing priorities in database server infrastructure and configuration. In such a scenario, it is still possible to achieve both consistency and availability within acceptable parameters. For example, data may be allowed to be inconsistent for short periods of time while new writes propagate throughout the system. Or, critical servers that handle client read/writes may be partitioned in such a way that failures in other sections do not noticeably affect performance for end users.
CAP theorem was developed in 2000 by Eric Brewer.