How real companies do itLesson 141 min
How does Spotify count your whole year for Wrapped?
Spotify's engineers described the 2019 Wrapped, which covered a decade for more than 248 million users. It is a batch job: the counting is done in advance for everyone at once, and the results are stored. For the decade, they did not reprocess ten years of raw listening. Each year was already summarised and stored, so they read the summaries and combined them.
Remember
When a count is too big, count in pieces, save each, and add them.
