pattern

Zero-Downtime Migration

also called Expand and Contract, Parallel Change

Changing a schema or system while it stays in service, by adding the new alongside the old, migrating, then removing the old.

migrationdeploymentdatabase

The three-phase pattern. Expand: add the new column, table or endpoint without touching the old one, and start writing to both. Migrate: backfill historical data, then move readers to the new path one at a time, verifying as you go. Contract: once nothing reads the old path, stop writing it and remove it.

Every phase is independently deployable and independently reversible, which is what removes the big-bang cutover.

The two things that go wrong are dual-write consistency — two writes are not atomic, so one can succeed and the other fail, which needs either an outbox or a reconciliation job — and the contract phase never happening, leaving the system permanently in the most complex intermediate state.