'AWS - DMS for Postgres RDS cutover strategy
To prepare for our Postgres to Postgres migration we have configured a DMS task and a target DB with migrations pre applied.
We tested DMS and a cutover to our new database in a test environment. Everything worked well.
However in our pre prod environment we experienced consistent load. DMS failed due to a foreign key constraint as we cut over to the new database using a 50% traffic shifting canary deployment. Not only that, internal clients started seeing errors too when writing to our new database (we believe it's defunct data being the cause)
Questions:
- to cut over safely should we turn off the api for a minute (planned outage) whilst DMS finishes replication?
- if we used code deploy "AllAtOnce" instead of a 50% canary is that safe enough of a cutover and we don't need a planned outage? It looks like for previous migrations engineers did this without an outage, but we are a bit spooked after the pre prod issue
- is there a better way to do this? E.g simulate load in test environments and attempt the code deploy all at once to see if DMS remains okay during the 100% immediate traffic shift window
Thank you for any help or advice
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|