On Tue, Jun 16, 2015 at 3:27 PM, Poul-Henning Kamp <[email protected]> wrote:
> --------
> In message 
> <cabovn9cj8cadbpv7xccdm7d2vzuscx90lkqah-itpl3qc7t...@mail.gmail.com>
> , Dridi Boukelmoune writes:
>
>>Continuing on the dynamic backends track, here is a patch to allow
>>manipulation of probes. It is not usable yet, but will hopefully be
>>soon.
>
> Please say a little bit more or write a mock-up VCL ?

Sure, it will allow dynamic backends to have probes, and not force
vmod writers to build the probes themselves (but they could too,
probes have been miniojb'd). A vmod building a dynamic backend
could use a native VCL static probe.

--->8-------->8-------->8-------->8-------->8-------->8---
import std;
import vmod;

probe www_probe {
   ...
}

sub vcl_init {
  new dir = vmod.construct(..., www_probe);
}

sub vcl_recv {
  set req.backend_hint = dir.backend();
}

sub vcl_hit {
  if (std.healthy(req.backend_hint)) {
    ...
  }
}
--->8-------->8-------->8-------->8-------->8-------->8---

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

Reply via email to