Sampling from Streams: Reservoir Sampling and Variants
tech.magnetic.com