Machine Learning System Design Interview, issue 33, May 21, 2026
The Streaming Bias Trap
Senior ML Ops Engineer interview at Meta, and the interviewer asks:
“You need to uniformly sample an unbounded, real-time stream of raw user events into a fixed-size memory buffer for downstream training. The total volume is unknown and cannot fit in RAM. What specific algorithm guarantees a mathematically uniform distribution, and what happens to your model’s bias if you skip it?”
How naive real-time data filtering quietly shatters your model's i.i.d. assumptions, and the reservoir technique that prevents catastrophic dataset shift before training even begins.
The full answer, with the mechanism and the arithmetic, is for paid subscribers on Substack.