On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,532 Users
  • 2,269,755 Discussions
  • 7,916,774 Comments

Discussions

Existing users connectivity using VIP on 10g RAC

Jhil
Jhil Member Posts: 3,182 Bronze Trophy
edited Jan 22, 2018 12:19PM in Real Application Clusters

Dear RAC Experts ,

I am trying to understand  'RAC ARCHITECTURE'  especially in 10g R2.

Please do NOT consider scan feature

>> RAC IP CONFIGURATION FOR BOTH NODES

PUBLIC IP  -->  NODE 1   ->  192.168.10.10

PUBLIC IP  -->  NODE 2   ->  192.168.10.20

VIP  --> NODE 1 ->  192.168.10.30 (abc is mac address)

VIP  --> NODE 2  ->  192.168.10.40 (xyz is mac address)

>> TNSNAMES.ORA on MACHINE 3  (acts as client machine)

TEST_RAC =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))

      (LOAD_BALANCE = yes)

    )

    (CONNECT_DATA =

      (SERVICE_NAME = samdb.com)

    )

  )

>>  Just trying to understand, exactly how RAC architecture was designed since 10g 

1)  User is established a connection using  VIP to NODE1.

2)  VIP of NODE1 is using (abc) MAC address.

3)  NODE1 goes down.

4)  NODE1 VIP is moving to NODE2 , anyhow NODE1 VIP will use different MAC address (xyz) on NODE2.

5)  All existing connections (which were running on NODE1) are connected to NODE2 because of NODE1 VIP.

6)  Are all connections can continue on NODE2 or will disconnect  because of different mac address ?

Some people told -

1) All users can work as usual

2) All existing users will be disconnected and then get time out error because of different mac address.

Thanks

Jhil

Best Answer

  • BPeaslandDBA
    BPeaslandDBA Member Posts: 4,615 Blue Diamond
    edited Jan 19, 2018 11:41AM Answer ✓
    I am trying to understand  'RAC ARCHITECTURE'  especially in 10g R2.Please do NOT consider scan feature

    Why not a fully supported, more recent version? Having SCAN involved doesn't change my answers much...

    4)  NODE1 VIP is moving to NODE2 , anyhow NODE1 VIP will use different MAC address (xyz) on NODE2.

    The "switch" of the VIP and the change to use the new MAC address is done at the switch level with something called Address Resolution Protocol (ARP). TO understand VIP and how ARP helps it, read this blog post: Oracle RAC VIP and ARP Primer – Peasland Database Blog

    Understanding my blog post was a big missing part for me in understanding how VIP's work. Because the VIP isn't physically tied to the NIC's MAC, it can be re-ARPed.

    5)  All existing connections (which were running on NODE1) are connected to NODE2 because of NODE1 VIP.

    This won't happen automatically,not with your TNS alias configuration. You do not have FAILOVER turned on.

    6)  Are all connections can continue on NODE2 or will disconnect  because of different mac address ?

    No one ever connects to a MAC address. You connect to an IP address. When the route gets to the network switch the server is plugged into, the switch says..."oh yeah..that IP address is for the MAC address on node 1 so I'll route the traffic there". When a VIP fails over, Grid Infrastructure (CRS in the 10g days) relocates the VIP to the other node and then has the switch re-ARP to the new node's MAC address. When the user tries the VIP's IP again, the switch directs the route correctly. The end user never knows the MAC address, nor does it care.

    Some people told -1) All users can work as usual2) All existing users will be disconnected and then get time out error because of different mac address.

    I'd say that neither of the above is correct. You can use Transparent Application Failover to achieve #1 in that list. Configuring your TNS alias for failover is a first step, but that will only handle transparent failover of SELECT statements. You'll need code changes to handle transparent failover of DML.

    Step 2 above will never happen. The whole point of VIPs is to avoid the 10 minute TCP/IP timeouts.

    Cheers,
    Brian

    JhilJhil

