Data & storage · Intermediate · 10 min

CAP & Consistency

Specify observable histories instead of treating consistency as a single switch.

STEP 1 / 11
Keep copies in two regions — isometric concept diagramConsistency is a contract about observed operations. Components: 1. Regional client. Representative clients, not a literal user count; 2. Replica A. Durable or explicitly scoped state. Connections: 1. Regional client to Replica A: Keep copies in two regions; 2. Replica A to Regional client: Reply: Replica A. Illustrations are conceptual, not deployed capacity or user counts.Regional client → Replica A: Keep copies in two regions1Replica A → Regional client: Reply: Replica A2Regional client: representative traffic illustration; figure count is not a workload measurement.1Regional clientRepresentative clients, not aliteral user countReplica A: Durable or explicitly scoped state2Replica ADurable or explicitly scoped state
1Regional client2Replica A
  1. 1Regional client → Replica ARequestKeep copies in two regions
  2. 2Replica A → Regional clientReplyReply: Replica A

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Regional client + Replica A highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • Use a precise consistency requirement for the operation.
  • A partition forces an observable availability trade-off for the chosen operation.
  • The product must define its partition behavior.

PUT THE IDEA TO WORK

From learning to practice

RELATED PATTERNS

Explore architecture patterns ↗

Further reading

Jepsen · Consistency models ↗