9 Replies Latest reply: Jul 17, 2013 2:40 PM by SAML. RSS

    Scan Listeners

    1010036
      Hi,

      Wanted to know more about scan listeners.

      Q1) Are there always 3 scan lsiteners? cant there be more or less than 3?
      Q2) On what factor are the scan listeners number dependent on ? Is it on number of scan ips which are three?
      Q3) What is the actaul role of scan listener ? Does is talk with normal listener?

      Regards
      ID
        • 1. Re: Scan Listeners
          Mahir M. Quluzade
          Hi,
          1007033 wrote:
          Hi,

          Wanted to know more about scan listeners.

          Q1) Are there always 3 scan lsiteners? cant there be more or less than 3?
          Q2) On what factor are the scan listeners number dependent on ? Is it on number of scan ips which are three?
          Q3) What is the actaul role of scan listener ? Does is talk with normal listener?

          Regards
          ID
          Scan listeners number depend scan IP addresses. You can use 1 IP address for scan IP.
          Oracle recommend 3 scan IP address for scalability. Actual role of scan listeners,
          when you add or remove instance from cluster, then not need changes on clients.
          SCAN listeners talk with local listeners, and there have load balancing on scan.


          Check interesting article : http://www.oracle.com/technetwork/products/clustering/overview/scan-129069.pdf

          Regards
          Mahir M. Quluzade
          • 2. Re: Scan Listeners
            1010036
            Thanks Mahir,

            In case of 2 node 3 node 4 node and n node RAC how does oracle decide about where to put scan listeners i.e. for 3 node does it have 1 in each node , in 4 node if there are 3 scan listeners and IP addresses how does oracle know which node to put the 3 because I guess 1 node will be left without scan IP , then how does that node deal with SCAN IP and Listener fundas in 11g.

            Regards
            ID
            • 3. Re: Scan Listeners
              Levi Pereira
              SCAN IP are not local resource, but it's cluster resources. So, this means that they fluctuate in the clusterware layer while at least one node is active.
              I believe three SCAN IP is enough. (Although I don't see sense set 3 SCAN IP for only 2 nodes because in a node you will see resources (2 Scan IP) left over).

              {message:id=9829323}
              • 4. Re: Scan Listeners
                SAML.
                Hi,

                Q1) Are there always 3 scan lsiteners? cant there be more or less than 3?
                A1) No, you can have any number of SCAN listener as you like, the recommendation is 3


                Q2) On what factor are the scan listeners number dependent on ? Is it on number of scan ips which are three?
                A2) There is no factor, 3 scan listeners is enough for redundancy purpose, more listeners have no benefit, less listeners are vulnerable to failure.


                Q3) What is the actual role of scan listener ? Does is talk with normal listener?
                A3) The SCAN listeners act like load balancers, they listen to connection requests and dispatch the requests to normal listeners

                Regards,
                SAM L.
                • 5. Re: Scan Listeners
                  1010036
                  Thanks all for you valuable input, although the first part of my question is over i would like to know the second part which is as follows:

                  In case of 2 node 3 node 4 node and n node RAC how does oracle decide about where to put scan listeners i.e. for 3 node does it have 1 in each node , in 4 node if there are 3 scan listeners and IP addresses how does oracle know which node to put the 3 because I guess 1 node will be left without scan IP , then how does that node deal with SCAN IP and Listener fundas in 11g.


                  Regards
                  ID
                  • 6. Re: Scan Listeners
                    1010036

                    Hi,

                     

                    Just wanted to know how scan listener helps in load balancing or is there any other use of scan listener.

                    • 7. Re: Scan Listeners
                      SAML.

                      Hi,

                       

                      Oracle will randomly run the SCAN on RAC nodes.  For 2-node RAC with 3 SCAN listeners, you will have 1 node with 2 SCAN listeners and another node with 1 SCAN listeners.  If you have 4-node RAC, 1 node will have no SCAN listeners. 

                       

                      To do the load balancing, make sure you include local_listener and remote_listener (point to SCAN) in init.ora.  With that parameters, the database will register itself with the SCAN and SCAN will know how to load balance between database instances.

                       

                      Hope that help.

                      • 8. Re: Scan Listeners
                        1010036

                        Thanks SAML,

                         

                        Although it helped a bit but just wanted to know how actually does SCAN listeners help in load balancing.

                        Also as you said for 4 nodes one node will not have a scan listener and the remote_listener have SCAN name and in that the 4th node is not included , how will SCAN load balance in that case , I mean will it ignore the 4th node?

                        Can someone kindly explain indepth.

                        • 9. Re: Scan Listeners
                          SAML.

                          For a full detail how SCAN work, check Oracle document here

                          http://www.oracle.com/technetwork/products/clustering/overview/scan-129069.pdf

                           

                          In short, because all database instances register themselves with the SCAN so the SCAN knows there are 4 instances in this cluster.  When client connect to the SCAN, the SCAN will redirect the client to one of the node in the cluster.

                           

                          Hope that help.