Machine Learning System Design Interview, issue 4, Nov 26, 2025

The Infinite Stream Trap

Senior ML Engineer interview at Twitter, and the interviewer asks:

We have a firehose of tweets coming in at 50k TPS. I need you to maintain a statistically representative sample of exactly 10,000 tweets for a training buffer at all times. The stream never stops. You cannot store the full history.

Why batch thinking fails in infinite streams - and how Reservoir Sampling saves you

The full answer, with the mechanism and the arithmetic, is for paid subscribers on Substack.

Read it on Substack

Get the next one

Free on Substack. Unsubscribe in one click.