[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: reliability of LDAP lookups
Randy Kunkee wrote:
> It would not be difficult to write a function that would rotate between
> a number of entries in the host list. In fact, you could experiment with
> writing your own function (or modifying one of the low-level functions in
> the client library) to have a static int that increments each time it is
> called, such that the open tries:
>
> host[0] thru host[n]
> then host[1] thru host[n], host[0]
> and host[2] thru host[n], host[0] thru host[1]
> etc.
>
> This might also have a nice affect of balancing load between a number
> of replicas. Optimally, this could become a new option, eg. an
> LDAP_API_FEATURE_X_OPENLDAP_ROUND_ROBIN or something like that,
> with a default behavior configured at compile time.
This sounds like what I mean. I was thinking it more on the reliability side
because we already use a round robin ldap server resolution at the nameserver
level, i.e. normal users access a server called ldap@my.org which is assigned
a different machine at every call by the dns. On the contrary, sendmail calls
localhost to minimize network load, which is a dedicated replica; the other
servers are listed for reliability, but they are never called because the most
usual
problem is not a server failure, but a timeout due to the server "hanging" for
a few seconds. This does not change if I use a primary server different from
localhost (i.e. the problem is not related to mail server load).
I had a look at the code (see ITS# 861) and implemented a very simple solution,
which could possibly evolve in the direction you proposed.
Bye, Pierangelo.