Rac crs resource VIP

Source: Internet
Author: User
Tags failover taf
Each node has a VIP, which is the IP address we access. If a node goes down, its VIP address will be moved to another node according to the algorithm,
In this way, user access is normal.

I think VIP is used for failover.

When node A fails, the VIP will be moved to Node B, but Node B does not listen on this VIP address, so that the client can quickly know that node A is down and switch to Node B.

It will take a long time if the traditional TCP timeout is adopted.

If you want to implement failover, configure it in tnsnames. ora.


(I) TCP/IP protocol stack timeout


Logically, the TCP/IP protocol stack communicates with each other.

The TCP protocol of the transport layer provides the integrity service for data transmission. That is, after receiving data packets, the transport layer of the receiving end must return a confirmation message to the transport layer of the sending end.
If the sender does not receive the confirmation message within the specified time period, the sender determines that the package is lost and resends the message. If no response is received after multiple resends,
The transmission layer of the sending end knows that the network is faulty, terminates the sending attempt, and notifies the application layer.
For example, if user_a uses sqlplus to connect to the Oracle server, sqlplus will throw a connection error.

The connection request of the client must wait until the transmission layer times out before it can be known that the database server or the listener has a problem.

Suppose there is a 2-node RAC environment, VIP1 VIP2, And now Node 2 has a fault:
① After detecting Node 2 exceptions, CRS triggers clusterware reconstruction and kicks out Node 2.
② VIP2 drifting to node 1
③ Your connection request to VIP2 will be routed to node 1 by the network layer
④ Because Node 1 has VIP2, data packets will pass through the network access layer, network layer, and transmission layer smoothly.
⑤ However, the listener on node 1 only listens to VIP1 and public IP, and does not listen to VIP2, that is, no corresponding program at the application layer receives this package.
⑥ The client can immediately receive this error, and then the client will re-initiate a connection to VIP1



(Ii) VIP drift


VIP drifting only when the system fails

VIP cannot be moved out

You can use crs_relocate to pull the VIP back.

This is a feature. The VIP does not automatically failover back to prevent secondary brown out.

However, 10.2.0.3 is an exception. This parameter is enabled by default. Other versions are disabled by default.
Ora_racg_vip_failback = 0

We can use v $ session. failed_over to indicate yes, or crsd. log has output.

The Listener does not automatically register after the VIP drift.

It's only about reducing the length of the failover time during connection.

The purpose of the drift is to return an error faster during connection, rather than TNS timeout.



(Iii) VIP configuration


VIP name in the hosts file

We recommend that you name hostname-VIP, hostname-priv

The name should not be underlined. Dashes okay




(Iv) TAF (transparent application failover)



Oracle's TAF is actually built on the VIP Technology
If You Want To implement transparent application failover, you must configure a TAF application policy.
If the TAF policy is configured, although the client receives an error, the TAF configuration will immediately try the connection of the next node,
In this way, the application implements transparent failover and reduces the waiting time of client users.
If you do not use the VIP connection, VIP1 automatically switches to node2 after a node becomes effective,
However, the connected clients cannot immediately know that node 1 is effective,
Therefore, clients that have been connected to the actual node will constantly try to connect until the connection times out and so on will try to connect to the next address in tnsname,
Therefore, this switchover takes a long time before the client can switch to node2.




(V) differences between IP addresses and VIP addresses


① VIP is floating, while IP is fixed
② The IP uses the transport layer to time out, while the VIP uses the application layer to respond immediately.
③ The IP address is connected to an unconnected instance, and the VIP address is connected to another instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.