A copy is useful only with an acknowledgement and read policy#
Replication maintains additional copies for read capacity, availability, geographic serving, fault tolerance, or durability under a stated failure model. It does not automatically provide all of them.
Synchronous versus asynchronous acknowledgement#
| Mode | Write acknowledgement | Pressure |
|---|---|---|
| Synchronous | Waits for configured replica acknowledgement | More latency and dependency on replica health |
| Asynchronous | Leader can acknowledge before followers catch up | Lag and a potential loss window under some failures |
Exact durability and consistency depend on how many replicas acknowledge, where they are, what is persisted, and how failures are recovered. Avoid absolute claims based on “sync” alone.
Replication lag becomes product behavior#
Read-your-writes can be provided by temporarily routing that user to the leader, using a session/version token, applying affinity, or choosing a lag-aware replica. Each option changes load and complexity.
Failover is a transition, not a checkbox#
Detect leader failure, choose and promote an eligible replica, redirect writers, and prevent conflicting leaders where the design requires one. Keep consensus mechanics for the later Reliability section, but state the split-brain risk.
Multi-leader replication can reduce regional write latency, while introducing conflict detection/resolution and substantial operational complexity. Use it for a demonstrated multi-region write requirement, not by default.
- Adding read replicas without discussing stale reads.
- Assuming replicas protect against application deletes or corrupted writes.
- Calling failover instant without a detection and promotion path.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- What happens immediately after a write?
- What if the leader fails?
- Which replicas acknowledge?
- How would multiple regions change latency and conflicts?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- PostgreSQL warm standby and replicationPostgreSQL Documentation