Skip to content
Library/Core Concepts
Trade-offs

CAP Reasoning

1 min read

Explicitly state your availability vs consistency choice and justify it for the use case.

State your consistency vs availability choice explicitly and justify it for the specific use case.

How It Works

The CAP theorem states that during a network partition, a distributed system must choose between Consistency and availability. In practice, the real choice is CP (consistent but may reject requests — banking, inventory) or AP (available but may return stale data — social feeds, caches). In interviews, state your choice and why.

Real-World Example

Google Spanner chose CP with extremely high availability through synchronized clocks (TrueTime). By keeping clock uncertainty below 7ms, Spanner commits transactions across regions with strong consistency. This is justified for Google's advertising billing system where financial consistency is non-negotiable.

Test Yourself

For an inventory management system, would you choose CP or AP? Why?

Get notified when we launch

One email when the full practice product is live. No spam.