Updating VMODs with zero downtime

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jul 30 09:58:45 CEST 2014


--------
In message <2EB395BA-A8A4-4458-AD5F-C5F7EF0E3960 at gmail.com>, Carlos Abalde writ
es:

>In all cases, any change in the VCL (i.e. replacing "world" by something 
>else) was immediately reflected in Varnish once the service was 
>reloaded. However, any change in the VMOD (i.e. replacing "Hello" by 
>something else, followed by a compilation and installation of the VMOD), 
>was not reflected when reloading the service. It only worked as expected 
>after a restart of the service. 
>
>Sounds this right to you? Am I missing something here?

So one murky bit here is if your OS's dlopen(3) implementation discovers
that the file has changed.  It sounds like it doesn't, and just reuses
the old already loaded copy :-(

The surefire way to fix that is to append a version number to the
vmod filename, but it's kind of ugly...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list