Oriel — AI & technology worth noticing, every day.

Cloud SQL disaster recovery across regions: one approval, a fence, and what eight failovers taught us

Post · https://dev.to/gde/cloud-sql-disaster-recovery-across-regions-one-approval-a-fence-and-what-eight-failovers-taught-222f

A designated DR replica, the write endpoint and a Cloud Workflow in the recovery region. An alert starts it, a person approves it, and the old primary is fenced. Measured in eight failovers and sixteen switchovers.

First seen by Oriel on .

AI summary

The post describes a Cloud SQL for PostgreSQL cross-region disaster-recovery workflow, using human approval, replica promotion, and fencing, with timings and failure lessons from eight failovers and sixteen switchovers.

  • A Cloud Workflows group process selects affected database pairs, requests one operator approval, then promotes each DR replica and stops the old primary.
  • Across eight runs, replica promotion took 61–84 seconds; a real alert-to-writable-primary drill took 1 minute 58 seconds, including scripted approval.
  • An unfenced old primary accepted 3,431 writes after promotion, of which 3,074 were absent from the new primary; stopping it limits split-brain but leaves a nonzero fencing gap.
  • Rebuilding the old primary as a replica took 712–971 seconds, while six switchovers caused 44.1–56.6 seconds of write unavailability and lost no accepted writes.
  • Asynchronous replication can lose writes when lag is nonzero; clients must use Cloud SQL's write endpoint to follow the promoted primary, and alerting requires a metric-absence condition for stopped instances.

#cloud sql #postgresql #disaster recovery #terraform

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Reactions

Total public reactions reported by the source; distinct from points and likes.

  • DEV Community: 20, latest observation ; +5 over observed period since

Comments

Comment count reported by the source.

  • DEV Community: 4, latest observation ; +2 over observed period since

Aliases

SourceExternal IDURL
DEV Community5162423https://dev.to/gde/cloud-sql-disaster-recovery-across-regions-one-approval-a-fence-and-what-eight-failovers-taught-222f Read discussion