Saturday, September 19, 2015

What is ORACLE RAC IP & VIRTUAL IP or VIP

What is ORACLE RAC IP & VIRTUAL IP or VIP
Public IP:  The public IP address is for the server.  This is the same as any server IP address, a unique address with exists in /etc/hosts.
Private IP: Oracle RCA requires "private IP" addresses to manage the CRS, the clusterware heartbeat process and the cache fusion layer.
Virtual IP:  Oracle uses a Virtual IP (VIP) for database access.  The VIP must be on the same subnet as the public IP address.  The VIP is used for RAC failover (TAF).


In previous terms of RAC, We have one Public IP & One Private IP.

Public IP is for the rest of the world. In Normal case we use a protocol called Stateful protocol for Ex. TCP/IP (its like acknowledges)
Private communication between Node to Node should be very fast, In general we use a protocol called State less Protocol. For example UDP.

UDP like a SEND & FORGET.

In tnsnames. Ora

Node1 / Host1 Public IP
Node2 / Host2 Public IP.

Basically these hosts or node names be resolved by the clients.

When ever a client requires to establish a connection It looks for the first resolvable IP in Network file and establishes a connection.
The traditional setup before 10gR2, which uses a TCP/Ip protocol to get connected the client to the node.

TCP/IP basically is a state full protocal and should have a certain number of re-tries or time out required, before the client recognizes that node gone down.
Suppose if the time out we set is 600s, the client keep tries to establish a connection. After 600 seconds the client will get an error infor something like below.

Can not resolve the hostname or tns lost contact.

Then only client will fail over to the next available node.
==========

Since this is unacceptable for certain kind of high transaction environments.

So the Oracle comes with a better solution introduced a concept called a VIP.

VIP, A Virtual IP is nothing but another IP which runs on same interface eth0 as your Public IP.

This VIP is available on all nodes like your each node individual. Your listener is aware of both Public IP & vip.

It listens to public IP & VIP. Incase of a fail over the vip of Node-1 shifted to Node# 2.

The trouble is as soon as the VIP shifted to Node# 2, it changes the mac address which is appended of each VIP of the network interfaces.

When you start eth0 vip on Node#1 eth0 of node#1 address will be appended to vip1
When vip1 switches to node2 the mac address of vip1 going to be mac address of the interface card of Node#2, which means a new mac address is initiaed.

This changed mac address is immediately going to ask node#2, something is called re-arg, re-arg is protocol address resolution protocol
It means the node#2 immediately broad cast the new mac address to the all connected client.

All connected clients when they get the notification that the new vip have new mac address, they immediately Marked as invalid all connected sessions.

They imm’ly connected to vip on the other node, but the listener running on other node will not listen to VIP1,
It only listen to the PublicIP and VIP2. Once the vip1 is discarded by the listener running on Node#2, The client
Reads the second VIP address from tnsnames and connects to VIP#2.

THIS WHOLE THING COMPLETED IN 20 secs time


WEBLOGIC Frequently Asked Questions faq

Memory leak is when objects are not romved from the heap even when they are not required.
OUT OF MEMORY?
a) Insufficient heap size, not able to match the extra load.
b) Objects licing too long, like HTTP Sessions.
c) Memory leak in application code.
d) Full GC not happening due to JVM Bug.
Trail & Error
Gather memory data by enabling GC verbose.
If its due to Http Session, timing out http session after certain interval might help.
Look into the code for jdbc connection handling.
Optimizing the heap size according to the load.
Stuck threads are JVM threads that have been running for more than a certain configurable time (default 600 seconds)
Garbage collection is the JVM’s process of freeing up unused Java objects in the Java heap.The Java heap is where the objects of a Java program live. It is a repository for live objects, dead objects, and free memory. When an object can no longer be reached from any pointer in the running program, it is considered “garbage” and ready for collection.
The JVM heap size determines how often and how long the VM spends collecting garbage. An acceptable rate for garbage collection is application-specific and should be adjusted after analyzing the actual time and frequency of garbage collections. 
A domain is the basic administration unit for WebLogic Server. It consists of one or more WebLogic Server instances, and logically related resources and services that are managed, collectively, as one unit.
Administration Server  A domain always includes one WebLogic Server instance that is configured as an Administration Server. The Administration Server provides a central point for managing the domain and providing access to the WebLogic Server administration tools. These tools include, but are not limited to, the following:
WebLogic Server Administration Console—graphical user interface to the Administration Server
WebLogic Server Node Manager—Java program enabling you to start, shut down, restart, and monitor remote WebLogic Server instances
Managed Servers  All other WebLogic Server instances in a domain are called Managed Servers. Managed Servers host application components and resources, which are also deployed and managed as part of the domain. In a domain with only a single WebLogic Server instance, that one server functions as both the Administration Server and Managed Server.