Loading and using already compiled VCL?

Hauke Lampe lampe at hauke-lampe.de
Sat Nov 24 06:22:43 CET 2012


On 23.11.2012 01:29, Hugo Cisneiros (Eitch) wrote:

> I was talking with someone about Varnish and he raised an issue that got me
> curious: is there any way to use a VCL object compiled in another machine?

Sure there is. Replace cc_command with a suitable command to fetch/link 
your precompiled VCL. E.g.:
-p cc_command="ln -s /usr/lib/varnish/vcl-precompiled.so %o"

You'll still need a valid local VCL file to satisfy the VCL compiler.

Keep in mind that not compiling VCL on the local machine against the 
currently installed varnish can lead to problems that may be hard to debug.

Also, the local VCL file will not reflect the running config any more. 
Make sure to put a large "Don't waste your time here" banner at the top.

> The solution could be to compile the VCL on another machine and load on the
> servers, like a "package".

Exactly. Keep a private repository with your own varnish packages and 
pre-compiled VCLs. With the right dependencies, you can ensure that your 
VCL and varnish are always built together on the same system.



Hauke.




More information about the varnish-misc mailing list