This is a hosted blog post I wrote recently for section.io.
Background: Implementing Varnish Cache with section.io.
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.io 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 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 solutions as a service, section.io seemed easy to configure and immediately passed all of our tests when we added our own Varnish configuration.
How section.io helped the Orfium platform
After a couple of weeks in the staging environment with section.io 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 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.io and Varnish. 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.io’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 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 technology with section.io in a production environment, we feel confident that we can dive deeper into using more aspects of section.io 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.io 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.io team was always able to answer our questions.
Interested in API strategy, architecture, and design. Working to improve the quality and usability of information on the Web. CTO @OrfiumMusic