0 Replies Latest reply on May 27, 2011 2:55 AM by Janne Mattila

    Failover Using a JDBC Lock System, preventing "graceful shutdown

    Janne Mattila Newbie

      JDBC locking

      http://fusesource.com/docs/esb/4.3.1/esb_runtime/ESBRuntimeFailoverJdbc.html

      can be used for configuring a master/slave failover setup.

      Documentation states that if master servicemix loses database

      connection, it shuts down:

       

      "If the connection to the database is lost, the master instance tries to gracefully shutdown, allowing a slave instance to become master when the database service is restored. The former master will require manual restart."

       

      This would cause a problem.

      - we have a server A and server B with master-slave configured

      servicemix and database instances.

      - initially server A holds servicemix-master and database-master,

      while server B holds servicemix-slave and database-slave

      - some updates or problems may cause server B to become

      servicemix-master. server A is servicemix-slave. server A still has

      database-master.

      - so we have servicemix master in server B and database master in server A

      - now if whole server A shuts down, there is a delay when server B

      database-slave activates, and in the meanwhile database is

      inaccessible

      - server B had servicemix-master. Now it loses database connection and

      gracefully shuts itself down

      - end result: neither servicemix is running

       

      1. does the JDBC locking failover mechanism indeed shutdown the master

      instance immediately when it loses the connection, or are there any

      retries or delays?

      2. if there a way to prevent this "graceful shutdown" feature or

      otherwise prevent this scenario?