Log inStart free
LESSON 4.63 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Shadow, canary and A/B deployments

Watch a new model go live in three safe steps, then face a fair test.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 4.63 · RELEASE BAY1000 REQ · B DIFFERS 21.9% · SHOWN 0
01
Stage 1 of 5 · Shadow copy
A shadow deployment copies every request to B. Users see only the answers of A.
Explain it simply

Model A is live, and model B is new. In a shadow test, every request goes to both. B is like a trainee who watches but never talks to customers. The user gets only the answer of A. The answer of B goes to a log, so you can count its errors and slow answers at no risk.

Request dots in two lanes. Model A answers users. Model B answers into a log. Over 1000 requests, B differs from A on 219, with 4 errors against 4 for A.

requests, usersanswers, clickslimits, planerrors, breacheslogged only or not run
userslog onlyrequestsA · liveB · shadowfirst 24 of 1000 →over 1000 requestsmodel Amodel Berrors44p95 latency118 ms130 msanswers shown to users10000B differs from A219 of 1000 answersclicks of B: not measuredshadow test · 1000 requests, copied to Bdiffers = 219 / 1000 = 21.9% · B answers shown to users = 0userslog onlyrequestsA · liveB · shadowfirst 24 of 1000 →over 1000 requestsmodel Amodel Berrors44p95 latency118 ms130 msanswers shown to users10000B differs from A219 of 1000 answersclicks of B: not measuredshadow test · 1000 requests, copied to Bdiffers = 219 / 1000 = 21.9% · B answers shown to users = 0
Toy: model A live, model B new, seeded traffic
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
differs=#{yB≠yA}n\sy{d}{out}{\text{differs}} = \frac{\#\{\sy{b}{out}{y_B} \neq \sy{a}{out}{y_A}\}}{\sy{n}{data}{n}}
differs=219/1000=21.9%\text{differs} = 219/1000 = 21.9\%

The share of requests where the answer of B is not the answer of A.

Common mix-ups

MYTHIf the B group gets more clicks, B is better.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If each group has only 500 users, does better B still win with p below 0.05?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.