[python-ldap] Connect to multiple servers for failover

Michael Ströder michael at stroeder.com
Mon Apr 20 17:56:40 CEST 2015


Prashant Bapat wrote:
> Is there a way to connect to multiple servers for a query and iteratively
> try all of them before failing ?
>
> Can I do something like
>
> ldap.initialize(srv1, srv2, srv3) and it connects to srv2 if srv1 is down
> etc
>
> Is this possible ?

Did not test thoroughly myself but parameter uri is simply passed to 
OpenLDAP's libldap and libldap takes several space-separated LDAP URIs.

I prefer to deal with that one level higher though.

Ciao, Michael.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4272 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20150420/5275925f/attachment-0001.bin>


More information about the python-ldap mailing list