A plea for a more useful and discoverable built-in VCL

Guillaume Quintard guillaume.quintard at gmail.com
Mon Nov 6 06:34:16 UTC 2023


Hi everybody!

A bunch of questions I regularly get regarding Varnish behavior revolve
around the built-in vcl, mainly, I get one of these three:
- why is Varnish not caching?
- how come something is happening in vcl_X even though I don't have it in
my vcl?
- what on earth is that built-in vcl you are talking about?

As usual, I have a half-baked solution with a bunch of problems, which will
hopefully inspire smarter people to fix the issue properly.

What I came up with is here:
https://github.com/varnish/toolbox/tree/verbose_builtin/vcls/verbose_builtin
Essentially, use std.log() to explain what the built-in code is doing.

At the moment, it's a purely opt-in solution, meaning that you need to know
about builtin.vcl to find it, which doesn't really help with
discoverability, but I intend on including that code in the docker image,
which should raise awareness a bit.
The absolute best in my mind would be to have something similar in core,
but I can see how importing std would be a hurdle. Maybe as part of
packaging, we could include that file in the provided default.vcl?

I dismissed the performance penalty of printing a few more lines as
negligible, but I could be wrong about that.

There's also the question of phrasing, so we can have a message that is
concise but also gives enough information to debug the behavior. But that's
very minor, and the least of our worries here.

Thoughts?

-- 
Guillaume Quintard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20231105/8be9dc83/attachment.html>


More information about the varnish-misc mailing list