What is the CAP theorem?
The CAP theorem says that when a network partition occurs, a distributed data store must choose between consistency — every read sees the latest write — and availability — every request gets a non-error response. Partition tolerance is not optional in real networks, so the practical choice is CP or AP behaviour during a partition.