The CAP theorem says that in a distributed system you can’t fully guarantee Consistency, Availability and Partition tolerance at the same time. When a network partition happens, the system must choose between staying consistent or staying available.