30/35
Part 3 of 3 · Serving and driftLearn and do
A worked example: the fallback rate jumps after a deploy
On a normal day the streaming store times out on 0.5% of requests. At 20,000 requests a second, that's 100 defaulted requests a second, 8.64 million a day. If the model trained with a matching share of defaults, that's fine.
Now a deploy pushes the rate to 5%. Ten times as many requests are scored on a value the model rarely saw. The fallback-rate monitor catches it in minutes. The engagement metric would catch it a day later.
In the editor, write defaulted_per_day(rps, rate) and fallback_alert(rate, baseline). The last lines check the normal day, 0.5% of 20,000 requests a second, and the deploy that pushes the rate to 5%.