[Varnish] #589: Round robin director not using healthy backend
Varnish
varnish-bugs at projects.linpro.no
Mon Nov 23 15:19:59 CET 2009
#589: Round robin director not using healthy backend
----------------------+-----------------------------------------------------
Reporter: jrieger | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
I have configured varnish to use two backends.
If i turn off the first one (idefix_gallia), I get HTTP status 503.
varnishlog correctly reports that the first backend is sick and the second
one is healthy, but varnish doesn't use that backend.
If i turn off the second one (miraculix_gallia), the first one is used and
I get HTTP status 200 as expected.
This is my VCL:
{{{
backend idefix_gallia {
.host = "192.168.0.199";
.port = "http";
.probe = {
.url = "/";
.interval = 5s;
.timeout = 1s;
.window = 5;
.threshold = 3;
}
}
backend miraculix_gallia {
.host = "192.168.0.200";
.port = "http";
.probe = {
.url = "/";
.interval = 5s;
.timeout = 1s;
.window = 5;
.threshold = 3;
}
}
director gallia round-robin {
{
.backend = idefix_gallia;
}
{
.backend = miraculix_gallia;
}
}
sub vcl_recv {
if (req.http.host ~ "^(www.)\.example\.com$") {
set req.backend = gallia;
}
}
}}}
This is what varnishlog reports:
{{{
0 Backend_health - idefix_gallia Still sick ------- 0 3 5 0.000000
0.000319
0 Backend_health - miraculix_gallia Still healthy 4--X-RH 5 3 5
0.000436 0.000473 HTTP/1.1 200 OK
}}}
This problem is reproducible in Varnish 2.0.4, 2.0.5 and trunk on Gentoo
Linux.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/589>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list