Wednesday, 14 May 2014

what is server side load balancing in RAC and how does it happen?

How the SCAN listener knows which node it has to direct the incoming connection / how does it load balance?


Each database is represented by one or more services. A service is identified by a service name, for example, OLTP_SERVICE. A client uses a service name to identify the database it must access. The information about the database service and its location in the network is transparent to the client.
The information needed to use a service name to create a database connection is stored in a repository, which is represented by one or more naming methods. 

naming method is a resolution method used by a client application to resolve a connect identifier (such as the service name) to a connect descriptor when attempting to connect to a database service. Oracle Net Services offers several types of naming methods that support localized configuration on each client, or centralized configuration that can be accessed by all clients in the network.
An Oracle Database 11g release 2  database service automatically registers with the listeners specified in the LOCAL_LISTENER and REMOTE_LISTENERparameters. During registration, PMON sends information such as the service name, instance names, and workload information to the listeners. This feature is called service registration.

Services coordinate their sessions by registering their workload, or the amount of work they are currently handling, with the local listener and the SCAN listeners. Clients are redirected by the SCAN listener to a local listener on the least-loaded node that is running the instance for a particular service. This feature is called load balancing. The local listener either directs the client to a dispatcher process (if the database was configured for shared server), or directs the client to a dedicated server process.

When a listener starts after the Oracle instance starts, and the listener is available for service registration, registration does not occur until the next time the Oracle Database process monitor (PMON) starts its discovery routine. By default, the PMON discovery routine is started every 60 seconds. To override the 60-second delay, use the SQL statement ALTER SYSTEM REGISTER. This statement forces PMON to register the service immediately.

No comments:

Post a Comment