[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: server unavailable in proxy backends

--On Friday, May 05, 2006 2:22 PM -0400 Aaron Richton <richton@nbcs.rutgers.edu> wrote:

Nominally, I'd want to see some sort of circular linked list. If (really,
I should say 'when' since this is on the whiteboard for next year or two,
but...if) I had back-ldap fronting to a bunch of redundant URIs, what I'd
essentially have is

uri "ldap://data-center ldap://backup-center ldap://offsite";

where capacity(data-center) > capacity(backup-center) > capacity(offsite).

Ideally, it would retry all of those in a circle: data-center if possible,
else backup, else offsite...else....sit on hands for $AWHILE, retry to
data-center. HOWEVER...iff I am using backup-center or offsite, I'd ALSO
want every $AWHILE(2?) to try to reconnect to the head of the list, i.e.
data-center. The idea is pretty simple: always use the best server I can
get access to. The closest analogy that comes to mind is MX records
priority values, although that doesn't have to deal with long persistent
connections, which I also find desirable. (It'd be best if this could be
parallelized, so the attempt to try better servers doesn't interfere with
the "hot" connections to the backup servers until the better servers are
alive again? Yes, this will probably involve more mutexing and a bit of
logic, but even small parts of this big idea would be nice resiliency

Hm, this is essentially solved by weighted load-balancing, isn't it?

For example, on my ldap servers, I had 3 dedicated to mail routing, out of my 9 servers.

Each of the 3 had their own weighted load balance pool, consisting of weights of:

ldap-mail1: ldap1 (1), ldap2 (10), ldap3 (100), ldap4 (1000), ldap7 (1000)
ldap-mail2: ldap2 (1), ldap3 (10), ldap1 (100), ldap5 (1000), ldap8 (1000)
ldap-mail3: ldap3 (1), ldap1 (10), ldap2 (100), ldap6 (1000), ldap9 (1000)

So all the clients just query ldap-mail1, and if any particular ldap server was down, they'd just the next lightest weight in the pool.

The weight serves another function as well -- You'll note the weights are factors of 10 in this case. What this means (with ldap-mail1, for example) is that if the load on ldap1 is more than 10 times that of ldap2, the pool return ldap2 instead.

Essentially, I think this problem should be solvable with a weighted load balancing solution.


Quanah Gibson-Mount
Principal Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html