Introducing vmod-accept

During the latest Varnish Summit in London, the awesome Thijs Feryn had a presentation in which he explained the need to normalize Accept headers, and I proudly spoke up to say that a few weeks prior, I actually wrote a VMOD to do exactly that.

Well...I DID write it, but never actually blogged about it, being the procrastinator that I am. You can consider this post as a cathartic mea culpa, and as an attempt to give a bit more exposure to a VMOD that should have been advertised/used weeks ago. But enough self-flagellation, and let's look at this VMOD, after we explain what Accept headers are. If you are already fluent in that subject, you can skip ahead to the "Balls to the walls" section.

Read More

21/06/17 12:22
by Guillaume Quintard

Custom Varnish Cache development for MaxCDN

Part of the beauty of Varnish Cache is its flexibility. Most Varnish users are familiar with Varnish Configuration Language (VCL) and how it can be wielded like a weapon or deftly handled like a pen to create custom configurations.

Read More

20/06/17 13:00
by Raj Singh

VMOD tutorial: vmod-str

If I were to ask you what is so great about Varnish, you'd probably answer: "the VCL, duh!". And you would be right, but maybe not for the same reason I'm loving it: the Varnish Configuration Language shifts the traditional declarative mindset of configuration to an imperative state.

It gives you great control, allowing you to actually write your policies, but beyond this, it means that plugins (or VMODs) are super easy to write. Because the VCL is imperative, plugins don't have to register themselves, care about hooks, or worry about execution order, making them a library that you can write in a matter of minutes.

And that's what we are going to explain here, step by step. A moderate knowledge of C and usual development tools (git, autotools, etc.) is expected, but nothing crazy, don't worry.

Read More

17/01/17 13:30
by Guillaume Quintard

Vmod-goto: your go-to guy for dynamic backends

In Dridi's post, you learned about Varnish's technical choices regarding backends, and why a VMOD was necessary. If you didn't read the article (shame on you), here's the recap:

  • Varnish resolves domain names and IP when compiling the VCL, so the resolved address is set in stone.
  • And there must be exactly one resolved address, if the domain name is not found, or is served by multiple IPs, the VCL won't load.
  • You can work around this with a cron'd script, periodically generating a VCL with the correct and updated addresses.
  • However, this forces you to garbage-collect the old VCL; you'll have to take extra care of the probes and you'll reset the backend stats everytime you reload since backends are tied to the VCL.
  • So we built a VMOD.

And that VMOD is named "named", another proof that engineers shouldn't be allowed to name things.

Read More

23/11/16 13:03
by Guillaume Quintard

All things Varnish related

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

SUBSCRIBE TO OUR BLOG

Posts by Topic

see all