Origin shield technology isn’t new, and many companies already rely on origin shielding to protect their CDNs from overload.

Until recently, when two outages put catastrophic CDN downtime into the global spotlight, the powerful but quiet benefits of the humble, hard-working origin shield have been the unsung heroes of internet resilience. Offering an extra layer of protection against downtime, mitigating the effects of traffic overloads, origin shielding is a must-have. But it’s also a bulwark in crisis situations, such as the one we witnessed in June 2021.

Understanding how an origin shield protects you in outage situations

The idea behind an origin shield is fairly simple. By adding an extra…


In June 2021, Google factors your page speed into your search ranking score for computing your Google Page Rank.

Your website’s speed is not only important to your users, but also to Google. Google factors your page speed into your search ranking score and in June will rely on it more heavily for computing your Google Page Rank. This performance score is also called your Google Page Experience Score. In this blog post, we’ll demonstrate how Google computes your performance score and how Varnish can help improve it.

Google uses an in-house tool called “Lighthouse” to compute page speed scores…


Online and flexible learning options were already key to universities’ long-term growth strategies.

Higher-ed was already experimenting heavily in hybrid and completely online learning before Covid-19, with extensive investment in edtech leading development both in terms of curriculum and technology.

For universities and educational institutions, sustainability and long-term usability and cost optimization are watchwords. At the same time, students entering universities now are digital natives who expect their experience to encompass flexibility in learning and a technology and innovation-driven journey from admission to graduation.

Flexible higher-ed in a post-Covid world

A number of universities and educational institutions have understandably decided to sit on the fence and…


Here’s what you should be doing in your Varnish setup.

Do these things in Varnish!

1. Use Varnish’s shared memory logging

Varnish has some powerful logging abilities (VSL — Varnish SharedLog) that can provide a lot of troubleshooting and performance insight. Our webinar hosts have both written about shared memory logging in the past: I wrote about it in the Varnish blog, and Thijs provided some in-depth tutorial action on his own blog. We also have a webinar coming up soon dedicated to logging. Stay tuned.

Meanwhile, the logging tools are something we are all passionate about. Log output is quite verbose, but that’s part of what makes it as good…


Here is some guidance for Varnish users to help them get the maximum performance and efficiency from their Varnish setups.

1. Don’t set your time to live (TTL) to zero

It seems counterintuitive. If you don’t want to cache your content, doesn’t it seem like it makes sense to give the content a null TTL?

However, do not set your TTL to zero. This is really important. Keep in mind that if you set a 0 TTL, you’re instructing Varnish to fetch content from the backend and immediately discard it, which could very easily hamper performance significantly. If one of our primary goals is to serve content rapidly and to avoid overwhelming backends with stampedes of traffic, a null TTL will exacerbate the problem.

One method we use to protect…


The single most frequent question we get from people discovering Varnish is “Do you support request collapsing?”. And admittedly, it always catches us off guard, because of course, it has been doing so for years, and it’s a caching server, so that’s a must-have, right? (Yes, yes it is.)

For this reason, in this post, we are going to review some of the little features we take for granted but that also make Varnish a great origin shield.

A content delivery network (CDN) is a set of geographically distributed servers that will cache requests directed at your server(s), that is…


You probably already know that we love the VCL (Varnish Configuration Language) idea, big time. Being able to change the processing logic via code opens a world of possibilities and makes pretty much all other tools feel constrained in their configurations. But…

But, well, VCL is code, and code is scary to a lot of users, and I can understand when you begin with Varnish and only have very limited configuration needs, VCL can feel complicated and some would prefer a simple, declarative language. The good news is that it’s totally possible, let’s see how we can help!

VCL is so good it can replace itself

If there’s…


First of all, these timeouts are Varnish Cache parameters. This means that they are global to all requests and backend connections, and are either set on startup or runtime via `varnishadm`.

If you for example want to increase timeout_req to 5 seconds, you can either add “-p timeout_req=5” to the startup arguments in `/etc/sysconfig/varnish`, or run `varnishadm param.set timeout_req 5` (last one not persisted).

Client-side timeouts
The client side timeouts handles how long Varnish Cache will wait for a slow or abusive client. After a timeout is signalled, normally the client connection is simply closed down. …


In this post I will shed some light on Varnish Cache memory usage. In particular, we will examine the malloc storage backend and tune jemalloc for optimal usage.

Storage Backends

First, let’s review how Varnish Cache actually stores its content. Varnish Cache stores content in pluggable modules called storage backends. It does this via its internal stevedore interface. This interface accomplishes a few things. First and foremost, it gives the storage backend tremendous flexibility in choosing how to store content. Secondly, it makes sure that the storage backend adheres to Varnish Cache’s high performance nature. Finally, it allows Varnish Cache to run…


Although the Varnish Book covers all Varnish-related things, we’ve gathered the most common Varnish Cache mistakes and are addressing these in this short tutorial.

Photo by Louis Hansel on Unsplash

UPDATE: this post has been around for quite some time already and some items have become outdated. To address this we’re hosting a webinar on the same topic.

  1. Caching set cookies

Caching an object with a Set-Cookie header can have devastating effects, as any client requesting the object will get that same cookie set. This can potentially lead to a session transfer. In general we recommend avoiding the use of return (deliver) in vcl_fetch, to stay safe against this. If you really do need a return (deliver), be careful and check for the presence of Set-Cookie first. …

Varnish Software

Varnish Software is the world’s leading provider of open source web application acceleration software.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store