Announcement Announcement Module
No announcement yet.
Failover switch back Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failover switch back

    Hello all,

    I have configured multiple LDAP servers as per reference documentation 8.1.1. LDAP Server URLs. I can confirm that if the first server crashes the application starts using successfully the next servers.

    However I would need the application to switch back to using the first server in the list when it comes available, even though the other servers would be also working. For instance attempt using the first server once in 30 seconds and move back to using that one when it comes back around.

    How should I go around to implement this?

  • #2
    If the connection is not pooled, or pooled with a very short timeout (~2 secs), then the ContextSource will be asked for a new connection and it will always start with the first server in the list. So my guess is that this will work out-of-the-box for you.

    If you're using the Spring LDAP pooling support, you should be able to configure various validation strategies, like when you're borrowing a connection from the pool, when you're returning it, and also regularly checking connections sitting idle in the pool.

    The important thing is that nothing hangs on to an invalid connection. Then you should be all right.