Oracle Network Administration  «Prev  Next»
Lesson 5 Using load balancing
Objective Configure a network for load balancing.

Configuring Loadbalancing Network

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:
  1. SERVICE_NAMES for the database service name. This name will be shared among multiple database instances that are involved in load balancing.
  2. INSTANCE_NAME for the current instance name
  3. 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.
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS = 
(PROTOCOL = TCP)
(HOST = ATLANTA.EPETS.COM)
(PORT = 1521))
(ADDRESS = 
(PROTOCOL = TCP)
(HOST = JACKSONVILLE.EPETS.COM)
(PORT = 1521))
)
)

Configuring Net

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.
  1. This switch must be set ON to tell Net8 to use the connection load balancing feature
  2. This states that if the chosen address fails to make a connection, other addresses listed will automatically be tried.
  3. Here are two addresses listing two distinct database nodes that will participate in connection load balancing.
  4. Here are two addresses listing two distinct database nodes that will participate in connection load balancing.
  5. The service name for all the nodes must be the same. In this example, it is HOUSEOPETS.COM
tnsnames.ora file connection loadbalancing
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.

Configure Oracle Connection

Click the exercise link below to practice configuring load balancing.
Configure Oracle Connection