Skip to content
Preptima
hardDesignScenarioMidSeniorStaff

How would you design a deployment pipeline that can be rolled back safely?

7 min readUpdated 2026-08-15

Answer

Short answer

Build one immutable artefact, promote that same artefact through environments behind ordered quality gates, and deploy so traffic can be shifted back instantly. Rollback only stays possible if schema changes are backward-compatible expand-contract steps decoupled from the code deploy.

Was this answer helpful?

Likely follow-ups

  • Your rollback needs to happen 40 minutes after release and three schema migrations have run since. What do you do?
  • How do you roll back a consumer of a Kafka topic when the message schema changed?
  • What automated signal would you trust enough to trigger an automatic rollback, and what is the risk of getting that threshold wrong?
  • How do you stop feature flags from becoming permanent branching logic nobody dares delete?

Related questions

Masterclass guide

Further reading