Tim Gustafson wrote:
How does the OpenLDAP client library handle multiple A records being returned for a DNS
query for an LDAP server?
OpenLDAP doesn't alter hosts resolution behavior.
As usual, the first address (A record) returned would be used.
That is to say, if "host ldap" returns 188.8.131.52, 184.108.40.206 and
220.127.116.11, will the OpenLDAP client library only connect to 18.104.22.168? If a connection to
22.214.171.124 fails, will it try 126.96.36.199 and then 188.8.131.52?
It will not try 184.108.40.206 or 220.127.116.11 automatically if a connection attempt
to 18.104.22.168 fails.
It might happen to try them on the next connection, if the host needs to
resolve the LDAP server's name again, and either 22.214.171.124 or 126.96.36.199 is
the first A record returned.
Basically we're trying to achieve redundant servers and load
balancing using a round-robin-style DNS entry.
UC Santa Cruz