Varnish @ Aspiro:the backbone for music streaming services

Aspiro Music began providing streaming services through WiMP in 2008 and two years ago they started using Varnish to scale up their infrastructure. WiMP has a large market share in the Nordic countries and operations in Norway, Sweden, Denmark, the Netherlands and Germany. The service will be rolled out internationally within the next few years.
Aspiro Music is a much cherished customers of ours because they use Varnish in innovative ways. We asked Jeff Williams, Aspiro Music’s Operations Manager and Rune Lending their CTO to share with us how they use Varnish so that others may benefit from their success story. “During the last 12 months or so we have been setting up Varnish at our own pace. Our installation is up and running although we are still building and developing the infrastructure. And basically, we put Varnish in front of everything: images, music, the search functionality... we even use Varnish to power our mobile apps,” said Jeff.

Streaming music with Varnish
Jeff further explained that when it comes to the content delivery process customers will request a song or a video from their WiMP client. That request is handled by the Varnish streaming servers and are processed from there. “We have been using Varnish for this purpose for over two years now with great results,” Rune added. “Using Varnish for our streaming services saves us a lot of time and money as music streaming typically requires a lot more hardware than what we use. If we hadn’t used Varnish we would have needed to invest in CDN’s for a price tag that would have made it impossible for Aspiro Music to stream music.”
“Varnish takes care of all the heavy-lifting within the WiMP service. Once Varnish Software had done the required modifications to Varnish Cache so it could be used for streaming it was perfect. It made much more sense than trying to build a streaming solution ourselves. That would have been too time consuming and costly for us. And Varnish turned out to be so flexible that we could mold it to our needs and to the way we want to deliver our services. Not the other way around.”

Excellent flexibility
“Varnish allows us to set up the music storage exactly the way we want because of its flexibility. If a piece of content is missing from one of the content repositories Varnish will look for the content on our secondary site. Or if a client requires a special version of our APIs we can have Varnish identify that client and direct them to the right version of the API. It makes maintaining a lot of different clients very easy. We have clients running on everything from Smartphones to PCs and HiFi systems and pushing out new client software can be a time consuming task,” Rune told us.

A fast and effective way for validating subscribed users
We were curious to know how big a role Varnish actually plays in delivering music to WiMP’s users. Jeff explained that when one of their users hits play the client software asks the API’s to get a key, the user gets validated, the key gets sent to the Varnish cluster and Varnish asks the API if this is a valid key. If the key is valid the song gets streamed from Varnish. “And the great thing is that the streaming starts while the song is being fetched so the user doesn’t need to wait for the whole song to be fetched into Varnish. He gets his song delivered right away. So Varnish has turned out to be an extremely fast and effective way for us to validate our subscribed users,” Jeff told us.
“Varnish gives us the possibility to deploy a couple of Varnish servers in a partner network and would then be able to cache most of the content there, only calling home to one of our content libraries when we have a cache miss. This gives us the flexibility to get up and running quickly,” he adds.

Using Varnish to scale throughout the world
Before Aspiro Music started using Varnish they were experiencing challenges with their IO capacity and delivery systems. They searched for an optimal solution and contacted the biggest CDN providers but found out, as mentioned earlier, that to invest in the necessary hardware was too expensive for them. “Using Varnish allows us to scale throughout the world with our own infrastructure and to have full control of the music delivery process,” Rune said. He adds that they also realized that Varnish could do a better job on the streaming part. “Implementing Varnish was basically a proactive measure on our part, to prevent us from running into problems with music delivery,” he said. An added benefit was that by using Varnish the number of web servers needed to support the streaming services was significantly smaller than if Aspiro Music had used a different solution.”

Growing fast - jolt-free
“We can honestly say that Varnish has contributed to making our rapid growth such a smooth ride for us,” Rune said. “One great example is when we partnered up with Canal Digital earlier this year to offer WiMP music streaming to all of their subscribers. This meant that we needed to scale really fast as 700.000 Canal Digital users could potentially join the service in one lump.”
Lastly, Varnish Software is of course pleased to report that when we asked Rune and Jeff whether they have had any problems with Varnish since they implemented it they told us “only some minor issues”.

All things Varnish related

The Varnish blog is where the our team writes about all things related to Varnish Cache and Varnish Software...or simply vents.