Learn vocabulary for communicating database replication: lag, read replicas, consistency trade-offs, and failover.
0 / 5 completed
1 / 5
What is 'replication lag' in database vocabulary?
Replication lag is the delay between a write committed on the primary and the same write being visible on read replicas. In asynchronous replication, replicas may lag by milliseconds to seconds depending on write volume and network conditions. High lag means replicas serve stale data.
2 / 5
What is 'read replica' in database architecture vocabulary?
A read replica is a continuously replicated copy of the primary that can serve SELECT queries. Applications route reads to replicas (reducing primary load) and writes to the primary. The trade-off: reads from replicas may be slightly stale due to replication lag.
3 / 5
What is 'eventual consistency' in the context of database replication?
Eventual consistency: if no new writes occur, all replicas will eventually converge to the same state. In practice, this means reads from replicas may return older data. Applications must be designed to tolerate stale reads or use techniques like read-your-writes consistency routing.
4 / 5
What is a 'failover' in database replication vocabulary?
Failover is the process of making a replica the new primary after primary failure. Automatic failover (e.g., PostgreSQL with Patroni, MySQL Group Replication) detects failure and promotes a replica within seconds. Manual failover requires operator intervention. RTO (Recovery Time Objective) measures how fast failover must complete.
5 / 5
What is 'replication slot' in PostgreSQL vocabulary?
A PostgreSQL replication slot tracks a replica's replication progress and retains WAL segments until the replica has consumed them. Risk: if a replica falls far behind or disconnects permanently, the slot causes unbounded WAL accumulation on the primary — a common cause of disk exhaustion.