The release that broke everything
8,400 req/s on five healthy servers. On Friday a new version goes out to all five at once. It has a bug that makes every request fail, and the whole site is down until someone notices and rolls it back.
Play this levelPart of Bugpit Pro. It runs in your browser: build the design, press Run, and watch what breaks.
The lesson
Most outages aren't caused by traffic or broken machines. They're caused by changes: a release, a config edit, a database migration. So how you release matters as much as what you run.
A canary release sends the new version to one machine first. Monitoring compares its errors with the others. If they rise, the release stops and that machine goes back to the old version. Most users never saw it.
Click **App Server** and tick **Canary releases**. Then check the numbers: while the canary machine is out, the others carry everything, so you need one machine more than the traffic needs.
Related tools: a rolling release replaces a few machines at a time. Blue green runs old and new side by side and switches traffic over. A feature flag ships the code turned off, and turns it on for 1% of users.
What you have to achieve
8,400 requests a second at the busiest hour, 3% of them writes.
- No broken or illegal connections
- If a broken release ships, under 1% of requests fail
- No component is overloaded
- Fewer than 0.1% of requests fail
- p99 response time under 250 ms
What you learn
A broken release now costs one machine for a few minutes, not the whole site. The spare machine isn't waste: it's the same headroom that covers a crash, and now it covers your own mistakes too.
Check yourself
You want to try a new checkout page on 1% of users without releasing new code each time you change who sees it. What do you use?
- A feature flag
- A bigger database
- A second load balancer
Show the answer
A feature flag. A flag is a switch read at run time. The code is already live, and you choose who gets it, and can turn it off in seconds.
The new version changes a database column that the old version still reads. What goes wrong during a canary?
- Nothing
- Old and new versions run together, and one of them breaks on the changed column
- The canary runs faster
Show the answer
Old and new versions run together, and one of them breaks on the changed column. During any gradual release both versions are live. So change the database in steps that both versions can live with: add first, switch, remove later.