r778 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Aug 9 13:31:37 CEST 2006


In message <20060809112439.2C2711EC670 at projects.linpro.no>, des at projects.linpro.no writes:
>Author: des
>Date: 2006-08-09 13:24:39 +0200 (Wed, 09 Aug 2006)
>New Revision: 778
>
>Modified:
>   trunk/varnish-cache/bin/varnishd/cache_vrt.c
>   trunk/varnish-cache/include/vcl_returns.h
>   trunk/varnish-cache/include/vrt_obj.h
>   trunk/varnish-cache/lib/libvcl/vcc_compile.c
>   trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
>   trunk/varnish-cache/lib/libvcl/vcc_obj.c
>Log:
>Add support for using separate backends for separate virtual hosts:
>
> - remove the obj.backend variable, which is not connected to anything.

This was intended for the prefetcher I suspect, but I guess we can do
a backend determination based on the objects stored headers.

It's troublesome any however, because we might have changed VCL in
the meantime, so I guess it was due to be removed anyway.

> - define a req.backend variable and implement l/r functions for it
> - complete / correct support for setting / comparing backend values

>+void
>+VRT_l_req_backend(struct sess *sp, struct backend *be)
>+{
>+	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
>+	sp->backend = be;
>+}

This is only good while you hold a VCL reference, so please
clear the field when we hit state DONE in cache_center.c at the
same time we let go of the VCL reference.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-commit mailing list