Assertion failure in VCL_DelBackend()

Geoff Simmons geoff at
Mon Nov 16 10:26:58 CET 2015

Hash: SHA256

On 11/16/2015 12:24 AM, Dridi Boukelmoune wrote:
> I believe you're not supposed to use VCL_DelBackend directly, and 
> static backends are owned by the VCL. You're not supposed to
> tamper with them.
> What is the use case?

It's for a VMOD to manage backends at runtime, meaning create and
delete them. The use case takes us a little far afield, so let me come
back to that further down.

VCL_DelBackend is declared in $include_dir/cache/cache_backend.h, so
it's available to a VMOD, and there's no indication that it's "not
supposed to" be used. I've suspected that there are things in
$include_dir that aren't really meant to be public, but if we're
serious about that, and if Varnish is liable to crash if a VMOD does
use them, then perhaps we should separate out the non-public
interfaces. Or at least document them as non-public -- we have that in
the *_int.h includes in vapi, for example.

But it would be a real letdown if VCL_DelBackend is made unavailable
with no replacement for removing backends. I don't see any other
current interface that can do it.

As I mentioned, VCL_DelBackend does work for the dynamic backends that
the VMOD creates (with VRT_new_backend), and I haven't investigated
why they're different from the static backends. I can live with a VMOD
that can only remove its own backends, but the call seemed to me to be
general enough for static backends as well, so I thought why not.

>> Bug report? (Are we still using trac for that, or are we into the
>> Brave New World now?)
> I think not.

You think ... there should be no bug report? Or that we're not using
trac any more? Or that we're not using github for bug tracking ... ?

... about that use case: It's for "microservices", which are
lightweight backend apps running in docker containers that are managed
by mesos/marathon, and are rapidly created, removed and migrated. So
rapidly that we couldn't get it to work any more by changing the
backend config in VCL and running vcl.load/vcl.use. We've been forced
to add haproxies as an intervening layer, which are backends for
Varnish, and they in turn get the changing backend configs. I'd like
to use dynamic backends in 4.1 to be able to get rid of the extra
layer, and for that, we need to be able to remove backends at runtime.

- -- 
** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstraße 32
22301 Hamburg

Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
Version: GnuPG v1


More information about the varnish-dev mailing list