September 12, 2016
3 min read time

Tried and tested - NYT values varnishtest as much as we do

Not long ago, the New York Times posted a piece, “Testing Varnish Using Varnishtest”, in their tech blog. The writer explains the challenges of working with legacy code that was not designed for continuous delivery practice and states upfront as an introduction to his work with Varnish: “One of the tougher challenges I faced was learning how to test the systems I inherited, and one of those platforms I inherited was our Varnish stack.” He goes on to explain in more detail why this posed a significant learning curve for him, in part because of Varnish’s own configuration language, VCL. VCL enabled a lot of flexibility, but then he found that he struggled at first with testing the VCL.

But he eventually learned what many Varnish users learn: “Learning how to test VCL wasn’t easy, but it can be.” How? With a little built-in testing tool called varnishtest. As the NYT blog points out, “Varnishtest gives you the ability to write VCL tests you can run on the command line or as part of your build process.” And it’s really as simple as that - a little bit of learning in the beginning that pays dividends in the end.

Read the book

You can read everything you need to know about varnishtest in the Varnish bible of sorts, the Varnish Book. The varnishtest chapter provides a comprehensive overview.

Test is best

But… because varnishtest is such a valuable, but often overlooked and underused, tool, we like to keep reminding readers that it’s available and ready to put to the test. Especially when our friends at the New York Times (and other high-profile aficionados) are also using varnishtest to make their work easier.

Here are a few more resources on varnishtest:

Blog post: What is varnishtest?

Blog post: When in doubt, test.

To help you avoid some of the most common mistakes we’ve seen Varnish users make, here’s one of our most recent on-demand webinars, “10 Varnish Cache mistakes and how you can avoid them”. 

WATCH THE WEBINAR

Photo (c) 2013 University of Liverpool Faculty of Health used under Creative Commons license.