Classify DynamoDB, Spanner and Cassandra under PACELC, and say which half of the classification you would actually design around.
Show the full answer Hide the answer
The classifications
| Store | Partition | Else | Why |
|---|---|---|---|
| DynamoDB (default reads) | PA | EL | Serves from any replica; eventually consistent reads avoid a quorum round trip |
| Cassandra (typical tuning) | PA | EL | Tunable, but the common LOCAL_ONE/LOCAL_QUORUM setup favours latency |
| Spanner | PC | EC | TrueTime plus Paxos; every write commits through a quorum, reads are externally consistent |
| MongoDB (majority write concern) | PC | EC | Majority acknowledgement on write, primary reads by default |
Which half matters
The E half — almost always.
A partition is a rare event. Whether every read costs a quorum round trip is a cost paid on every request, forever. A system labelled "CP" tells you nothing about that, which is why CAP alone is a poor selection criterion.
Concretely: Spanner's consistency is genuinely useful and it is paid for in write latency measured in tens of milliseconds even within a region, because commit waits out clock uncertainty. DynamoDB's eventually consistent read is roughly half the cost of its strongly consistent one and returns in single-digit milliseconds. Neither is better; they price different things.
What I would actually do
Choose per operation, not per system, and pick a store that lets you.
DynamoDB is instructive here: the same table serves both, per request. Balance check before a withdrawal — strongly consistent read. Rendering the user's transaction history — eventually consistent, half the price, and nobody notices two hundred milliseconds of staleness.
Cassandra's per-query consistency levels do the same thing. Spanner does not offer the cheap option in the same way, which is a real cost of choosing it.
What a strong answer adds
Naming the session guarantees as the middle ground that resolves most complaints without global strong consistency: read-your-writes and monotonic reads, usually achievable with session-sticky routing. Most people asking for strong consistency want one of those two, applied to one flow.