Moving a production database between regions is one of the riskiest operations in infrastructure. A single misstep can mean minutes of downtime and unhappy users. Over the past year we have refined a process that lets us migrate PostgreSQL and MySQL clusters with zero dropped requests.
The first step is to establish streaming replication between the source and the new destination. This lets the new node catch up continuously without any impact on the primary.
Instead of a hard switch, we enable a short dual-write window. Application traffic continues to hit the source while writes are mirrored to the destination. This keeps both sides in sync until the final promotion.
Finally, we promote the destination to primary, repoint the application, and verify replication lag is at zero before tearing down the old node. The entire cutover completes in seconds.
Want the full runbook? Talk to our team.