Skip to content

Ch 20: Building Production AI Systems - Intermediate

Track: Advanced | Try code in Playground | Back to chapter overview

Read online or run locally

You can read this content here on the web. To run the code interactively, either use the Playground or clone the repo and open chapters/chapter-20-building-production-ai-systems/notebooks/02_safe_rollouts.ipynb in Jupyter.


Chapter 20: Production AI Systems — Notebook 02 (Safe Rollouts & Canaries)

Shipping a new model is risky. Canary routing sends a small, consistent slice of traffic to the new version so you can compare before committing.

What you'll learn

Topic Section
Why deterministic routing matters §1
Canary traffic splitting §2
Monitoring a canary and rolling back §3

Time estimate: 3 hours


Key concepts

  • Canary — expose a new version to a small fraction of traffic first.
  • Deterministic routing — the same user consistently sees the same version.
  • Rollback — the fastest fix is often to route 100% back to stable.

Deterministic canary routing splits traffic consistently so you can compare a new model against stable on live data, and roll back instantly by zeroing the canary fraction.

Run the full notebook in the chapter folder for code and outputs.


Generated by Berta AI