What’s often overlooked is that Spotify is in reality one of the largest P2P networks on the Internet. No surprise, since one of the lead engineers from the start is none other than Ludvig Strigeus, the original creator of the BitTorrent client uTorrent. However, not much is known about this private P2P network.
Using P2P technology allows Spotify to use less servers, less bandwidth and have a better up-time. And it appears to be working. In fact, of all the tracks that are streamed over the Internet by Spotify users the majority come via P2P connections. Since they’re dealing with copyrighted music, all transfers are totally anonymous, encrypted and secure of course.
Let’s take a look at some data provided by Spotify on their three main music sources.
As can be seen in the graph above most tracks are played from the local cache. These are songs a user has listened to before, and those files are stored on the local hard drive. Of all the remaining tracks that are played, roughly 80% are accessed via the P2P network.
What’s further notable is that P2P performance is most efficient during peak hours and in the weekend. In the graph provided by Spotify the share of P2P traffic peaks on Saturday evening.
Spotify’s P2P network uses various influences from other file-sharing platforms. It uses both a BitTorrent like tracker and a Gnutella style network, but is specifically tailored towards playing relatively small files. Since it’s dealing with streaming, the first bits of a song are prioritized while slow peers are rejected.
This custom P2P solution guarantees what is one of the most important features of Spotify, a very low latency. Tracks have to start almost instantly, and with a median delay of 265 milliseconds it lives up to this expectation. Quite remarkable for a P2P-powered application.
So finally, there we have it. A massive P2P network that’s fully supported and even partially owned by the music industry. Who ever thought that would happen?