How music-streaming site Orfium used Varnish Cache to improve page performance
August 22, 2016
Background: Implementing Varnish Cache with Section
Orfium is a new music platform which combines some of the best features of existing platforms such as SoundCloud, Bandcamp and Beatport, allowing users to share their tracks, promote them and sell downloads. In addition, it promises to introduce a range of interesting new options for music makers and labels, including the payment of streaming royalties and the ability to upload DJ mixes while compensating all artists whose music is included.
Uniquely, Orfium takes an artist-driven approach to music. The platform could prove to be a strong rival to existing sites such as SoundCloud, which have come under fire in recent months for their heavy-handed approach to handling copyright infringements and their apparent focus on securing lucrative licensing deals rather than listening to the voices of their users.
Why we started using Section to set up Varnish Cache
Orfium is a music platform that enables people to browse and listen to music. Users can signup and login so that they have a personalised experience in our platform. However, we also enable users to search for music and listen to samples or popular playlists without logging in. All public information is also optimised and available for search engines. Both of these characteristics mean that a huge amount of our traffic comes from non-authenticated sessions, which Orfium welcomes. We also have a large amount of traffic that comes from social media and blog references.
Thus, brainstorming at the office we were thinking that we could definitely optimise the performance of non-authenticated sessions, especially at specific spikes of traffic. Varnish Cache seemed from the very beginning to meet our list of requirements:
- Cache the whole http response
- Have the ability to customise the rules of caching
- It is a tested and scalable open source solution
The very first thing we did was to create an EC2 Varnish Cache instance to evaluate that it works on our staging server. It passed all the tests, including the load testing ones that were the most important for us to adopt any specific technology. We were impressed with how it could perform without exploding our staging servers.
It is in our mentality as a company, “if someone already does something (well) and we need this, we pay for it”. After evaluating several Varnish Cache solutions as a service, Section seemed easy to configure and immediately passed all of our tests when we added our own Varnish Cache configuration.
How Section helped the Orfium platform
After a couple of weeks in the staging environment with Section we decided to release our Varnish Cache configuration in the production environment. The configuration was super simple, and it required only a couple of minutes to setup the new DNS settings and then update the Varnish Cache settings.
The most impressive thing was that from Day One of this release we could see that our backend analytics “relaxed” immediately, since most of the non-authenticated traffic was routed directly through Section and Varnish Cache. Day after day, everything seemed to work even better, and this enabled us to start working on how we can cache chunks of information that are shared amongst users, even though every user has their complete personalised Orfium experience.
Section’s CDN support
First thing first. Every time I am about to choose a new platform for production I value the customer support more than anything. I don’t want to ever have a production issue on Sunday morning and nobody be there to resolve this. Thus, I always check again and again that the support is there for us to resolve both simple/stupid questions as well as the more technical stuff.
I have to say, this is something like the best support I ever received. They guys even checked on my Varnish Cache code configuration to evaluate it. Every other problem we had was resolved in less than half and hour.
Next Steps for optimizing our CDN configuration
After evaluating Varnish Cache technology with Section in a production environment, we feel confident that we can dive deeper into using more aspects of Section as a platform, find new ways to decrease http responses and offer an even better experience to our users.
One important lesson that we learned from Section is that having quality customer support is hugely beneficial to a technology company, not only because people are going to trust your service over another, but also because people will actually adopt a new technology more easily when they have someone to support them. Obviously this is not a new lesson in computer science, as such practices have been there for decades, but this is a valuable lesson for cloud service offerings that are often not all that open and helpful. Even though good customer support takes effort, it is important when dealing with web performance and security, and we were pleased that the Section team was always able to answer our questions.
Michael Petychakis is the Chief Technology Officer of music platform Orfium.
Are you interested in trying out Section’s CDN and easily implementing Varnish Cache? Contact us or click below to get started with our 14 day free trial, no credit card required.