How Spotify works may have an impact on your computer’s hard-disk space, as well as your Internet connection. Spotify works differently from many other online music services because it relies on several ways to smoothly deliver music to you with no delays.
In computing-speak, the measure of delay between requesting a song and hearing it is called latency. Spotify wants to keep latency low to make sure there’s no massive delay between choosing a track and hearing it on your computer.
So, how does music get to your computer in the first place? Spotify stores all its music on servers. When you begin playing a streaming track from Spotify, Spotify takes a few actions:
It looks to see whether you already have that track in your cache, a folder on your computer used to temporarily store tracks you already listened to on Spotify. Having them in the cache saves you from having to redownload the content again.
Starts to retrieve the track from its servers
Searches for other nearby computers that use Spotify — run by other Spotify users like you — who may have local versions of the tracks (or fragments of the tracks) stored in their caches
This approach is much faster and more efficient than millions of requests pummeling the Spotify servers.
Essentially, your computer becomes an equal player in one big network of many other computers running Spotify. In this peer-to-peer network (P2P, for short), the computers communicate on an even footing, uploading (sending) and downloading (receiving) files.
Spotify is also clever enough to start pre-fetching the beginning of the next song in the playlist or album you’re listening to a few seconds before the current song ends to ensure that you don’t have a lag between one song and the next.
If you decide to go off course and suddenly choose another song that Spotify isn’t expecting, that’s not a big deal — Spotify still responds to your request almost instantaneously.
Spotify keeps your music in a cache
Spotify uses a cache on your computer’s hard drive (as well as on the hard drives of all Spotify users). A cache is a temporary holding area for tracks you’ve listened to — if you want to listen to a track again, Spotify draws upon the music stored in your cache so that it doesn’t have to re-download the track. When the cache is full, the old stuff gets overwritten.
Consider Spotify’s data usage
The amount that Spotify downloads and uploads is relatively small because it compresses tracks very efficiently, so those tracks don’t take up much room. Also, your data usage will be far less significant if you listen to the same songs regularly because Spotify pulls them from your cache, so it doesn’t have to access the Internet to get them.
But Spotify also uses your cache to upload tracks to other users, which usually contributes (a bit) to your data usage, too. The amount of data Spotify uploads via your Internet connection isn't a big deal because Spotify is smart enough to spread the music-sharing effort among many others; also, upload speeds are slower than download speeds for most home Internet connections.