Answers

  • BPeaslandDBA
    BPeaslandDBA Member Posts: 4,615 Blue Diamond
    edited Jan 19, 2018 11:41AM Answer ✓
    I am trying to understand  'RAC ARCHITECTURE'  especially in 10g R2.Please do NOT consider scan feature

    Why not a fully supported, more recent version? Having SCAN involved doesn't change my answers much...

    4)  NODE1 VIP is moving to NODE2 , anyhow NODE1 VIP will use different MAC address (xyz) on NODE2.

    The "switch" of the VIP and the change to use the new MAC address is done at the switch level with something called Address Resolution Protocol (ARP). TO understand VIP and how ARP helps it, read this blog post: Oracle RAC VIP and ARP Primer – Peasland Database Blog

    Understanding my blog post was a big missing part for me in understanding how VIP's work. Because the VIP isn't physically tied to the NIC's MAC, it can be re-ARPed.

    5)  All existing connections (which were running on NODE1) are connected to NODE2 because of NODE1 VIP.

    This won't happen automatically,not with your TNS alias configuration. You do not have FAILOVER turned on.

    6)  Are all connections can continue on NODE2 or will disconnect  because of different mac address ?

    No one ever connects to a MAC address. You connect to an IP address. When the route gets to the network switch the server is plugged into, the switch says..."oh yeah..that IP address is for the MAC address on node 1 so I'll route the traffic there". When a VIP fails over, Grid Infrastructure (CRS in the 10g days) relocates the VIP to the other node and then has the switch re-ARP to the new node's MAC address. When the user tries the VIP's IP again, the switch directs the route correctly. The end user never knows the MAC address, nor does it care.

    Some people told -1) All users can work as usual2) All existing users will be disconnected and then get time out error because of different mac address.

    I'd say that neither of the above is correct. You can use Transparent Application Failover to achieve #1 in that list. Configuring your TNS alias for failover is a first step, but that will only handle transparent failover of SELECT statements. You'll need code changes to handle transparent failover of DML.

    Step 2 above will never happen. The whole point of VIPs is to avoid the 10 minute TCP/IP timeouts.

    Cheers,
    Brian

    JhilJhil
  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Jan 19, 2018 12:52PM

    )  All existing connections (which were running on NODE1) are connected to NODE2 because of NODE1 VIP.

    This won't happen automatically,not with your TNS alias configuration. You do not have FAILOVER turned on.

    By default , FAILOVER=ON  - Am i right ?

    Is it really required to set  FAILOVER=ON explicitly in tnsnmaes.ora file.

  • Dude!
    Dude! [email protected]Member Posts: 22,830 Black Diamond
    edited Jan 20, 2018 10:00AM

    This is a complex topic and requires more reading on your end:

    Other people have already tried to summarize and explain the scenarios. I think the following might answer your questions:

    Oracle DBA and RAC DBA Expert: Oracle RAC load balancing and failover

    Regarding MAC addresses, every Ethernet device uses a unique MAC address. Ethernet devices use MAC addresses to communicate with each other, not IP, which are at higher level in the OSI model. If you assign an IP address, the communication protocol (ARP) will resolve it to the MAC address of a physical or virtual network adapter. The server or server service can re-assign an IP address to another device, which requires an ARP update, so other communication devices will connect to another device when connecting using the same IP address. In modern systems, this is typically done one the server side by using a virtual network adapter. The server will then re-assign internal connection to the virtual adapter as necessary, which does not require ARP updates on the external network.

    Methods involving a re-assignment of MAC address are used for connection fail-over and require client re-connecting to take affect. It cannot be used to move existing connections between different servers or database instances, which requires special application programing. RAC can use TAF as explained in the above URL, but any uncommitted transactions are rolled back and server side program variables and session properties will be lost.

    JhilJhil
  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Jan 20, 2018 12:41PM

    Hi Dude,

    Finally you are saying without TAF, there is NO FAILOVER on RAC - is it so ?

    Please update ..  If you do NOT mind , please post your answer on following link.

    FAILOVER=ON, but NOFAILOVER on RAC - WHY ?

  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Jan 20, 2018 12:45PM

    Hi Brian,

    If i do NOT use TAF, and FAILOVER=ON , in this case one node is going down.

    1) What about Existing connections on failed  node on 10g  and  11g R2  RAC ?

    Please post your answer for 10g RAC as well as 11g RAC

    Thanks

  • Dude!
    Dude! [email protected]Member Posts: 22,830 Black Diamond
    edited Jan 20, 2018 3:03PM
    955912 wrote:Finally you are saying without TAF, there is NO FAILOVER on RAC - is it so ?

    I don't think so.

    What do you think fail-over means?

    Fail-over can be at the connection level and application level. In case of the former, you need to reconnect. In case of the later you don't, but you will loose uncommitted transaction, etc. Every computer or node has it's own process and memory. Something that provides a complete and transparent fail-over for existing connections without any client impact when the service or node the client is connected to crashes, to my knowledge doesn't exist.

  • BPeaslandDBA
    BPeaslandDBA Member Posts: 4,615 Blue Diamond
    edited Jan 22, 2018 10:44AM
    Finally you are saying without TAF, there is NO FAILOVER on RAC - is it so ?

    That is partially correct. You do have to configure for failover if you want it to happen. There is no automatic failover out of the box. If you set FAILOVER=ON in the TNS names alias, then you will get automatic failover of the session, but that will not automatically failover the currently running SQL statement. You may also need application changes.

    You should start by reading this: http://www.oracle.com/technetwork/database/features/oci/taf-10-133239.pdf

    In 12.2, TAF is being rebranded as Application Continuity and has more features.

    Application Continuity

    http://www.oracle.com/technetwork/database/database-cloud/private/application-continuity-wp-12c-1966213.pdf

    https://docs.oracle.com/database/121/ADFNS/adfns_app_continuity.htm#ADFNS1058

    Cheers,
    Brian

    Jhil
  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Jan 22, 2018 12:18PM

    Hi Brian,

    I will go through all docs regrading VIP and SCAN functionalities

    I will update after some time

    Thanks for all links..

This discussion has been closed.