varnish redundancy
Laurence Rowe
l at lrowe.co.uk
Mon Sep 14 18:49:38 CEST 2009
2009/9/3 Poul-Henning Kamp <phk at phk.freebsd.dk>:
> 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.
Is there an advantage in using a director here instead of the following?
sub vcl_recv {
set req.backend = haproxy01;
if (!req.backend.healthy) {
set req.backend = haproxy02;
}
...
Laurence
More information about the varnish-misc
mailing list