13.2.2 Example of Connection Load Balancing for Dedicated Server Configuration
Figure 13-3 shows an Oracle RAC dedicated server database with two instances, sales1 and sales2, of the same service, sales.us.example.com. The instances sales1 and sales2 reside on computers sales1-server and sales2-server, respectively. Listeners named listener run on nodes 1 and 2. The REMOTE_LISTENER initialization parameter has been configured to allow for service registration of information to both listeners.
Figure 13-3 Load Balancing Environment for a Dedicated Server Configuration

Description of "Figure 13-3 Load Balancing Environment for a Dedicated Server Configuration"
In this example, the following load information is registered:
-
sales1-serverhas a node load average of 450 per minute. -
sales2-serverhas a node load average of 200 per minute. -
sales1has 200 connections. -
sales2has 150 connections.
The listener_sales1 value in (REMOTE_LISTENER=listener_sales1) is resolved through a local tnsnames.ora file on the sales2-server as follows:
listener_sales1= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521)))
The listener_sales2 value in (REMOTE_LISTENER=listener_sales2) is resolved through a local tnsnames.ora file on the sales1-server as follows:
listener_sales2= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))
Based on the environment, the following actions occur. The numbered actions correspond to the arrows shown in Figure 13-4:
-
LREG processes for instances
sales1andsales2register with both listeners. The listeners are dynamically updated on the load of the instances.Based on the preceding information,
sales2-serveris the least loaded node andsales2is the least loaded instance. -
The client sends a connect request.
A connect descriptor is configured to try each protocol address randomly until one succeeds:
sales.us.example.com= (DESCRIPTION= (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))The listener on
sales1-serverwas randomly chosen to receive the client connect request.The listener on
sales1-servercompares the load of the instancessales1andsales2. The comparison takes into account the load on nodessales1-serverandsales2-server, respectively. Becausesales2-serveris less loaded thansales1-server, the listener selectssales2-serveroversales1-server. -
The listener on
sales1-serverredirects the client connect request to the listener onsales2-server. -
The client connects to the listener on
sale2-server. The listener starts a dedicated server process, and the dedicated server process inherits the connection request from the listener.
Figure 13-4 Load Balancing Example for a Dedicated Server Configuration

Description of "Figure 13-4 Load Balancing Example for a Dedicated Server Configuration"
Parent topic: Understanding Connection Load Balancing