A source of truth is the authoritative system from which accepted data values are determined. Assigning that role prevents independently maintained stores from drifting through failed dual writes. section 9.5
Postgres as the authority
Cal.com treats Postgres as the sole source of truth and Redis as disposable cache data. When Redis is stale or missing, the application reads more slowly from Postgres rather than returning an incorrect value, avoiding an outbox or CDC pipeline. section 9.5
Use the pattern to sharpen architectural investigation:
- Identify which store owns accepted data and which stores merely cache, index, or replicate it. section 9.5
- Trace the fallback when a derived store is stale, missing, or unavailable. section 9.5
- Name the consistency promise when concurrent writers race, rather than inferring it from defaults and locks. section 9.5
Table 9.5 What each consistency model promises when two writers race
|
Model
|
What it
promises
|
Examples
|
What it
buys
|
What it
costs
|
|
Linearizable
|
Every read
sees the most recent write, system-wide
|
Single-primary
Postgres/MySQL writes, etcd, Spanner
|
One global
order; the easiest model to reason about
|
Coordination
on every write; the slowest and least available under partition
|
|
Sequential/serializable
|
All clients
see operations in the same order, not necessarily real-time
|
SERIALIZABLE isolation,
FoundationDB
|
Safe
concurrent transactions without manual locking
|
Aborts and
retries under contention
|
|
Read-your-writes
|
You always
see your own writes; others may lag
|
Sticky
sessions to primary, "read from primary after write"
|
A user
never loses their own edit
|
Doesn't
help two different users racing
|
|
Bounded
staleness
|
Reads lag
the truth by at most X seconds
|
DynamoDB
strong-vs-eventual toggle, Cosmos DB tunable
|
Tunable
freshness-vs-cost dial per query
|
You must
pick the bound, and pick wrong somewhere
|
|
Eventual
|
All
replicas converge given no new writes
|
DynamoDB
default reads, Cassandra ONE,
DNS
|
Highest
availability and throughput
|
Stale
reads, lost-update and conflict-resolution headaches
|
Compare consistency models by their guarantees, examples, benefits, and coordination costs. section 9.5












