when a backend in a director is stopped varnish is no longer responding ( 2.0 beta1)
jean-marc pouchoulon
jeanmarc.pouchoulon at gmail.com
Fri Sep 19 23:34:43 CEST 2008
Hi,
I configured varnish (64bits server) with two backends as a director:
backend www2 {
.host = "XX.XX.XX.XX";
.port = "80";
.probe = {
.url = "/";
.timeout = 2s;
.interval = 5s;
.window = 2;
.threshold = 1;
}
}
backend www2 {
.host = "XX.XX.XX.XX";
.port = "80";
.probe = {
.request =
"GET / HTTP/1.1"
"Host: www...."
"Connection: close";
.timeout = 500ms;
.interval = 5s;
.window = 2;
.threshold = 1;
}
}
director www_director random{
{ .backend = www1; .weight = 2; }
{ .backend = www2; .weight=1; }
}
...
sub vcl_recv {
set req.grace = 30s;
if (req.url ~ "/pub") {
if (req.restarts == 0) {
set req.backend = pub8;
} else {
set req.backend = pub6;
}
} else {
set req.backend = www_director;
}
#
if (req.http.Cookie ~ "www1\...." && req.http.Cookie ~ "auth_id=" ) {
set req.backend = www1;
}
if (req.http.Cookie ~ "www2\...." && req.http.Cookie ~ "auth_id=" ) {
set req.backend = www2;
}
When I stopped one of the backend, varnish is no longer responding.
I can see clearly in varnishlog that the backend regards to ill state
but the failover is not working.
A telnet on port 80 of varnish didn't work either.
ReLauching the backend and varnish restarts working.
Using a vcl.conf without director is working ( The polling detects the
fail of the backend)
thanks for your help
jean-marc
More information about the varnish-misc
mailing list