dridi at varni.sh
Tue Oct 10 21:26:01 UTC 2017
Dear Varnish community,
This is rather for developers, so if you are only using Varnish it
will probably not be very interesting...
So, developers then: today I'm sharing a very recent project to get
Varnish projects started differently than how projects usually start.
Instead of forking libvmod-example, you can now run a script to
generate a working project.
With Varnish 5.2.0 the VUT (Varnish UTility) API became public, it
allows you to create a log processor similar to varnishlog or
varnishncsa but removes most of the boilerplate. Even if you aren't
making a log processor, this API can still be useful: it is used in
Now instead of introducing a new vutexample repo you could fork to
start your project, I wrote VCDK. Based on my experience that such a
utility can often be used in conjunction with a VMOD, VCDK makes it
easy to start a project with both VMODs and VUTs (yes, plural):
vcdk autotools --vmod=foo,bar --vut=baz myproject
It is available on Github, currently super alpha. See the quick
tutorial to get a feel of how easy it is to get a project started:
VCDK is modular, although currently only one plug-in exists. It only
supports Varnish 5.2 because a) I don't know when 4.1 will go EOL
and b) I started it less than a week ago and went straight from idea
to working code.
I hope this will convince people to look at the VUT framework and
consider writing more log processors instead of doing blocking
operations in VCL, and help the ecosystem grow like I believe
libvmod-example helped people get started with VMODs. This is
how I started myself.
About log processors or VUTs, some idiot  tried to create a project
ready-to-fork similar to libvmod-example, but for all ways to extend
Varnish. I can report at least one successful VUT is running in
production thanks to that, but can't give any details. That idiot is
me, and I was pleased to see this project help others solve a problem
using a log processor, but I very much prefer the change of direction
I made in VCDK (probably because it brings some shell scripting fun
If you don't like autotools (or autocrap as PHK calls them;) why not
help build a cmake plugin? Not just C projects, there are bindings in
other languages like Go or Pythton. If you read this far, please
consider running it and see whether it really is portable or only works
on my machine.
More information about the varnish-misc