Skip to content
Minute Campus.

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.

Sources

Checked at the source.

Every claim in the lesson was checked against these before it was recorded.

  1. 1Spotify Unwrapped: How we brought you a decade of dataSpotify Engineering · February 2020 · read 4 Oct 2026Wrapped covered ten years for over 248 million users by reading and combining pre-aggregated yearly data.

Transcript

The lesson, word for word.

Read it at your own pace, or search the page for a term.

Every year, Spotify tells hundreds of millions of people what they listened to. Spotify's engineers described the twenty nineteen edition, which covered a whole decade, for more than two hundred and forty-eight million users. The first thing to know: this is not worked out while you wait. It is a batch job. The counting is done in advance, for everyone at once, and the results are stored, ready to show. The second: you cannot do it in one go. The year before, the Wrapped job was one of the largest of its kind ever run on Google's cloud, and it ran into limits. So for the decade, they did not reprocess ten years of raw listening. Each year was already summarised and stored. They read the summaries and combined them. The lesson: when a count is too big, do not count faster. Count in pieces, save each piece, and add the pieces together.

Questions? Comment on the lesson on YouTube

New lessons every day.

Follow Minute Campus where you already scroll.