Oracle RAC Load Balancing with WebLogic Server
If your application requires load balancing across RAC nodes, WebLogic Server supports this capability through use of JDBC multi data sources with Oracle RAC nodes. The data sources that form a multi data source are accessed using a round-robin scheme. When switching connections, WebLogic Server selects a connection from the next data source in the order listed.
To connect WebLogic Server to multiple Oracle RAC nodes using multi data sources, first configure a JDBC data source for each RAC instance in your RAC cluster with the Oracle Thin driver. Then configure a multi data source, using either the algorithm for load balancing or the algorithm for failover, and add the data sources to it.
To use a database connection in this configuration, your applications look up one multi data source on the JNDI tree and then request a connection. The multi data source determines which data source to use to satisfy the connection request based on the algorithm type specified in the configuration (that is, failover or load balancing).
Attributes of a Multi Data Source
The multi data source may have the following attributes, depending on the role of RAC in your system—load balancing or failover:
AlgorithmType="Load-Balancing"
orAlgorithmType="Failover"
- With the Load-Balancing option, connection requests are distributed among available data sources; with the High-Availability option, connection requests are served by the first available pool in the list. When a data source becomes defunct, connection requests are served by the next data source in the list.
FailoverRequestIfBusy="true"
TestFrequencySeconds="
120
"