[PATCH] add documentation about backend naming for VMOD authors

Dridi Boukelmoune dridi at varni.sh
Sun Nov 1 23:20:08 CET 2015


> The VMOD_PRIV thing ties heavily into this, (and maybe we should
> really create backends as VMOD_PRIV's to unify these concerns.)

I considered using a PRIV_VCL pointer, but that wouldn't give me a
"reserved" symbol (vcl_name) like a VMOD object does. And if you use
a VMOD object, you already have a struct to manage state and don't
need a private pointer.

> But that reminds me:  What was the consensus on my proposal for .%d suffix
> for colliding backend names ?

I didn't follow the discussions, I only saw that something was going
on with dynamic backends. But adding a suffix to the backend name
doesn't seem like a good idea IMHO. I think it would be confusing for
end users to deal with dupes and figuring out what's going on.

I'd rather shift the responsibility to VMOD writers to follow the POLA
and have Varnish enforce rules such as not having two backends with
the same name. I don't care how it's handled (panic or return NULL)
but I think we shouldn't have some magic behavior.

Just like Varnish will panic if a backend is created on a cold VCL.

Best,
Dridi



More information about the varnish-dev mailing list