Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Classify every change as backward compatible, forward compatible, reversible, compensatable, or irreversible. Define the rollback window and which external consumers and jobs may observe the new contract.
Establish scale assumptions
- Model mixed-version duration, event retention, backfill progress, and the volume of writes created by the new path. A rollback plan must handle all states already produced at the current rollout percentage.
Functional and non-functional requirements
- Old and new binaries coexist safely, schema changes use expand-contract, events remain consumable, and operators can stop effects independently. Irreversible actions require a forward repair rather than fictional rollback.
High-level architecture
- Decouple deploy from activation with server-side flags, dual readers, versioned event envelopes, and additive schema. A release manifest records component compatibility, migrations, flags, consumers, and approved rollback or roll-forward actions.
Data model and flow
- Writers emit the oldest compatible representation until consumer readiness is proven, or dual-publish to distinct versioned topics. Backfills include transform version and before-image or recomputation source when reversal is required.
Consistency and transaction boundaries
- Schema contraction occurs only after all writers and readers have left the old field. Rollback may disable new decisions immediately while preserving additive data that old code safely ignores.
Failure modes and recovery
- Stop rollout and side effects first, then choose binary rollback, flag disablement, compensating job, or forward fix. Validate mixed states and prevent automated cleanup from deleting compatibility fields during the incident.
Security and privacy
- Rollback cannot revive a known-vulnerable path or weaker authorization contract. Feature and migration controls are privileged, audited, and protected from stale configuration.
Observability and SLOs
- Break down errors and business outcomes by application version, flag cohort, schema version, event version, and backfill state. Predeclare rollback thresholds and verify the rollback itself against SLOs.
Capacity and cost
- Compatibility and dual publication add temporary storage and compute; budget their lifetime and removal owner. Avoid maintaining indefinite dual paths by attaching explicit contraction gates.
Alternatives and trade-offs
- Backward-compatible releases take more planning but preserve options. Fast destructive migrations save temporary complexity and transfer risk into an incident where recovery is slowest.
Evolution and migration
- Practice expand, migrate, contract as separate releases. Canary producers after consumers are ready, shadow new reads, and remove old contracts only after retention and rollback windows pass.
What Staff and Principal candidates should emphasize
- Strong candidates ask what new state already escaped. They treat rollback as a matrix across code, data, events, security, and external consumers, and know when roll-forward is safer.
Decision trade-offs
Event evolution
Option A
Change fields in the existing contract
Option B
Additive envelope or versioned stream
Recommendation:Use additive compatibility for routine evolution and separate major versions when semantics, not just shape, change.
Incident response
Option A
Redeploy the prior binary immediately
Option B
Disable effects, assess state, then roll back or forward
Recommendation:Stop harmful activation first; choose the recovery path only after checking whether new data and contracts remain readable.
Follow-up interview questions
- 01When is rolling forward safer than rolling back?
- 02How do you handle an external consumer that already persisted the new event?
- 03What makes a database migration truly reversible?
- 04How do you prevent compatibility code from becoming permanent debt?
Common weak answers and mistakes
- 01Assuming old binaries can read every state written by the new release.
- 02Combining expand, backfill, activation, and contract deletion in one deployment.
- 03Calling a compensating business action a database rollback.
- 04Monitoring only application version and missing event or data cohorts.
Interviewer evaluation rubric
Treats rollback as redeploying old code and ignores data, events, consumers, and irreversible effects.
Uses feature flags, additive schemas, versioned contracts, canaries, and a reasonable stop-and-assess process.
Defines compatibility windows, release manifests, cohort telemetry, compensations, contraction gates, and security constraints.
Builds rollback as an organizational protocol with predeclared evidence, independently stoppable effects, and a disciplined path to remove bridges.