In message <[email protected]>, Rob A
yres writes:

>Does anyone have any experience or tips on using varnish in this way?

You can do some really insteresting things, such as:

One such is to configure the two varnishes along these lines:

        vcl_recv {
                if (client.ip ~ other_varnish) {
                        set req.backend = real_backend;
                } else {
                        set req.backend = other_varnish;
                }
        }

        vcl_pass {
                set req.backend = real_backend;
        }

        vcl_pipe {
                set req.backend = real_backend;
        }

For it to be really smart you want to use directors for the
"other_varnish" and probes to ascertain health.

We do not have a "priority_director" (we probably should have)
but you can get much the same effect with the random director
and very uneven weights:

        director other_backend {
                { .backend = b_other_varnish ; weight=100000; }
                { .backend = b_real_backend ; weight=1; }
        }

Should the probes mark the other_varnish unhealthy, all trafic
will go to the real backend.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to