Stripe's 2024 account of its 2023 database migrations starts with a snapshot at time T and replays change-data capture to catch up. It then compares source and destination at a common point in time. During the routing switch, a fencing token rejects stale operations, replication is allowed to catch up, and the route changes; failed operations can retry.
Stripe reports a switch taking under two seconds. That number belongs to the final handover, not the entire copy-and-replay operation. Replication tags prevent loops and support reversal. The operational sequence is valuable because the comparison and the fence solve different problems: a matching destination proves correspondence at the comparison point, while the fence stops an old writer from invalidating the handover. Stripe's engineering account.