Skip to content
RED SAGSkills
hardCloud Engineer interview question

How would you migrate a large production database to a managed cloud database with near-zero downtime?

What the interviewer wants to hear

  • Initial full load plus change data capture to keep target in sync
  • Validate data and schema compatibility before cutover
  • Plan the cutover: freeze writes briefly, wait for lag zero, switch connections
  • Use DNS or config switch and keep a rollback path with reverse replication
  • Test performance, monitor replication lag, rehearse the cutover

Model answer

The key idea is to keep the old and new databases in sync while the application is still live. First I check compatibility, such as engine versions, extensions and character sets, and create the target schema. Then I do a full load using native tools like pg_dump or a snapshot, or AWS DMS, followed by change data capture through native logical replication or DMS so ongoing writes keep flowing to the target. I validate row counts and checksums and run load tests against the new database. For cutover, I rehearse in staging first. In production, I briefly stop writes or put the app in read-only mode, wait until replication lag is zero, run final validation, and switch the connection string through config or a DNS name. Before switching, I set up reverse replication if possible, so rollback is fast. Total write downtime can be a few minutes or less.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard Cloud Engineer questions