I understand that unplanned outages are rare but we need a high availability solution which does not involve manual intervention.
On Mon, Mar 11, 2013 at 9:05 PM, Shanti Suresh <sha...@umich.edu> wrote: > On Mon, Mar 11, 2013 at 11:00 AM, André Warnier <a...@ice-sa.com> wrote: > > > > > amit shah wrote: > > > >> Apparently we use Oracle as our data store while the solution you > >> mentioned > >> is for mysql. > >> > > > > And did you check if the Oracle JDBC driver provides such an option ? > > > > > > > >> Is there a way tomcat can provide a notification after all its retries > to > >> the database server have failed? This way at least I can create a new > >> connection pool configured to a different database server in order to > >> simulate a automatic connection failover from the application side. I > >> understand that this step would require time for the retries and > creation > >> of new pool. > >> > > > > I am not a Java specialist, but I would imagine that at least your > > application would get some kind of I/O exception when that happens on a > > read or a write. > > Can you not catch that and do whatever you need to then ? > > After all, even if the driver itself handles the primary case, there > would > > still be a possibility that even your backup database server would also > be > > unreachable, no ? > > > > > How often does an unplanned outage occur? It would seem drastic if an > unplanned database server outage occurs often. > For planned server outages, usually, the failover is done out-of-band with > Tomcat. Please correct me if I am wrong. > Some simple options I can think of include: > * DNS mapping - map the DNS name of the Oracle server to the new IP address > of the second server - make sure that "networkaddress.cache.ttl=1800" or > something other than "-1" in the jre/lib/java.security file > * a loadbalancer listing both database servers with one inactive - then you > mark the secondary server as active, and the primary as inactive during > maintenance of the primary database server. > > Thanks. > > -Shanti > > > > > > >> On Mon, Mar 11, 2013 at 6:15 PM, Daniel Mikusa <dmik...@vmware.com> > >> wrote: > >> > >> On Mar 11, 2013, at 12:52 AM, amit shah wrote: > >>> > >>> Hello, > >>>> I would like to know if the tomcat jdbc pool (7.0.34+) provides > >>>> connection failover capabilities i.e. to transparently close all the > >>>> open > >>>> database connections and switch to a another database server on an > >>>> planned/unplanned database server outage event. > >>>> I read through the tomcat documentation but didn't find any > >>>> > >>> details > >>> > >>>> related to this. If this feature is not supported are there any > >>>> > >>> recommended > >>> > >>>> alternatives and any future plans to add this feature to the jdbc > pool? > >>>> > >>> You might want to see if your JDBC driver will handle this for you. I > >>> know that some do, like MySQL [1]. > >>> > >> >