Load Balancing

If your applicationis one that must process a high volume of connection requests in a short amount of time (e.g., a popular web site), you might consider TNS listenerload balancing. You can configure multiple TNS listeners to process your connection requests to a single database. Or, if you have a symmetric replication environment that allows clients to connect to any of several masters, you can configure TNS listeners that send connection requests to the masters with the least busy dispatchers (assuming that you are also using a multi-threaded server).

Multiple TNS Listeners and Multi-Threaded Server with a Single Database Instance

If you are usinga multi-threaded server, you can run TNS listeners on multiple nodes for your database instance. The TNS listener does not need to run on the same node as the database because dispatchers are able to register with listeners on whatever node(s) you specify with the INIT.ORA parameter MTS_LISTENER_ADDRESS (Oracle7). In Oracle8, use the LISTENER attribute of the MTS_DISPATCHERS parameter. Figure 2.2 depicts a configuration with multiple listeners on multiple machines for a single database.

Multiple listeners on multiple nodes for a single database instance

Figure 2-2. Multiple listeners on multiple nodes for a single database instance

The relevant multi-threaded server INIT.ORA parameters for this configuration are as follows:

mts_multiple_listeners = TRUE mts_listener_address = "(ADDRESS=(PROTOCOL=TCP)(host=eggman)(port=1521))" ...

Get Oracle Distributed Systems now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.