The concept Deployed is not released
Version 1.5 deploys, the container is healthy, and finance reports that search no longer returns the expected results. The deployment succeeded; the release failed. A safe release verifies behavior and business workflows after deployment.
| Strategy | How | Good for |
|---|---|---|
| Rolling | Replace instances gradually | Simple, compatible changes |
| Blue-green | Run two environments, switch traffic after validation | Fast switch back, if the database is compatible |
| Canary | Small share of traffic first, then widen | Catching problems with limited impact |
| Feature flags | Turn functionality on without redeploying | New rules, such as a reconciliation rule, for a subset first |
Data changes Rollback is not always a database rollback
If 1.5 renames a column while 1.4 tasks still run, 1.4 breaks mid-deployment. Expand and contract avoids this. And reverting a migration after production data changed can destroy information. For Apex: prefer backward-compatible migrations, preserve audit records, understand partial processing, use compensating actions where needed and reconcile business data after recovery. Never assume reversing a script reverses a financial operation.
Background work Workers need their own release strategy
A 5% traffic canary works for the API, because a load balancer can split requests. A worker has no traffic to split: whatever version takes a message makes real financial changes. Release a worker in steps instead:
- Shadow processing: the new version reads a copy of the same events and writes its results only to a separate shadow table. It has no permission to change financial tables, publishes no events and sends no notifications.
- Compare: shadow results against the production results for the same events, for an agreed period. Any difference is investigated before going further.
- A controlled slice: route one provider, or a small set of loans, to the new version, with feature flags off for any new rule.
- Widen to all messages, keeping the old version ready to take over.
| Before release | After release |
|---|---|
| Artifact verified; required tests passed | Application health verified; smoke tests passed |
| Security checks reviewed; migration reviewed | Payment ingestion and settlement processing validated |
| Deployment plan approved; rollback or recovery documented | Reconciliation results checked; errors and latency watched |
| Dashboard ready; customer communication prepared | Customer acceptance recorded |
Practice Plan the 1.4 to 1.5 release
Practical exercise
Exercise 11: a safe release plan
Version 1.5 adds a reconciliation rule, a schema addition, a dashboard update and a worker speed-up. Plan it, then simulate a failed deployment.
- The deployment plan and migration sequence.
- Verification tests for each change.
- The rollback or recovery plan.
Show a sample sequence
- 1: expand migration adds the nullable column; 1.4 ignores it.
- 2: deploy the 1.5 API as a canary at 5%, and the 1.5 worker in shadow mode with the new rule on, writing only to the shadow table.
- 3: API checks pass at 25% and 100%; shadow results match production for two days, apart from the expected new-rule matches; then route one provider to the 1.5 worker, then all.
- Failure: the 1.5 worker errors in shadow mode; it is stopped, production workers on 1.4 carry on, the column stays (harmless), no financial data changed.
2 questions
Check your understanding
What you can do now
- Choose a deployment strategy.
- Plan expand-and-contract migrations.
- Verify a release with business checks.