Fail over a database-backed application between cloud regions by fencing the old primary so it cannot accept writes, promoting a replica of the database in the healthy region, pointing the application at the new primary, and then moving traffic. The database option you choose decides how much data you can lose and whether the application’s endpoint changes.
Disclosure: Control Plane publishes this guide.
TL;DR
Fence the old primary to prevent split-brain, promote the standby database in the healthy region, repoint the application, and shift traffic.
Order of operations matters. Fence before you promote. Promote before you repoint. Repoint before you shift traffic. Each step depends on the one before it.
Pick your database option based on RPO and endpoint behavior. Synchronous or consensus-based systems approach zero data loss but add write latency. Asynchronous systems are simpler but can lose recent transactions on failover.…