Saturday, January 31, 2026

Support for Deprioritization of Database Nodes in RAC with JDBC

Support for Deprioritization of Database Nodes in RAC 26ai with JDBC features  

Managing Node failures in RAC environment is one of important issues that can handle by some solutions, for example by creating Services by SRVCTL command and Scan Listerner.


In this post, I introducing a new solution that can manage these failures by JDBC features in the Oracle RAC.


Starting from Oracle Database 12c Release 2 (12.2.0.1), JDBC drivers support deprioritization of database nodes. When a node fails, JDBC deprioritizes it for the next 10 minutes, which is the default expiry time. For example, if there are three nodes A, B, C, and node A is down, then connections are allocated first from nodes B and C, and then from node A. After the default expiry time, node A is no longer deprioritized, that is, connections are allocated from all the three nodes on availability basis. Also, during the default expiry time, if a connection attempt to node A succeeds, then node A is no longer considered to be a deprioritized node. You can specify the default expiry time for deprioritization using the oracle.net.DOWN_HOSTS_TIMEOUT system property.


For example, in the following URL, scan_listener0 has ip1, ip2, and ip3 IP addresses configured, after retrieving its IP addresses. So application can connect to database instances by a round robin format:

IP1-->IP2-->IP3

Now, if ip1 is deprioritized, then the order of trying IP addresses will be ip2, ip3, and then ip1. 

Ip2-->ip3-->ip1(node 1 is deprioritized)


If all IP addresses are unavailable, then the whole host is tried last, after trying node_1 and node_2.


(DESCRIPTION_LIST=  

    (DESCRIPTION=

        (ADDRESS_LIST=

            (ADDRESS=(PROTOCOL=tcp)(HOST=scan_listener0)(PORT=1521))

            (ADDRESS=(PROTOCOL=tcp)(HOST=node_1)(PORT=1528))              

            (ADDRESS=(PROTOCOL=sdp)(HOST=node_2)(PORT=1527))

        )

        (ADDRESS_LIST=

            (ADDRESS=(PROTOCOL=tcp)(HOST=node_3)(PORT=1528))

        )              

        (CONNECT_DATA=(SERVICE_NAME=cdb3))

    )

    (DESCRIPTION=

        (ADDRESS=(PROTOCOL=tcp)(HOST=node_0)(PORT=1528))

        (CONNECT_DATA=(SERVICE_NAME=cdb3))

    )

)


Node_0=IP1

Node_1=IP2

Node_2=IP3


What is SDP Protocol:


Oracle Net Services provides support for the Sockets Direct Protocol (SDP) for InfiniBand high-speed networks. 

SDP is a standard communication protocol for clustered server environments. SDP is an interface between a network interface card and the application. By using SDP, applications place most of the messaging burden upon the network interface card, freeing the CPU for other tasks. As a result, SDP decreases network latency and CPU utilization. 

SDP is designed specifically for System Area Networks (SANs). A SAN is characterized by short-distance, high-performance communications between multiple server systems, such as Oracle WebLogic Server or any other third-party middle-tier client and database servers clustered on one switch.


The Sockets Direct Protocol (SDP) is an industry-standard wire protocol between InfiniBand network peers. When used over an InfiniBand network, SDP reduces TCP/IP overhead by eliminating intermediate replication of data and transferring most of the messaging burden away from the CPU and onto the network hardware.


https://docs.oracle.com/en/database/oracle/oracle-database/26/jjdbc/JDBC-getting-started.html#GUID-D5BB4E1F-59FD-4C5E-876C-71420F2DAE9B

No comments:

Post a Comment

Support for Deprioritization of Database Nodes in RAC with JDBC

Support for Deprioritization of Database Nodes in RAC 26ai with JDBC features    Managing Node failures in RAC environment is one of importa...