Intro

CAP theorem constrains behavior during a network partition. PACELC adds the normal case: if there is a partition, choose availability or consistency; else, choose latency or consistency. The model is useful because database configuration changes both failure behavior and everyday request latency.

Operation-first classification

Do not label an entire product CP or AP. Classify an operation and its chosen consistency level.

OperationCorrectness requirementReasonable posture
Reserve inventoryDo not confirm overlapping reservationsQuorum or leader confirmation; reject when safety cannot be proved
Read product recommendationsA stale result is acceptableRead a nearby replica and repair asynchronously
Read own profile after updateThe user should see their writeSession guarantee without global linearizability
Append a ledger entryPreserve ordering and uniquenessStrong write coordination, idempotency, and an authoritative store

Product mappings are configurations

SQL Server Availability Groups with synchronous commit lean toward consistency for protected writes, but failover mode and read routing change operation behavior. Cosmos DB exposes several consistency levels, so the same account can make different latency/freshness choices by configuration. Cassandra quorum values and topology determine whether a request favors local latency, overlap between read/write replica sets, or continued service during failures. Redis used as a cache often accepts staleness because an authoritative database repairs truth.

These are not permanent product labels. Record the concrete topology, quorum, read mode, region, and fallback policy.

Concrete decision

For a multi-region profile service, writes go to the primary region and the writer receives a session token. The next read carries that token, preserving read-your-writes without waiting for every region. Anonymous recommendation reads use the nearest region and tolerate a five-minute freshness window. One product therefore uses two PACELC positions for two operations.

References