[PATCH] Random director tries all backends before giving up

Jack Lindamood jack at facebook.com
Tue Apr 13 22:02:49 CEST 2010


Thanks for the comments.  After thinking about it more, here's an alternative patch that should solve my need for the original [PATCH], resolve Adrian's issue by not increasing the calls to VBE_GetFd, and address a XXX inside the code.

http://github.com/cep21/Varnish/commit/5723dfeb8754d371b52445ad457ff6b752efc875 

-----Original Message-----
From: phk at critter.freebsd.dk [mailto:phk at critter.freebsd.dk] On Behalf Of Poul-Henning Kamp
Sent: Tuesday, April 13, 2010 11:54 AM
To: Jack Lindamood
Cc: varnish-dev at varnish-cache.org
Subject: Re: [PATCH] Random director tries all backends before giving up 

In message <5C8A0918F4B0CC41B41F7C2DFE855B6007204F8FE2 at SC-MBXC1.TheFacebook.com

>Summary:
>
>The current random director gives up when it can't get a FD to the backend 
>it wants retries times in a row.  Rather than give up and return NULL, which
>is guaranteed to cause a vcl_error, as a last ditch effort we try all other
>healthy backends until we get one that works.  This is mostly useful in 
>the between time after a backend server dies and before the health check
>fails enough to mark a backend unhealthy.

I'm not sure this is a good idea, and my worry is that making it a
good idea requires far too many config handles to make any sense.

But I'm willing to be persuaded by good arguments.

At one level, I would really love if we could move director policy
into VCL, but my attempts to write even a mockup has failed to
produce something sensible.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.




More information about the varnish-dev mailing list