Operations, Security & Reliability

Replication and Read Scaling

Replication maintains additional copies by shipping physical changes or logical data operations; topology, acknowledgement policy, lag, conflicts, and routing determine durability and read semantics, while independent backups remain necessary.
  • Physical and logical replication copy different abstractions.
  • Synchronous and asynchronous describe acknowledgement, not freshness forever.
  • Lag has several stages.
  • Read replicas weaken session expectations unless routing repairs them.
  • Replicas have conflicts and backpressure.
  • Replication is not backup.
Read-scaling topology and positions
Topology trade-offs
ChoiceBenefitFailure/semantic cost
Physical async standbylow primary wait; close copyrecent acknowledged loss and stale reads
Physical sync standbystronger configured durability evidencewrite latency; unavailable acknowledgement set can stall/fail writes
Logical subscriberselective data/version flexibilityDDL/sequence/identity/conflict management
Read routingoffloads eligible readsstaleness, monotonicity, replica conflict
Delayed replicatime to notice destructive writesnot immutable; operational lag and promotion complexity
Read-your-writes routing contract
commit write on primary -> receive durable commit position token L
for a dependent read:
  if chosen replica visible_position >= L: read replica
  else wait only within request freshness budget
  if budget expires: route primary or return explicit stale/unavailable result
never infer freshness from wall-clock delay alone
record route, required position, observed position, and wait duration