Traffic and write authority are separate control planes. A DNS change can steer some clients while others retain old connections; a replica promotion can create a new database timeline while old application workers continue using the former primary. A safe sequence gives each transition a measurable gate: stop or fence old writers, select a recoverable replay point, promote once, test the new writer, then route clients and verify outcomes. A provider-specific failover system may implement parts atomically, but the application still needs evidence of the resulting authority.
Failover ordering: fence, promote, validate, then move clients
Operational decision
A reservation API uses an epoch stored outside the impaired database to decide which region may commit. The operator advances that epoch and tests that an old-region worker with the previous token is rejected. The standby's replay position is recorded before promotion; once promoted, a synthetic reservation is written and read back through the new application stack. Only then does the traffic controller favor the standby endpoint. Existing clients may keep old TCP connections or cached DNS answers, so the old region remains fenced and returns a retryable response rather than accepting writes. Watch client error rate, new-region commit rate, and old-region rejected-write count during convergence. If promotion succeeds but edge routing stalls, keep the new writer authoritative and repair routing; do not reopen the old writer to meet a dashboard target. If a probe write cannot be isolated from customer inventory, use a dedicated test tenant and delete it only after retention requirements are checked. Save the exact control-plane operation results and application observations, since a command returning success is weaker evidence than a rejected stale writer and a successful customer-path transaction.
Reservation failover gates
1. Freeze or fence old write authority
2. Record chosen standby replay position
3. Promote one standby and record new epoch
4. Write/read synthetic reservation through app
5. Shift traffic while old endpoint stays fenced
6. Verify old-token rejection and user-path successCost and verification
Each gate adds at least one round trip; the dominant cost is usually replication catch-up, provisioning, and client convergence, not checking the epoch. The system temporarily consumes capacity in both regions. Track rejected stale writes, commits by region and epoch, promotion retries, traffic convergence, and end-to-end transaction success. Never optimize seconds out of the sequence by allowing two writers to overlap without a proven conflict protocol.
Common Mistakes
- Do not treat DNS movement as proof the old writer is disabled.
- Do not retry promotion blindly after an ambiguous timeout.
- Do not send customer writes to the standby before a real application-path check.
Connected lessons
- DevOps: delivery, infrastructure, and reliable operations
- Failover fencing: prevent two writable database leaders
- Leader leases: fence side effects after ownership changes
- DNS negative caching: avoid creating a name after clients already asked for it
- Point-in-time recovery: accept a restored timeline only after business reconciliation
