update1: sub probe_resp - VIP RFC

Nils Goroll slink at schokola.de
Mon Apr 17 17:20:58 CEST 2017


On 16/04/17 19:17, Poul-Henning Kamp wrote:
>> Did you miss the beresp.backend maybe ?
> No, I did not.
> 
> I was wonder if more intimate exposure was considered or ignored ?

The whole point of the VIP RFC is to modify the backend, and I intended to add
vmod functions later to (indirectly) manipulate the BACKEND object available in
the sub.

I had given this example:

On 12/04/17 07:35, Nils Goroll wrote:
> * Toy example for the use case mentioned above (needs more changes)
>
> 	sub probe_weight {
> 		if (beresp.http.X-Load ~ "^\d+\.\d+$") {
> 			my_rr.set_weight(beresp.backend,
> 					 1 / std.real(req.http.X-Load, 1.0));
> 		}
> 	}

the vmod code would check if the BACKEND object passed is contained in my_rr.

Nils



More information about the varnish-dev mailing list