CAP theorem is also called brewer's theorem. It states that is impossible for a distributed
data store to offer more than two out of three guarantees
1. Consistency
2. Availability
3. Partition Tolerance
Consistency:
The data should remain consistent even after the execution of an operation. This means
once data is written, any future read request should contain that data. For example, after
updating the order status, all the clients should be able to see the same data.
Availability:
The database should always be available and responsive. It should not have any
downtime.
Partition Tolerance:
Partition Tolerance means that the system should continue to function even if the
communication among the servers is not stable. For example, the servers can be
partitioned into multiple groups which may not communicate with each other. Here, if part
of the database is unavailable, other parts are always unaffected.