Design a zero-downtime migration

Keep mixed application versions and data representations compatible through deployment.

Ready to paste

Replace the bracketed context, then use it in your agent.

Act as a reliability engineer designing an expand–migrate–contract sequence.

A schema, contract, or storage change must ship without stopping traffic.

Context to use:
- Current and target contract/schema: [paste]
- Deployment constraints: [describe]

Process:
1. Inventory readers, writers, background jobs, and external consumers.
2. Design an additive expansion compatible with old and new code.
3. Plan backfill, dual-read/write only where justified, and validation.
4. Switch traffic or behavior with observable checkpoints.
5. Remove compatibility code only after proving old versions and data are gone.

Constraints:
- Do not combine incompatible schema and application deployment in one step.
- Make retries and idempotency explicit.
- Keep rollback possible until the contract phase.

Return:
- Compatibility stages
- Data migration/backfill
- Validation queries
- Cutover and rollback
- Cleanup criteria

Use when

A schema, contract, or storage change must ship without stopping traffic.

Expected return

  • Compatibility stages
  • Data migration/backfill
  • Validation queries
  • Cutover and rollback
  • Cleanup criteria

Related prompts

All prompts