5 Don'ts When Caching with Varnish

Over time, the most popular content we’ve created relates to hands-on Varnish use and relevant dos and don’ts. Naturally, we continue to create more content about this because our raison d’être is to help Varnish users get the maximum performance and efficiency they can from their Varnish setups.

Let’s get down to business.

Read More

10/19/20 6:57 PM
by Arianna Aondio

Using obj.hits, clearly a hit and miss affair

VCL is awesome, but it's also a bit frightening to newcomers, and most of the time, people are more interested in something that "just works"™ than "doing the right thing"™ and they google their way out of it.

Problem is that the first thing that sort of works isn't necessarily the right thing, and the proliferation of one particular code snippet is what prompted the writing of this post. The snippet in question? This guy:

sub vcl_deliver {
    if (obj.hits > 0) {
        set resp.http.X-Cache = "HIT";
    } else {
        set resp.http.X-Cache = "MISS";
    }
}

Recognize it? Have it somewhere in your code, maybe? If so, read on, and let's try to do the right thing, and hopefully, get a better setup thanks to it. Don't worry, this is a short one, so hop in.

Read More

7/26/18 1:00 PM
by Guillaume Quintard

Ending the pipe dream: when to use pipe in Varnish

As you may know, part of my job consists of helping Varnish users, both customers and community users (join us on IRC!), often looking at their VCL and see if there's anything wrong. And sometimes, there is. After all, VCL is a programming language and mistakes happen. However, one point stands out as being badly understood, and I feel it deserves a short blog post to set the record straight.

Read More

3/14/18 2:00 PM
by Guillaume Quintard

Painful Varnish mistakes

This post was initially titled "Top 6 Varnish mistakes", to echo Espen's blog.  Even though his material is three years old, the content is still relevant. Plus, there's a healthy colleague competition going on here, and I can't just mimic Espen if I hope to beat him, so I had to do something different.
 
Instead, I'm going to compete on brutality: this post isn't about explaining the most common mistakes, but rather the ones that can really kill your service, one way or another. I know it sounds a bit scary, and it is, but that's for your own good, really. So buckle up, and let's see what I have in my Little Shop of Errors.
Read More

11/21/17 2:16 PM
by Guillaume Quintard

Varnish Software Blog

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

 

 
 

Posts by Topic

see all
 

SUBSCRIBE TO OUR BLOG