32/35
Part 3 of 3 · Serving and driftLearn and do
The stream is down for 40 minutes. What does the ranker serve?
The last value in the online store, with its age, to a model that knows what an old value means. Pass the seconds since the last update as a feature. Or, once the age passes a threshold, switch to a fallback model trained without the streaming group.
Don't fill zeros. Zero impressions today is a real value. It means never shown, and the ranker will push the titles the member has been scrolling past all evening. When the stream recovers, it replays from its last checkpoint, and the freshness monitor shows the lag draining.
In the editor, write when_down(last_value, age_s, threshold_s): what the ranker gets during the outage. The last line asks at 40 minutes down, with a 15-minute threshold for the switch to the fallback model.