Hash director and backend health

Thiago Figueiro TFigueiro at au.westfield.com
Tue Aug 2 04:33:19 CEST 2011


Hi, Ken.

Ken Brownfield wrote:

> You could have the hash backends each be individual round/random 
> directors with your intended server having a very high weight 
> and your intended backup backend a weight of 1.  Awkward and 
> somewhat lengthy, but it works.  The only downside is that the 
> fallback will get a non-zero amount of traffic.

> director server1d random {
>        { .backend = server1;   .weight = 10000000; }
>        { .backend = fallback1; .weight = 1; }
> }

I'm not sure I got your idea correctly as "hash backend" is not something I'm aware of.  Are you suggesting I cut-up the distribution manually?

I guess what I'm really after is a CARP[1] implementation such as the one in F5's BigIP [2].  In their implementation the sick servers are removed from the pool and the hash algorithm does its thing, redistributing the URLs amongst the healthy servers.

The other way I understood your suggestion was to do something like this:

director R_director random {
        { .backend = centre_rail_ausyd_fap01; .weight = 1; }
(...)
        { .backend = centre_rail_ausyd_fap08; .weight = 1; }
}

director H_director hash {
        { .backend = centre_rail_ausyd_fap01; }
(...)
        { .backend = centre_rail_ausyd_fap08; }
}

director example random {
        { .backend = H_centre_rails; .weight = 999999; }
        { .backend = R_centre_rails; .weight = 1; }
}

That could work but varnish 2.1 doesn't take directors in .backend.

I'm trying to avoid using our BigIP to do the job because Varnish is currently responsible for figuring-out the correct backend based on the request.  If I use the BigIP for this I'll need to either get rid of Varnish altogether add another BigIP VIP to select the backend based on CARP (BigIP-PublicVIP -> Varnish -> BigIP-InternalVIP -> Backends).


[1] http://en.wikipedia.org/wiki/Cache_Array_Routing_Protocol
[2] http://support.f5.com/kb/en-us/solutions/public/11000/300/sol11362.html



______________________________________________________
    CONFIDENTIALITY NOTICE    
This electronic mail message, including any and/or all attachments, is for the sole use of the intended recipient(s), and may contain confidential and/or privileged information, pertaining to business conducted under the direction and supervision of the sending organization. All electronic mail messages, which may have been established as expressed views and/or opinions (stated either within the electronic mail message or any of its attachments), are left to the sole responsibility of that of the sender, and are not necessarily attributed to the sending organization. Unauthorized interception, review, use, disclosure or distribution of any such information contained within this electronic mail message and/or its attachment(s), is (are) strictly prohibited. If you are not the intended recipient, please contact the sender by replying to this electronic mail message, along with the destruction all copies of the original electronic mail message (along with any attachments).
______________________________________________________




More information about the varnish-misc mailing list