Inside Analysis presents a Q&A with Varnish Software CTO Per Buer — the following ‘tale’ details exactly how the Varnish Cache open source project got started in 2005 with 37 downloads for its first beta version and evolved over ten years to have 2.2 million users worldwide.
Inside Analysis: In the beginning, how did you become involved with Varnish Cache?
Varnish Cache started back in 2005 as an open source project. After the dot.com bubble burst, a lot of money for scaling Internet infrastructure disappeared. This meant that around 2002-2005 it was really a pain to scale a website because there were hardly any tools. At this time, the website for the Norwegian newspaper Vg.no was getting a lot of traffic, with daily peaks of more than a gigabit – quite a lot considering the year and Norway’s population. Vg.no’s sysadmin, Anders Berg, decided to write something new to cache the peak traffic after realising there was nothing out there in the market. Anders invited the renowned developer Poul-Henning Kamp to participate in the project, which is how Poul-Henning ended up becoming Varnish Cache’s chief architect.
I was working for Linpro at the time and we got involved with the Linux part of it. The beta release of Varnish Cache got 37 downloads, compared to 20,000 weekly downloads today!
The project grew steadily. A lot of people fell in love with Varnish’s unique policy-driven configuration style and we built a loyal user base. Around 2008 it became common knowledge that Twitter and Facebook were using Varnish. Both – but more visibly Facebook – scaled spectacularly well during huge growth spurts and never experienced any downtime. People heard that Varnish had something to do with that and the usage exploded.
When the financial crisis hit in 2008, it became difficult to fund Varnish’s development and releases out of Linpro alongside the consulting business. So, in 2010 we decided to start up Varnish Software.
Inside Analysis: How is Varnish different from other caching solutions?
Varnish Cache is a caching reverse proxy. Unlike a lot of the caching solutions out there it is written explicitly to act as a reverse proxy. It isn’t a webserver that can cache. It isn’t a forward proxy that can be configured to operate in reverse. It is a tool specifically written to cache web content.
Most importantly, Varnish does not have a traditional configuration file. Instead Varnish uses a policy-file where you write policies on how transactions are to be treated. The Varnish Configuration Language (VCL) lets you define these policies depending on your needs.
VCL is an amazing configuration system that gives unmatched flexibility to run policies. Want to rewrite URLs coming from a certain geography, with a particular user-agent, requesting a specific URL? That’s easy with VCL. Varnish’s flexibility can be game-changing when looking for ways to customise and control web performance, scalability and delivering digital content.
Back when we did the first release ten years ago, we hoped that other open source projects would pick up the idea of configuration policies but we are still waiting for this to happen. I think something like VCL would be very useful in other software components as well.
Users are doing some very cool things with VCL, but knowing its true potential, I want to see them doing much more.
Inside Analysis: During the last 10 years, what were the most exciting and the most challenging moments?
In general, it’s always exciting to see how people create their own Varnish use cases – like using Varnish to power a CDN, sticking it in the middle of a microservices architecture or using it to route the jabber protocol.
One of the challenging moments is ongoing with the move towards HTTP/2 – a significant change for the project. HTTP/2 is a multiplexed, binary framed protocol. Supporting it will require a rewrite of everything that talks to the client and quite a bit of the backend stuff. A major change is concurrency, so instead of the browser opening a number of connections, it will now open only one connection onto which the data will be multiplexed.
I have to admit a sentimental attachment to HTTP/1. As a student I bought a very thin O’Reilly book on client web programming that explained how to talk to a web server. I was fascinated by how easy it was to telnet into port 80 of the server, type in GET/ and have the server talk back. HTTP/2 isn’t text based and you’ll no longer have the option of using simple tools as telnet to talk to the server.
H/2 is currently at the top of the list. We’ve spent years doing various changes to Varnish to prepare for H/2. The last two major releases of Varnish Cache have been about preparing for this.
Inside Analysis: Four years after Varnish Cache, Varnish Software was born. What advice would you give an entrepreneur that wants to run a business based on an open source solution?
First of all – as with any start-up – be patient! It will take longer than expected to commercialise a product based on an open source solution. This means you will have to deal with impatient investors. Though investors today understand the open source model much better than they used to, they still expect fast returns. That’s something you will have to deal with.
Second, never forget that there is a community and that it’s not yours. The community has its own needs and agenda. If you help support the community’s efforts to organise, it can fulfil its agenda.
Also, make sure your profit model does not annoy the community to much. I think it is acceptable today to charge money for some stuff or some convenience. We sell our commercial product to a very small percentage of our user base and it generates enough revenue for us to continue to grow. But it requires hard work and patience.
Inside Analysis: What are some of the challenges being at the intersection of a community and a company?
Communities are powerful forces that should be treated with much respect. If the company betrays the community, or the community ends up feeling betrayed by the community leaders you’ll see a significant backlash. We try to be very transparent, plus there is a kind of firewall between the community and the company.
Inside Analysis: To what degree does the Varnish Cache community take part in the development process?
The Varnish community is the most important force driving the product forward.
Varnish Software does not control the product development as strongly as other commercial open source companies might do.
Chief Architect Poul-Henning Kamp works completely independent of Varnish Software and globally there are 5-6 other regular committers. In terms of hours spent I think we’re the biggest contributor to Varnish Cache, but with many limitations. As we’re not free to dictate things like the merge and release policy of Varnish Cache we have Varnish Plus – where we can have more “business friendly” maintenance policies.
Inside Analysis: In the last months, Varnish Software had contributed some interesting open source projects, such as e.g. Zipnish. Is there anything else brewing?
We will be doing a lot more with Zipnish. Regarding other projects, all I can say right now is that there will be new things coming.
Inside Analysis: Varnish Software is not only ‘brewing’ open source projects but also beer – please elaborate a bit
We once employed someone who was a home brewer who would occasionally bring a keg of his home-brewed ale to company cabin trips. This piqued everyone’s interest. So we decided to start brewing as a creative project internally. It coincided with the global craft beer craze, which made brewing equipment widely available and accessible. We found a good recipe online and adapted it ourselves. It’s been experimental and fun, and we have been learning as we go. The beer is actually pretty good. It doesn’t have a name yet, but what Phil Karlton once said that, “there are only two hard things in Computer Science: cache invalidation and naming things” – this might also be the case for naming beer. We are at least better at brewing the beer than branding it!