> We have 4 LDAP servers that are 'load balanced' via DNS using round-robin.
See http://jasig.github.io/cas/current/planning/High-Availability-Guide.html#avoid_round_robin_dns. > When CAS makes its connections, does it do an actual DNS lookup or does it > only use the domain name:port thus relying on the network stack to handle DNS? Performs a DNS lookup assuming you have configured only a single hostname in CAS configuration files. > How is CAS supposed to react in a situation where it cannot open a connection > to an LDAP server? Can't say how it's supposed to work, only the expected result for a given configuration. The expected behavior for your configuration is for the connection to time out to the dead host. CAS would rely on client-side DNS cache timeouts to get a different host. It's vitally important to know that by default Java caches DNS lookups _forever_; here's the relevant configuration bit from java.security which is commented out by default: # NOTE: setting this to anything other than the default value can have # serious security implications. Do not set it unless # you are sure you are not exposed to DNS spoofing attack. # #networkaddress.cache.ttl=-1 So unless you have changed this you'll never get any kind of failover from DNS round robin. > What is CAS supposed to do if a connection in the pool no longer works (ie. > Starts timing out)? I don't see anything from your description that indicates you're using a connection pool. Do you have a connection pool set up on the single round-robin DNS host? If so it provides no high-availability features for the reasons described above, but would provide value in terms of performance/efficiency by avoiding the SSL/TLS startup costs on every operation. > Is there a way to configure CAS so that it falls through to the second > context source in the event that the first one times out? It's possible for authentication handlers; simply set an aggressive connect and read timeout. For resolvers, may not be possible. I'd have to analyze further and possibly see your config. M -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
