On Fri, Jan 20, 2023 at 03:33:21PM +0000, Norman Gray wrote:
> Ondřej, hello.
> 
> On 20 Jan 2023, at 10:47, Ondřej Kuzník wrote:
>> That said, patches implementing some kind of SRV are welcome. The easiest
>>  way might be to introduce an lloadd tier implementation that manages its
>>  backend collection accordingly.
> 
> It's not an OpenLDAP patch, but I've attached a module which might be
> of interest here.  This exposes a function
> 
>     char* get_sorted_srv_records(const char* domain);
> 
> which does a SRV lookup, and orders the records that come back
> according to the specification of RFC 2782 (though in a single pass,
> rather than the clumsy multiple pass algorithm that the RFC suggests).

Hi Norman,
DNS retrieval and parsing of SRV records is the easy part, and libevent
has code to help us with that already. It's the management of the
backends on the tier (shutting down those that aren't listed anymore,
adding those that are new, rearranging the lists) all while the server
is still running unless we request a full server pause for it. And any
of the backends being removed might still have pending operations, what
do we do with those?

And then the code that uses those levels and weights for each request
that comes in, in an efficient way. But a lot of that is in lloadd (tier
"weighted") and/or libldap already.

All of this is managed if you have another process that manipulates
cn=config for you and it can make some of those decisions as appropriate
for your own deployment.

Regards,

-- 
Ondřej Kuzník
Senior Software Engineer
Symas Corporation                       http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP

Reply via email to