H2 Database Cluster Recovery -


i have got springmvc application runs on apache tomcat , uses h2 database. infrastructure contains 2 application servers (lets name them & b) running own tomcat servers. have h2 database clustering in place.

on 1 system (a) ran following command

java org.h2.tools.server -tcp -tcpport 9101 -tcpallowothers -basedir server1 

on other (b) ran

java org.h2.tools.server -tcp -tcpport 9101 -tcpallowothers -basedir server2 

i started cluster in machine a

java org.h2.tools.createcluster -urlsource jdbc:h2:tcp://ipaddrofa:9101/~/test -urltarget jdbc:h2:tcp://ipaddrofb:9101/~/test -user sa -serverlist ipaddrofa:9101,ipaddrofb:9101 

when 1 of server down, has been mentioned that, 1 has delete database failed, restart server , rerun createcluster.

i have following questions ?

  1. if both servers down, how can ascertain, database delete can restart server , rerun cluster ?
  2. createcluster contains urlsource , urltarget. need specific give them same value given or can interchange them without side effect ?
  3. do need run createcluster command both machines? if so, need interchange urlsource , urltarget ?
  4. is there way know whether both, 1 or none of servers running ? want both ipaddress returned if both of them up, 1 ipaddress if 1 otherwise none down.

  1. if both servers down, how can ascertain, database delete

    the idea of cluster second database adds redundancy system. let's assume server fails 1 every 100 days (hard disk failure, power failure or so). 99% availability. might not enough you, that's why may want use cluster 2 servers. way, if 1 of server fails every 100 days, chance of both failing @ same time very low. ideally, risk of failure independent. mean risk of both failing @ exact same time 1 in 10000 (100 times 100), giving 99.99% availability. risk both servers down cluster feature should prevent.

  2. createcluster contains urlsource , urltarget. need specific give them same value previously

    it depends 1 want use source , 1 target. database source copied target. source database want copy target.

  3. do need run createcluster command both machines?

    no.

  4. is there way know whether both, 1 or none of servers running ?

    you try open tcp/ip connection them, check if listener running. running telnet <server> <port> on command line.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -