Menu

How to Fail Over a Database-Backed Application Between Cloud Regions: Database Options Compared and a Step-by-Step Runbook
📰

How to Fail Over a Database-Backed Application Between Cloud Regions: Database Options Compared and a Step-by-Step Runbook

DEV Community: postgres·Noah Grinstein·about 19 hours ago
#CdhhPhLo
#devtopostgresql#devto#dev#region#failover
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.