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

Re: slapd-meta Example Config ?



> Pierangelo Masarati wrote:
>>>"ldap://master/dc=entite3,dc=meta,dc=fr","ldap://slave/dc=entite3,dc=meta,dc=fr";
>>>
>>>isn't accepted :-(
>>>
>>>One would say that I create one couple uri/suffixmassage for the
>>> master and an other for the slave, uri
>>>"ldap://master/dc=entite3,dc=meta,dc=fr";
>>>suffixmassage "dc=entite3,dc=meta,dc=fr" "dc=entite3,dc=fr"
>>>uri           "ldap://slave/dc=entite3,dc=meta,dc=fr";
>>>suffixmassage "dc=entite3,dc=meta,dc=fr" "dc=entite3,dc=fr"
>>>
>>>but if both are running I'll get search result doubled !.
>>>
>>>Is it possible to use efficientlty replicas with meta ?
>>
>>
>> do you mean to use replicas for redundancy or for load distribution,
>> i.e. to have a clean failover in case of server failure or to
>> distribute load among servers? in the latter case you better
>> do some round-robin ot DNS level, in the former I don't think there's
>> any mechanism to list multiple server like in ldap_open()/ldap_init().
>> back-meta and back-ldap use ldap_initialize, which requires one URI as
>> input.  A redundancy check should be implemented at the API level, in
>> my opinion, so that other software can take advantage of it.
>
> I meant redundancy :-(
>
>> You may hack init_one_conn() in servers/slapd/back-meta/conn.c
>> to try a list of URIs until there's no failure, and
>> meta_back_db_config() in servers/slapd/back-meta/config.c to accept
>> multiple URIs (maybe on the same line); of course you need to provide
>> space to host them in the struct metatarget.
>>
>> In case, a patch would be welcome.
>
> I'am not very used to hack free software, but if I find time, maybe I'll
>  try ...
> However, if someone tries to do it, please let me known .

OK, forget my hints, now I remember why I didn't do that
right from the beginning: the call to ldap_initialize cannot
assess whether the server is up or not, since the connection
is actually established when the first operation is attempted.
There needs be a lot of reworking to allow this kind of feature
(which is not impossible in principle), but a lot of specific
coding is required, and it cannot definitely done at the API
level (unless extensively playing with the LDAP* structure)

P.M.
-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it