There are currently three discrete faults that can cause a failover of a master:
Database server failure - failover will occur 20 seconds after the initial detection.
The Tungsten Manager is unable to connect to the database server and gets an i/o error. If the database cannot respond to a tcp connect request after the configured number of attempts, the database server is flagged as STOPPED which initiates the failover.
This would mean, literally, that the process for the database server is gone and cannot respond to a tcp connect request. In this case, by default, the manager will try two more times, once every 10 seconds, after the initial i/o error is detected and after the then 30 second interval has elapsed, will flag the database server as being in the STOPPED state and this, in turn, initiates the failover.
Host failure - failover will occur 30 seconds after the initial detection
The host on which the master database server is running is 'gone'. The first indication that the master host is gone could be because the manager on that host no longer appears in the group of managers, one of which runs on each database server host. It could also be that the managers on the hosts besides the master do not see a 'heartbeat' message from the master manager. In a variety of circumstances like this, both of the managers will, over a 60 second interval of time, once every 10 seconds, attempt to establish, definitively, that the master host is indeed either gone or completely unreachable via the network. If this is established, the remaining managers in the group will establish a quorum and the coordinator of that group will initiate failover.
A replicator failure, if
is set to
true, will cause a
failover 70 seconds after initial detection
Depending on how you have the manager configured, a master replicator
failure can also start a process of initiating a failover. There's a
specific manager property
that tells a manager to 'fence' a master replicator that goes into
either a failed or stopped state. The manager will then try to recover
the master replicator to an online state and, again, after an interval
of 60 seconds, if the master replicator does not recover, a failover
will be initiated. BY DEFAULT, THIS BEHAVIOR IS TURNED OFF. Most
customers prefer to keep a fully functional master running, even if
replication fails, rather than have a failover occur.
The interval of time from the first detection of a fault until a failover
occurs is configurable over 10 second intervals. The formula for
determining the listed default failover intervals is based on the value of
'threshold' in the properties file
= (threshold + 1) * 10 seconds