OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
poor ldap load distribution

From: Dan Lannom (dlannomumd.umich.edu)
Date: Fri Jun 01 2007 - 13:14:34 CDT


I'm running postfix 2.4.0-2 on Debian Etch [backport] with ldap lookups
for virtualaliases/relay_recipient. postfix-ldap is also version 2.4.0-2
and ldap-utils is 2.3.30-5.

I'm trying to use a round robin DNS entry to distribute the queries over
multiple ldap servers, but for some reason they are all being redirected
to the same system, which is pushing load too high.

Ldapsearch against the same DNS entries exhibits the same behavior of
all queries going to the same server. So it seems unlikely to be a
postfix issue per-se.

The current maps look like

server_host = rrobin-dns.domain
search_base = dc=searchbase
query_filter =
(&(|(mail=%s)(mailalternateaddress=%s))(maildeliveryoption=mailbox))
result_attribute = maildrop
bind=no

and the queries from the DNS server return something like:

Name: dns-a-record
Addresses: ip1, ip2
..
Name: dns-a-record
Addresses: ip2, ip1

in normal round-robin fashion

Originally the ldap servers were on different subnets but moving them to
the same subnet made no different.

The server getting all the queries responds slightly faster due to a
different configuration, but this is not trivial to change.

Load does transfer to the 2nd system, if the 1rst system is disabled.

Any suggestions?

Thanks,

Dan Lannom
UM-Dearborn