For RAC, when an Oracle Instance fails, the application has several high-availability technologies to ensure availability. These technologies are transparent to the client, and the client may not be able to perceive the instance failure.
1. Transparent Application Failover (TAF)
Ii. Fast Connection Failover (FCF ).
When a node fails, TAF allows the database session to use OCI libraries for fail over to another surviving node. However, if the application uses JDBC thin driver, TAF cannot be used.
Failover Modes:
Session failover
Select failover
None (default)
1. select mode allows the query to be executed on the new node again, discard the rows that have been fetch, and continue to return the results to the client.
2. The none mode explicit declaration does not use TAF
3. TAF cannot restore any DML transaction, and the transaction will be rolled back on another node.
Failover Methods:
Basic
Preconnect
1. the Basic option means that the client creates a new connection after the instance fails. This method may cause the performance of the other node to degrade when the node fails, because many sessions will be reconnected to the surviving nodes.
2. The client generates a preconnected session as a backup to accelerate failover when the instance fails.
TAF is the client-side feature. We need to configure it in the client Tnsnames. ora or server through service.
1. Client implementation
In RAC, the typical configurations in tnsnames. ora are as follows:
- LEO1=
- (DESCRIPTION_LIST=
- (LOAD_BALANCE=Off)
- (FAILOVER=On)
- (DESCRIPTION=
- (ADDRESS_LIST=
- (LOAD_BALANCE=OFF)
- (FAILOVER=ON)
- (ADDRESS= (PROTOCOL=TCP)(HOST=Node1.Chinamobile.com )(PORT=1521))
- )
- (CONNECT_DATA=
- (SERVICE_NAME=Leo)
- (INSTANCE_NAME=Leo1)
- (FAILOVER_MODE= (TYPE=Session)(METHOD=Basic)(RETRIES=4)(DELAY=1))
- )
- )
- (DESCRIPTION=
- (ADDRESS_LIST=
- (LOAD_BALANCE=OFF)
- (FAILOVER=ON)
- (ADDRESS= (PROTOCOL=TCP)(HOST=Node2.Chinamobile.com )(PORT=1521))
- )
- (CONNECT_DATA=
- (SERVICE_NAME=Leo)
- (INSTANCE_NAME=Leo2)
- (FAILOVER_MODE= (TYPE=Session)(METHOD=Basic)(RETRIES=4)(DELAY=1))
- )
- )
- )