Note: You may have a many-to-many relationship between listeners and equivalent database instances.
Once randomly selected, the listeners behave as they have in previous releases, distributing connection requests to the dispatchers on the basis of their load (for multi-threaded servers) or to dedicated servers.
Suppose there were listeners on two different nodes that were listening for a single multi-threaded server, as shown in Figure 2 - 4.
Figure 2 - 4. Multiple Listeners for a Multi-Threaded Server
All dispatchers register with all the listeners listed in the database parameter file, and the client randomizes between the listeners. The listener passes the address of the least-used dispatcher to the client, and the client connects using that dispatcher.
Figure 2 - 5. Multiple Listeners for Equivalent Databases
In this figure, both listeners listen for two database instances. The client randomizes between the listeners. The listener passes the address of the least-used dispatcher to the client, regardless of whether the dispatcher is for Emp or HR, because they are virtually identical.
Note: Oracle Parallel Servers have their own method of listener load balancing. See your Oracle Parallel Server and platform-specific documentation on how to configure parallel servers. Use the listener load balancing method you prefer.
Listener load balancing may be particularly useful in replicated environments, where a particular group of users may have a schema that's the same across different databases, even though other things on the database may be different. In such a case, you could allow the users to update any of the replicas they happened to get connected to, and synchronize them later.
Similarly, the clients that want to connect to a dedicated server randomize their connection requests among the listeners on the same protocol for that server, as listed in the TNSNAMES.ORA file, or stored in the Names Server cache. All listeners for a dedicated server must be on the same node. The randomly selected listener spawns a server process and hands off the incoming connection to the server.
Note: You cannot have listener load balancing with prestarted dedicated servers, because a prestarted dedicated server process registers only with the listener that started it.