Varnish load balancer & (keep session)

Axel DEAU a.deau at novactive.com
Fri Feb 5 10:13:33 CET 2010


Version: 2.0.6-1 

Insall: .deb 

Os: Debian 5.0.3

Hi,

I've got two backends running apache2: front1.domain.com &
front2.domain.com, set with the load balancing configuration from
http://varnish-cache.org/wiki/LoadBalancing
<http://varnish-cache.org/wiki/LoadBalancing> .

The issue is, when I shutdown apache2 of the first backend varnish don't
switch to the second and display "Error 503 Service Unavailable", is
that a normal answer from varnish?

Other question, does varnish load balancer keep php sessions, if yes how
will I do?

Varnishlog :

0 Backend_health - front1 Still healthy 4--X-RH 10 8 10 0.040008
0.039814 HTTP/1.1 200 OK

0 Backend_health - front2 Still healthy 4--X-RH 10 8 10 0.066948
0.066591 HTTP/1.1 200 OK

The S flag is missing in my log, is that an issue...

"4--X-S-RH" to notify that TCP socket shutdown succeeded from
http://varnish-cache.org/wiki/BackendPolling
<http://varnish-cache.org/wiki/BackendPolling> 

Part of default.vcl

backend front1 {

  .host = "front1.domain.com";

  .port = "80";

  .probe = { .url = "/";

             .interval = 10s;

             .timeout = 5s;

             .window = 10;

             .threshold = 8;

 }

}

 

backend front2 {

  .host = "front2.domain.com";

  .port = "80";

  .probe = { .url = "/";

             .interval = 10s;

             .timeout = 5s;

             .window = 10;

             .threshold = 8;

 }

}

 

director b1 random

{

   { .backend = front1; .weight = 5; }

   { .backend = front2; .weight = 1; }

}

 

#director b1 round-robin {

#    { .backend = front1; }

#    { .backend = front2; }

#}

Thanks for your help...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20100205/747963f1/attachment.htm 


More information about the varnish-misc mailing list