← Writing
2024-02Systems1 min

The CAP Theorem as a Life Metaphor.

You can't have Consistency, Availability, and Partition Tolerance all at once. Pick two. In distributed systems, as in relationships, you're always trading off between staying in sync, being present, and handling disconnection gracefully.

The CAP theorem states that a distributed data store can provide at most two of three guarantees: Consistency, Availability, and Partition tolerance. Since network partitions are a fact of life, the real choice is usually between consistency and availability when things go wrong.

The three guarantees

Consistency means every read receives the most recent write. Availability means every request receives a response, without guarantee that it contains the most recent write. Partition tolerance means the system continues to operate despite messages being dropped between nodes.

You don't get to avoid partitions. You only get to choose how you behave when one happens.

Relationships operate under the same constraint. When communication breaks down—the partition—you either insist on staying perfectly in sync before acting (consistency, at the cost of being unreachable) or you keep responding and reconcile the differences later (availability, at the cost of temporary disagreement). Neither is wrong. But you can't have both during the partition.