How a release reaches users decides how much harm a hidden defect can do. Planning the method of release and watching the result afterwards reduce this harm.
Release Strategies
In a big-bang release the new version replaces the old one for all users at once. It is simple but risky. In a phased release the software goes to groups of users in stages. In a pilot release a small group tries it first. A canary release gives the new version to a very small share of users, which is increased if no problem appears. A blue-green deployment keeps two identical environments, one running the current version and one with the new version, and traffic is switched from one to the other, so that a quick return is possible. Rolling deployment updates servers one at a time. Feature flags switch a new feature on for chosen users without a new release.
Definition: Canary release. A release strategy in which a new version is first given to a small share of users, and is extended to all users only if no problems are seen.
Risk Management in Release
Release risks include defects that escape testing, failure of the deployment, loss of data, incompatibility with the user's environment, and downtime. The risks are listed and rated, and each is given a mitigation and a contingency plan. The most important contingency is a rollback plan, which describes how to return to the previous version quickly. A go or no-go meeting reviews the release criteria and decides if the release should proceed. Backups are taken before deployment, and the release is done at a time of low use.
Post-Deployment Monitoring
After release, the product is watched to see how it behaves in real use. Monitoring collects data on availability, response time, error rates and resource use. Logs record events for later analysis, and alerts warn the team when a measure goes beyond a limit. User feedback, support tickets and usage analytics show the problems that testing missed and the features that are used. A post-release review compares the actual results with the plan and records lessons for the next release. A serious problem leads to a hotfix, which is an urgent patch outside the normal schedule.
Table 4.5: Release strategies
| Strategy | Method | Main benefit |
|---|---|---|
| Big bang | All users at once | Simple |
| Phased | Groups in stages | Limits the harm |
| Canary | Small share first | Early warning |
| Blue-green | Switch between two environments | Quick rollback |
| Rolling | Servers updated one by one | No full downtime |
Example 4.5: Canary release decision
Problem: A canary release gives the new version to 5 percent of users. The old version has an error rate of 0.5 percent. The error rate for the canary group is 2.5 percent. What should the team do?
Solution:
- The canary error rate is five times the old rate.
- This is a clear sign of a problem in the new version.
Result: The team should stop the rollout, return the 5 percent to the old version, and investigate before releasing again.
old, canary = 0.5, 2.5
ratio = canary / old
print(ratio, "rollback" if ratio > 2 else "continue")
Output
5.0 rollback
Common mistakes
- Releasing to all users at once without a rollback plan.
- Not monitoring after release, so problems are found by users first.
- Treating deployment as the end of the project.
Key takeaways
- Canary, phased, blue-green and rolling releases reduce release risk.
- A rollback plan returns to the previous version quickly.
- Monitoring uses logs, metrics, alerts and user feedback.
- A hotfix is an urgent patch outside the normal schedule.
Practice questions
- What is a canary release?
- What is a rollback plan?
- Name two things that post-deployment monitoring collects.
Answers to the practice questions
- Giving a new version to a small share of users first and extending it if no problems appear.
- A plan for returning quickly to the previous version if the release fails.
- Error rates and response times (also availability, logs and user feedback).
Sources
- Official BCA syllabus Software Engineering, course code 26BCA403DS03, Unit IV
