On Wed, Oct 28, 2015 at 9:17 AM, Poul-Henning Kamp <[email protected]> wrote:
> In message <[email protected]>, Geoff Simmons writes:
>
>>> My current thinking is that we'll name the backend whatever the
>>> user/vcl/vmod writer likes (ie:  Backend name), and deal with the
>>> fall-out.
>>
>>At the very least, VMODs should have a way to discover if a backend
>>name is already in use by a VCL -- the VCL_HasBackend(vcl,name) idea.
>>Then a VMOD can choose to raise an error for duplicate names.

>>Maybe add a sentence or two to the "Writing a Director" doc about
>>backend names, what they're used for, and why this could be a problem.
>
[snip]
> Adding the .%u suffix makes the situation workable for people who
> make that mistake, and once they have sorted it out, it doesn't get
> in the way for them.

slightly related to this, could we possibly allow accessing the name in VCL,
like

  if(req.backend_hint ~ "zool") {
     /* do something */
  }

or even

std.log("backend was " + req.backend_hint);
?

I can imagine this might get tricky with directors, but I for one
would find this useful, even subject to the restrictions/confusions of
duplicate backend names etc

0K

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to