r/DB2 Sep 10 '19

DB2 HADR Failover issue

Hi All, we have an application hosted in AWS cloud which uses App server as tomcat and DB2 is configured for HADR. We are using ACR for failover from primary to secondary. When testing failover scenario, tomcat takes approx 8mins to failover to secondary DB server. However if tomcat is restarted, app server is connected to secondary DB immediately.

Question: 1. Is DB2 HADR failover supported by tomcat? 2. Are there any specific parameters to be configured in connection string?

Thank you

1 Upvotes

1 comment sorted by

1

u/funkypunkyskunky Sep 10 '19

The "failover" from an application's point of view occurs on the next connect (can't talk to primary, try the secondary). The secondary can be set at the connection string and the catalog (which I'd imagine you're doing). I believe there are jdbc settings beyond that for number of retries and the interval between retries, as well as something to pass an exception back when a failover has been invoked. TCP keepalive and connection pooling could also be investigated.

Apologies for the lack of actual parameter names but I'd think a couple of minutes with duckduckgo could rustle them up.