From: Mike R. <mri...@dr...> - 2002-06-04 00:29:52
|
I'm using perl-ldap for an Apache rewrite handler to provide mappings to Novell NetWare home directories that are mounted as shares on our Linux box. This means I'm binding once when Apache is started and the script runs continually, with Apache passing things to the script to rewrite. We're transitioning to Novell Cluster Services, and it's easy to point 'ldap' to the cluster IP address, which will always be available on a cluster node. However, if the IP address moves, my script will no longer work, as the LDAP connection no longer isn't known on the new server (the TCP connection tables do not move over when the cluster fails over). Thus I need to have a mechanism for timing out a bad connection and rebinding in the event of a server failure. This would also be useful in general for sites doing round-robin DNS of their ldap hostname, and resiliency in general. I feel that binding asynchronously and polling for results is the way to go, but I've not seen an example of how to poll asynchronously in perl-ldap. Has anyone done it? Alternately, can anyone suggest a better way to detect a stale connection and attempt to rebind? Thanks for your help. --Mike |