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
- Your pipeline gates every code change. What else reaches production without passing through it?hardAlso on ci-cd and feature-flags6 min
- Some of what you ship - rules files, config bundles, model updates - reaches production without passing through the deploy pipeline. What would you put around that path?hardAlso on ci-cd and rollback6 min
- How do you roll back a model in production?hardAlso on rollback6 min
- Your pipeline deploys using a long-lived cloud access key stored as a CI secret. What would you change and why?hardAlso on ci-cd5 min