Understanding How Spotify Works

Spotify is among a series of internet music services that has strived to redefine how people access music. Far from the days of the vinyl record that once defined the music industry, Spotify seeks to provide instant access to millions of tracks all from a computer or smartphone. What really happens when a user taps a song to play it? What are the elements that have to come together to produce a seamless user experience?

The backbone of the entire service is the internet bandwidth that supports the streaming of more than 20 million tracks. Since its launch in 2008, Spotify says it has streamed over 1 million songs to 24 million active users across 32 different countries. These massive numbers require an network infrastructure that is capable of supporting massive data transfers. When spotify first launched, it actually limited how many new users could join by instating an invitation system. After all, if too many users would have tried to stream music at the same time at launch, the company’s infrastructure might have crumbled under the demand.

One of the key elements of streaming multimedia such as music or video is the streaming protocol that is used. Ideally, the data is compressed as much as possible and transferred in an efficient way that reduces the strain on the network while still preserving quality. I was surprised to find out that spotify doesn’t actually work by streaming music directly from the company’s servers, rather it relies on peer-to-peer networking in order to handle such large demands from its users. Additionally, it uses its own proprietary streaming protocol to achieve such a seamless experience. Here’s a graphic and description of how Spotify streaming works.

  1. User clicks a track to listen to.
  2. If it’s in the cache, Spotify just starts playing it from there.
  3. Otherwise, the Spotify client requests the first 15 seconds of the track from the Spotify servers so that playback can start as soon as possible.
  4. At the same time, the client starts looking for the track on the peer-to-peer network.
  5. The rest of the track is streamed, from a combination of multiple sources if available (cache, multiple peers, Spotify servers). The more popular a track is, the more likely it will be streamed using the p2p network instead of the Spotify servers.
  6. When the track has 30 seconds to go, the Spotify client begins searching the p2p network for the next track.
  7. When the track has 10 seconds to go, if it hasn’t found the next track on the network yet, the client starts pre-fetching it from the Spotify servers.

(Source: pansentient.com)

In addition to the streaming and network protocols, the file that is actually streamed to a user’s computer is strictly regulated. Due to the fact that the service has a subscription model, the company wants to ensure that users do not sign up, download files, and then stop paying. In order to avoid this Spotify employs DRM, digital rights management, standards on it’s files, blocking any use outside of the Spotify ecosystem.

One of the reasons that DRM is employed is to pacify many of the music labels that Spotify works with. Music stream services such as Spotify, Pandora, and Rdio are heavily dependent on convincing music companies that allowing their albums to be streamed will be a profitable venture. This relationship is one of the key dependencies that underlies the entire service. In fact, this relationship between spotify and the music companies is what lead to the severely delayed launch in the United States. As a service that was initially launched as a start-up in Sweden, it took three years of negotiations in order to bring the service to the U.S.

Another key element of Spotify’s service is the social aspect of music listening. Without this aspect, Spotify is only a streaming iTunes. The social features of the service encourage more listening, more ad impressions, and more subscriptions. This benefits both Spotify and the music companies. All of these social features rely exclusively on internet connectivity.

After thinking about how a service like Spotify actually harnesses the power of the internet connectivity, it is much more evident to me that the internet is not a straight line of data transfer from one point to another, but rather a complex web connections. It is not as easy to regulate services like this precisely because of the means of delivery. It would be very difficult to regulate how streaming services use peer-to-peer protocols to deliver content.

It is very difficult to resist synthesizing all of the technologies that go into the internet into one word. Perhaps one way is to better inform users of how these services actually work. I might have been more hesitant in downloading and using Spotify if I knew that my computer would be used as a streaming node on an international network. These are issues that must be discussed. Companies such as Spotify need to be more transparent about these technologies instead of covering them up with commercialized chrome.