liveBook · Manning

Replication lag

Replication lag is the elapsed delay between a change being applied or committed at a source and becoming applied or visible at a replication target.

How 2 Manning books explain it

PostgreSQL Mistakes and How to Avoid Them

Replication lag is the delay between a change being committed on a primary database server and being applied or visible on a replica.

How it is used
Frames replica-read and primary-write patterns as consistency and failover hazards.
How deep it goes
Explains stale-read consequences and WAL timeline divergence, while deferring detailed lag measurement and recovery procedures.
Examples
Uses a delayed standby account balance and promotion of a lagging replica after primary failure.
What you can do after
Evaluate/understand when stale replica reads or lagging promotion can violate consistency and recovery expectations.

Read how PostgreSQL Mistakes and How to Avoid Them explains replication lag →

MongoDB 8.0 in Action, Third Edition

Replication lag is the delay between an operation being recorded or applied on the primary and being applied on a replica.

How it is used
Monitors whether replicas keep pace with primary operations and helps diagnose replication problems.
How deep it goes
Explains topology-related causes and demonstrates status commands, but does not develop a formal lag calculation.
Examples
Uses db.getReplicationInfo() and db.printSecondaryReplicationInfo() outputs showing oplog timing and per-secondary lag.
What you can do after
Diagnose replication status with MongoDB shell commands and identify secondaries that trail the primary.

Read how MongoDB 8.0 in Action, Third Edition explains replication lag →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.