Cutover Nights Without the 2am Panic
Dual-write data patterns, pre-flight rehearsal drills, and the hard rollback decision tree I print and tape to the wall during production cutovers.
Dual-write data patterns, pre-flight rehearsal drills, and the hard rollback decision tree I print and tape to the wall during production cutovers.
A calm cutover is an engineering achievement built on dry runs and predetermined exit criteria.
We’ve all lived through the classic migration nightmare: the clock hits 02:30 AM on a Saturday, a script fails halfway through database index rebuilding, the lead DBA hasn't slept in twenty hours, and nobody knows whether to push forward or try to restore the backup.
It doesn’t have to be this way. Over forty-eight enterprise platform migrations, I have refined a cutover framework that turns migration night into a boring, routine execution where everyone goes to sleep on time.
The cardinal sin of data migrations is attempting to move all data in a single maintenance window. If your dataset exceeds 500GB, offline dump-and-load is a recipe for failure.
Instead, establish asynchronous continuous replication two to three weeks prior to cutover. New transactions write to the primary legacy database and mirror instantly to the cloud replica via change data capture (CDC) such as Debezium or AWS DMS. By the time cutover night arrives, the cloud database is already 99.99% synced, with only seconds of replication lag to flush.
resource "aws_route53_record" "api_canary" {
zone_id = aws_route53_zone.primary.zone_id
name = "api.company.com"
type = "A"
weighted_routing_policy {
weight = 10 # Start with 10% canary traffic
}
set_identifier = "cloud-canary"
alias {
name = aws_lb.cloud_alb.dns_name
zone_id = aws_lb.cloud_alb.zone_id
evaluate_target_health = true
}
} Never attempt a production cutover without running at least three full rehearsal drills in staging:
Before cutover starts, write down a hard timestamp (e.g. 03:00 AM). If primary data reconciliation is not 100% verified by that exact minute, you abort and roll back immediately. No debate, no heroics.
In high-stress moments, human reasoning degrades. A printed decision tree removes debate:
One monthly email detailing real migration debriefs, architecture trade-offs, and tested scripts. Never spam.