Connection load balancing is another interesting tool for spreading your connection load out more evenly.
This concept is usually implemented for Oracle Parallel Servers, so we will discuss an Oracle Parallel Servers example in this lesson.
The advantage of connection load balancing is that you can allow your network service (Net8) to redirect connections to a database server that is less busy, even if that database server is on a different machine. The load balancing cycles through each dispatcher in the service
and connects with the least busy dispatcher. In the case of Oracle Parallel Servers, it can be set up to cycle through all the dispatchers in other nodes in the Oracle Parallel Service, even if they are on a remote site's database.
Connection load balancing: A feature of Net8 that reviews the load on each of a group of database services or database dispatchers, and then selects the least busy available service or dispatcher and assigns a new connection to it.
Configuring the database server
The following initialization parameters must be set for the database server to support load balancing:
SERVICE_NAMES for the database service name. This name will be shared among multiple database instances that are involved in load balancing.
INSTANCE_NAME for the current instance name
MTS_DISPATCHERS to enable MTS and to configure the dispatchers used by the instance
Configuring the Listener
Each node's listener must contain the addresses of all the nodes that are to be shared in the connection load balancing.
Here is an example of the listener.ora file configured so that two nodes participate in the connection load balancing.
When configuring Net8 for connection load balancing, you must work with the tnsnames.ora file. You can configure by directly editing the file, or you can use the Net8 Configuration Assistant. Due to some inconsistencies in the Net8 Configuration Assistant, we will continue to work
directly with the tnsnames.ora file as we have throughout this module.
Look at the MouseOver here to see an example of the listener.ora file.
Once you have set up the tnsnames.ora file, you should use the same file on all the nodes that are involved in connection load balancing.
The next lesson covers automatic instance registration.