1. Why we are using vip in RAC? Because before 10g, there were no concept of vip.
If user connected to the INSTANCE using physical ip, and if the node goes down, then there is no way for the user to know whether node is available or not. So it need to wait for a long time, till it gets timed out by the network.
However If i use logical vip( on top of physical vip), then if node goes down, then CRS will failover this vip to other surviving node. And the user will get the connection error quickly( like TNS no listener available ).
2. If i have a 8 node RAC, then how many scan listeners are required?
3 SCAN listeners sufficient for any RAC setup. Scan is not configured as per number of nodes.In a cluster there will be one scan address resolving to 3 different Ips .Each of the instance registers itself with the scan listener using remote_listener parameter.
3. How SCAN knows which node has least load?
scanlocal/remote listners play imp part. listener is remote listener and its job it to
forward connection to local listner running on each node.When we start instances
the corresponding PMON processes get dynamically registered with local listners
and start feeding listenrs with load profile info. PMON gathers load info using
kstat() unix system call. When
a new incoming connection hits any of the listener process it will redirect the
connection to the least loaded node . scan listener calculates least loaded
node by calculating lbscore aganint each RAC database instance.
4. Explain how client connection is established in RAC database ?
LREG process on each instances registers the database service of the node with default local listener and scan listener. The listeners store the workload information of each node. Prior to 12c ,PMON process used to handle the instance registration with the listner.
So when client tries to connect using scan_name and port,
- scan_name will be resolved through DNS , which will redirect to 1st scan ip ( out of 3).
- the client will connected to the respective scan listener
- The scan listener compares the work load of both the instances and if scan determines that node1 has least load , then scan listener send the vip address and port details of that particular nodes local listener to client.
- Now client connects to that local listeners and a dedicated server process is created
- Client connection becomes successful and it starts accessing the database.
No comments:
Post a Comment