No subject

duja at torlen.net duja at torlen.net
Wed Apr 9 09:42:31 CEST 2008


>Hit/Miss status is already in the X-Varnish header, if it has two
>numbers it is a hit.

What does the numbers stand for?

>You can set your own header in vcl_recv along with the backend.
>Then in vcl_fetch, copy that header from req.foobar to obj.foobar
>and you should be all set.

I can do like this:
vcl_recv 
     set req.backend = mwc;
     set req.http.X-Backend = "Director";

But no like this:
vcl_recv 
     set req.backend = mwc;
     set req.http.X-Backend = req.backend;

I receive:
"Starting Varnish: varnishString representation of 'req.backend' not implemented yet.
(/usr/local/etc/default.vcl Line 32 Pos 42)
                set req.http.X-Backend = req.backend;
-----------------------------------------###########-

VCL compilation failed"

What I want know is which backend was used in the director. Is that possible?

Here is my backends and the director:

backend windows {
        .host = "10.1.1.124";
        .port = "80";
}

director mwc random {
        {
                .backend = windows;
                .weight = 2;
        }
        {
                .backend = {
                        .host = "10.1.1.125";
                        .port = "80";
                }
                .weight = 8;
        }
}

// Erik




More information about the varnish-misc mailing list