Concept of Local listener and Remote Listener comes with Oracle RAC database where a single database has multiple instances. PFB example to understand the concept of Local Listener and Remote Listener.
Consider a two node RAC database. It has following components :-
1. Two nodes named NODE1 and NODE2
2. Two listeners on both nodes named LISTENER1 on NODE1 and LISTENER2 on NODE2.
3. Two instances of database on both nodes named ORCL1 on NODE1 and ORCL2 on NODE2 and database name is ORCL
Now Listener1 is running on Node1 where database instance Orcl1 is present. Listener1 is considered as Local Listener for Orcl1 instance as its present on the same node where Orcl1 is running and Listener2 is considered as Remote Listener for Orcl1 instance as its running on different node as the database instance Orcl1.
Similarly, Listener2 is considered as Local Listener for Orcl2 instance as its present on the same node where Orcl2 is running and Listener1 is considered as Remote Listener for Orcl2 instance as its running on different node as the database instance Orcl2.
Purpose of Remote Listener is to connect all instances with all listeners so the instances can propogate their load balance advisories to all listeners. Listener uses the advisories to decide which instance should service client request. If listener get to know from advisories that its local instance is least loaded and should service client request then listener passes client request to local instance. If local instance is over loaded then listener can use TNS redirect to redirect client request to a less loaded instance means remote instance. This Phenomenon is also called as Server Side Load balancing.
PFB steps to configure Local and Remote listener configuration for both instances :-
Node1 :-
orcl1.local_listener=(address of listener_host1)
orcl1.remote_listener=(addresses of both listener_host1 and listener_host2)
Node2 :-
orcl2.local_listener=(address of listener_host2)
orcl2.remote_listener=(addresses of both listener_host1 and listener_host2)
Without Configuration of Remote Listener, each listener will only know about its local instance only and it don't have any knowledge about the load of remote instance. Listener will direct the Client request to local instance only whatever may be the load on local instance. Without this configuration we only left with Client Side Load Balancing.
I hope this article helped you.
Regards,
Amit Rath
Consider a two node RAC database. It has following components :-
1. Two nodes named NODE1 and NODE2
2. Two listeners on both nodes named LISTENER1 on NODE1 and LISTENER2 on NODE2.
3. Two instances of database on both nodes named ORCL1 on NODE1 and ORCL2 on NODE2 and database name is ORCL
Now Listener1 is running on Node1 where database instance Orcl1 is present. Listener1 is considered as Local Listener for Orcl1 instance as its present on the same node where Orcl1 is running and Listener2 is considered as Remote Listener for Orcl1 instance as its running on different node as the database instance Orcl1.
Similarly, Listener2 is considered as Local Listener for Orcl2 instance as its present on the same node where Orcl2 is running and Listener1 is considered as Remote Listener for Orcl2 instance as its running on different node as the database instance Orcl2.
Purpose of Remote Listener is to connect all instances with all listeners so the instances can propogate their load balance advisories to all listeners. Listener uses the advisories to decide which instance should service client request. If listener get to know from advisories that its local instance is least loaded and should service client request then listener passes client request to local instance. If local instance is over loaded then listener can use TNS redirect to redirect client request to a less loaded instance means remote instance. This Phenomenon is also called as Server Side Load balancing.
PFB steps to configure Local and Remote listener configuration for both instances :-
Node1 :-
orcl1.local_listener=(address of listener_host1)
orcl1.remote_listener=(addresses of both listener_host1 and listener_host2)
Node2 :-
orcl2.local_listener=(address of listener_host2)
orcl2.remote_listener=(addresses of both listener_host1 and listener_host2)
Without Configuration of Remote Listener, each listener will only know about its local instance only and it don't have any knowledge about the load of remote instance. Listener will direct the Client request to local instance only whatever may be the load on local instance. Without this configuration we only left with Client Side Load Balancing.
I hope this article helped you.
Regards,
Amit Rath
very good explaination
ReplyDeleteThank you,, It helped me understand the remote listener concept
ReplyDeletethanks
ReplyDeleteVery good explanation... great job done !
ReplyDeleteit's nice explanation , well done.!
ReplyDeleteNice One...Please let us know about how SCAN listener also and how connection happen through SCAN.
ReplyDeletegood explanation..keep it up..!!
ReplyDeleteWhat will happen if we have a service and configured it to run on one node as preferred and rest as available. Could you please explain for this scenario?
ReplyDeleteThanks for writing in , If you have configured your service like you mentioned, then the service will only run on your preferred node. If for some reason your preferred node rebooted or abruptly down then the service will fail-over to the available node.
DeleteHoping I cleared your doubt.
Thanks
Amit Rath
This comment has been removed by a blog administrator.
ReplyDeleteGreat explanation... appreciated
ReplyDeleteWell explanation thank you
ReplyDeleteWell explained!!! You made it very easy to understand. Thanks!
ReplyDeleteIn the remote listener scan hostname name can be mentioned instead of remote listener ?
ReplyDeleteVery good explanation
ReplyDeleteWell explained
ReplyDeleteI have confused with remote listener,now I understood remote listener concept....thx
ReplyDelete