Canary releases and rollback
A canary release sends a new version of the code to a small percentage of traffic first, watches the dashboards, and only widens the rollout once the canary proves itself. The name comes from the coal mine canary. The principle is exactly the same: expose a tiny fraction of the population first and watch for trouble.
A canary rollout
New version at 1 percent, then 10, then 50, then 100. At each step you watch metrics and roll back if something looks wrong.
Rollback has to be a single command, and it has to leave the database in a working state. That means your migrations need to be backward compatible: you never drop a column in the same release that stops writing to it. You stop writing, deploy, verify, and only drop the column in a later release. Making rollback safe is mostly about not making rollback dangerous.
Quiz: Quiz
Loading practice…