This discussion is archived
9 Replies Latest reply: Apr 25, 2012 3:29 PM by Levi-Pereira RSS

difference between SCAN listener and VIP in RAC

Vijay.Cherukuri Newbie
Currently Being Moderated
Hi,

Both SCAN and VIP are used for load balancing only as i know.

Is there is any difference between these two ?
  • 1. Re: difference between SCAN listener and VIP in RAC
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    A virtual IP is assigned to a specific cluster node - that node "owns" the address. Unless it is "down" in which case the virtual IP is failed over to another cluster node.

    A SCAN address "belongs" to the entire cluster. It refers to the cluster as a whole. A SCAN address will obviously need to be handled by a specific cluster node.

    The advantage is that the SCAN is just that - a single client access name/address to use to access services on the cluster. As oppose to remembering and using all 10 virtual IPs/hostnames for a 10 node cluster for example.
  • 2. Re: difference between SCAN listener and VIP in RAC
    904735 Newbie
    Currently Being Moderated
    Hi,

    As Billy Said

    A virtual IP is assigned to a specific cluster node - that node "owns" the address. Unless it is "down" in which case the virtual IP is failed over to another cluster node.

    And Also,

    http://www.bestremotedba.com/tag/rac-virtual-ip-address/


    And You can see about scan listerner Ref.Here..

    http://www.dba-oracle.com/t_scan_rac.htm
  • 3. Re: difference between SCAN listener and VIP in RAC
    Vijay.Cherukuri Newbie
    Currently Being Moderated
    How regular host ip address differs from VIP ??
  • 4. Re: difference between SCAN listener and VIP in RAC
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    887400 wrote:
    How regular host ip address differs from VIP ??
    It cannot fail over. It is static.

    A virtual address is just that - virtual. It can also exist on another node in the cluster, as its "owner" node is not up and running. So this node services that virtual IP until the owner is able to "reclaim ownership" of that virtual IP.

    The basic aim being to provide clients using that virtual IP with a service and not an IP that does not respond at all.
  • 5. Re: difference between SCAN listener and VIP in RAC
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,

    Examples of the differences between host and virtual.
    Written by Gitesh Trivedi:
    In Oracle 9i we use physical IP address in listener configuration. Means if requested connection gets failed then it will be diverting to another node using physical IP address of another surviving node. But during this automatically transfer, connection should need to wait up to get error message of node down or listener down using TCP/IP connection timeout. Means session should need to wait up to getting TCP/IP timeout error dictation. Once error message is received oracle RAC automatically divert this new connection request to another surviving node.
    Using VIP configuration, client can be able to get connection fast even fail over of connection request to node. Because vip automatically assign to another surviving node faster and it can't wait for TNS timeout old fashion.


    Levi Pereira

    Edited by: Levi Pereira on Dec 20, 2011 10:40 AM
  • 6. Re: difference between SCAN listener and VIP in RAC
    Vijay.Cherukuri Newbie
    Currently Being Moderated
    Hi Billy and All ,

    I am replying too late. sorry for that .I am still not geeing clear picture on VP

    YOU SAID

    " A virtual address is just that - virtual. It can also exist on another node in the cluster, as its "owner" node is not up and running. So this node services that virtual IP until the owner is able to "reclaim ownership" of that virtual IP"


    2 node RAC 10g R2 (so no SCAN)

    Let say host 1 : abc.lmn.com

    Host 1 ip: let say 129.1.2.3 and vip 1 as abc.lmn-vip.com-> 129.1.2.4

    host 2 : efg:xyz.com

    with IP 129.1.2.5 and vip 2 as efg.xyz-vip.com -> 129.1.2.6

    The ip and VIp s as just for example only.i did not follow any standard conventions.

    Scenario : client tried to connect to instance and lets assume host 1 is down so host 1 (abc.lmn.com ) cannot serve the client request.

    So the connection should fail over to host 2. And host 1 can not fail over as its already down .


    And VIP 1 is the address assigned to physical host 1.

    MY Question is : as the physical host 1 itself is down how the VIP 1 that is assigned to host 1 helps in fail over.


    I hope your next reply will clarify all my doubts.

    Thanks
  • 7. Re: difference between SCAN listener and VIP in RAC
    912595 Expert
    Currently Being Moderated
    887400 wrote:
    Hi Billy and All ,

    I am replying too late. sorry for that .I am still not geeing clear picture on VP

    YOU SAID

    " A virtual address is just that - virtual. It can also exist on another node in the cluster, as its "owner" node is not up and running. So this node services that virtual IP until the owner is able to "reclaim ownership" of that virtual IP"


    2 node RAC 10g R2 (so no SCAN)

    Let say host 1 : abc.lmn.com ;

    Host 1 ip: let say 129.1.2.3 ; and vip 1 as abc.lmn-vip.com-> 129.1.2.4

    host 2 : efg:xyz.com

    with IP 129.1.2.5 and vip 2 as efg.xyz-vip.com -> 129.1.2.6 ;

    The ip and VIp s as just for example only.i did not follow any standard conventions.

    Scenario : client tried to connect to instance and lets assume host 1 is down so host 1 (abc.lmn.com ) cannot serve the client request.

    So the connection should fail over to host 2. And host 1 can not fail over as its already down .


    And VIP 1 is the address assigned to physical host 1.

    MY Question is : as the physical host 1 itself is down how the VIP 1 that is assigned to host 1 helps in fail over.


    I hope your next reply will clarify all my doubts.

    Thanks
    Just to give you clear answers:
    When Host 1 goes down, its VIP will failover to Node 2. And when client will try to connect to Node 1's VIP, it will immediately get error message(it doen't wait on TCP/IP timeout) and then client will connect to node 2's VIP.

    The reason why client will not connect to VIP of node 1 however its UP on node 2, is because when VIP failed over to node 2, its issues the new MAC address to clients. So client get immediate notifications as error and client then connect to Node 2'VIP which is running on 2.

    Hope this help
  • 8. Re: difference between SCAN listener and VIP in RAC
    user125552 Newbie
    Currently Being Moderated
    Hello,

    Just have one more doubt -

    In the above scenario assume user is connecting to node 1 with a tns entry for node-1 only there is no mentioned for node-2 in the tns entry. Will then be user able to connect to node -2 whenever node -1 is down ?
  • 9. Re: difference between SCAN listener and VIP in RAC
    Levi-Pereira Guru
    Currently Being Moderated
    user13086932 wrote:
    Hello,

    Just have one more doubt -

    In the above scenario assume user is connecting to node 1 with a tns entry for node-1 only there is no mentioned for node-2 in the tns entry. Will then be user able to connect to node -2 whenever node -1 is down ?
    If you are using only one VIP Address the connection will not failover to another node, because your connecting string does not know if another VIP Adress exists.
    If you are SCAN VIP does not matter wich node is down, SCAN Listener will always redirect connection to online nodes (database).


    Regards,
    Levi Pereira

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points