Course map
Stage 1: Foundations
Stage 2: Data Integration
Stage 3: Building & Shipping
Stage 4: Customer Engagement
Stage 5: Specialization

Part 16 / Stage 4

Rollout and support

Goal: Get from pilot to production without surprises: staged rollouts behind flags, reliability targets the customer agreed to, incidents handled with roles and timelines, and adoption measured instead of assumed. Time: ~3 hours · Needs: Python 3.14+, the course venv

What you will learn

  • Staged rollout: pilot group, percentage rollout, feature flags
  • SLOs and error budgets
  • Incident response: roles, communication, timelines
  • Blameless postmortems
  • Measuring adoption
  • Expansion: from one team's success to the next use case

Topics in this part

Practice

Work in the course venv. Check each answer by running it; compare with solutions/ only after trying.

Exercise 1: The rollout dial

Using the lesson's in_rollout, print which dispatchers are on at 25%, 75% and 100%, and verify that everyone on at 25% is still on at 75% (monotonic: raising the dial never kicks anyone out).

Show the solution to Exercise 1
# Exercise 1: raising the dial never kicks anyone out
import hashlib

def in_rollout(user_id, feature, percent):
    bucket = int(hashlib.sha256(f"{feature}:{user_id}".encode()).hexdigest(), 16) % 100
    return bucket < percent

dispatchers = [f"dispatcher-{i:02d}" for i in range(1, 13)]
groups = {}
for pct in (25, 75, 100):
    groups[pct] = {d for d in dispatchers if in_rollout(d, "new-dashboard", pct)}
    print(f"{pct:3d}%: {sorted(groups[pct])}")
assert groups[25] <= groups[75] <= groups[100]
print("monotonic: True (bucket < percent only ever adds users)")

Exercise 2: Budget burn-down

Write budget_status(slo, downtime_minutes, day_of_month) returning "healthy", "watch" (used > the pro-rata share) or "freeze releases" (used > 85% of the month's budget). Show all three states for a 99.9% SLO.

Show the solution to Exercise 2
# Exercise 2: is the error budget being spent too fast?
def error_budget_minutes(slo, days=30):
    return (1 - slo) * days * 24 * 60

def budget_status(slo, downtime_minutes, day_of_month):
    budget = error_budget_minutes(slo)
    if downtime_minutes > 0.85 * budget:
        return "freeze releases"
    pro_rata = budget * day_of_month / 30
    return "watch" if downtime_minutes > pro_rata else "healthy"

for downtime, day in [(5, 10), (20, 10), (40, 20)]:
    print(f"day {day}, {downtime} min down -> {budget_status(0.999, downtime, day)}")

Exercise 3: An incident update generator

Write incident_update(known, doing, next_update_minutes) that formats the three-part update. Produce the first two updates of a mock incident 30 minutes apart (the second with new facts).

Show the solution to Exercise 3
# Exercise 3: the three-part incident update
from datetime import datetime, timedelta

def incident_update(when, known, doing, next_update_minutes):
    return (f"[{when:%H:%M}] INCIDENT UPDATE\n"
            f"  What we know: {known}\n"
            f"  What we're doing: {doing}\n"
            f"  Next update: {when + timedelta(minutes=next_update_minutes):%H:%M}")

t0 = datetime(2025, 4, 20, 14, 0)
print(incident_update(t0, "Dashboard returns 503 for all dispatchers since 13:52.",
                      "Checking the sync service and Acme API status.", 30))
print()
print(incident_update(t0 + timedelta(minutes=30),
                      "Root cause: Acme API token rotated at 13:50; our service had the old one.",
                      "New token deployed; dashboards recovering. Monitoring.", 30))

Exercise 4: Adoption from the audit log

Given a list of audit events (actor, day), compute weekly active users, actions per active user, and who used it in week 1 but not week 2 (the drop-offs). Use a small fixed dataset where exactly one dispatcher drops off.


Show the solution to Exercise 4
# Exercise 4: adoption and drop-off from the audit log
from collections import Counter

EVENTS = (
    [{"actor": f"dispatcher-{i:02d}", "week": 1} for i in (1, 2, 3, 4, 5)] * 3
    + [{"actor": f"dispatcher-{i:02d}", "week": 2} for i in (1, 2, 3, 5)] * 4
)
for week in (1, 2):
    actors = [e["actor"] for e in EVENTS if e["week"] == week]
    active = set(actors)
    print(f"week {week}: {len(active)} active, {len(actors) / len(active):.1f} actions/user")
w1 = {e["actor"] for e in EVENTS if e["week"] == 1}
w2 = {e["actor"] for e in EVENTS if e["week"] == 2}
print("dropped off:", sorted(w1 - w2), "- go ask them why")

Mini-project: The rollout plan

One script that prints Acme's rollout plan: the three stages with named dispatchers per stage (stable hashing at 10/50/100), the agreed SLO with its error budget, and the incident communication template with roles filled in.

A solution is in solutions/mini_rollout_plan.py.

Stretch: run a mock incident with a teammate and write the blameless postmortem.

Common mistakes

Mistake Why it hurts Fix
Big-bang rollout Any issue hits all users at once Pilot group → percentage → everyone, behind a flag
Per-request randomness in flags Users flicker between experiences Stable hash of feature:user
Promising nines casually Each nine is 10× the cost Agree the SLO from the user's actual need
No roles during incidents Everyone debugs, nobody decides or communicates Lead + communicator, pre-agreed
Postmortems that name culprits Next incident gets hidden Blameless: causes, detection, prevention
Declaring adoption from one demo Usage ≠ attendance Measure weekly actives and drop-off from logs
Expanding on enthusiasm The next team hears a sales pitch Expand on measured numbers, sponsor-led

Quick recap

  • Stage the rollout, use flags so "off" is a config change rather than a deploy, and hash user ids so each user's experience stays stable.
  • An SLO implies an error budget — 99.9% allows 43.2 minutes of downtime a month — and budget burn gates how much risk you take.
  • An incident gets one lead, one communicator, updates every 30 minutes, and a timestamped log.
  • Postmortems ask how the system allowed it; actions get owners and dates.
  • Adoption means knowing who uses the tool, how often, and where they drop off — measured from logs, weekly.
  • Expand sideways, on measured numbers, with the sponsor selling.

Checklist

  • I ran the rollout example and can explain why 50% of 12 gave 3.
  • I can compute the error budget for any SLO in my head.
  • I know the two incident roles and the 30-minute rule.
  • I rewrote a blameful cause as a systemic one.
  • I listed the three adoption questions and where the data lives.

Read more: Google SRE book: Service Level Objectives · Postmortem culture

Search the guide