Deployments
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Deployment strategies: canary, blue-green and feature flags: the 60-second story

    Deployment strategies

    Most outages don’t just happen. Someone shipped a change.

    Google’s SRE book: roughly 70% of outages are due to changes in a live system. Builds, config pushes, flag flips, schema changes.

    Three levers: blast radius, time to detect, time to recover

    Fleet-wide, a build failing every request for 10 minutes, plus 5 to roll back, burns 35% of a 99.9% month. On a 1% canary: 0.15 minutes.

    Three ways to replace v1: who’s exposed, how fast you undo

    Blue-green flips back fastest, but its flip exposes everyone and needs a second fleet. A canary risks 1–5% while it is judged.

    Healthy compared with what?

    Bad: Against yesterday

    Monday’s release against the weekend mostly measures the weekend.

    Good: Against a fresh baseline

    A v1 copy started with the canary, same size and traffic. Warm caches and uptime cancel out.

    0.3

    errors expected on a quiet service’s 1% canary

    At 50 requests a second, 1% sees 300 requests in 10 minutes. Only a catastrophe shows. Size canary steps in requests, not percent.

    The new checkout misbehaves. Roll back the whole build?

    Deploy ≠ release

    Switch its flag off, in seconds. You deployed it dark, then released it to staff, 1%, 10% and 100% of users.

    Knight Capital, 2012: one reused flag, one missed server

    Seven of eight servers got the new code. The eighth ran long-dead code behind the reused flag: over $460 million lost in about 45 minutes.

    Rollback breaks when v1 can’t read v2’s data

    1. Prepare: read both formats, still write the old
    2. Bake, and check every server has it
    3. Activate: write the new format
    4. Backfill, then remove the old reader

    Remember

    Shrink blast radius, detect fast, undo cheaply: canary against a baseline, release with flags, and keep data backward compatible.