CAP

1. Basics

Distributed Systems: Applies to systems that run on multiple computers connected over a network.

2. The Tradeoff

You can only guarantee two out of three properties:

  • Consistency (C): Everyone sees the same data at the same time.
  • Availability (A): The system is always up and running, even with some failures.
  • Partition Tolerance (P): The system keeps working even if network problems split it into parts.

Network Problems are unavoidable, so partition tolerance is a must.

3. The Choice

Have to choose between consistency and availability when network problems happen:

  • CP Systems: Prioritize consistency, may become unavailable during problems.
  • AP Systems: Prioritize availability, may show outdated data during problems.
Tags::cs: