Pages

Tuesday 10 January 2012

SERVICES CONFUSIONS CLEARED


ORACLE SERVICES

Well i was buzzed on my email by one of my close client, and he asks what is actually a service in RAC, so i decided to post on this. Well now lets get to the point, to manage workloads efficiently we define services to a particular application or to a subset of an application's operations. You can also group work by type under services. For example, online users can be a service while batch processing can be another and reporting can be yet another service type.

When you define a service, you specify which instances support that service. These are known as the PREFERRED instances. You can also define other instances to support a service if the service's preferred instance fails. These are known as AVAILABLE instances.

When you specify PREFERRED instances, you are specifying the number of instances on which a service will normally run. The Oracle Clusterware attempts to ensure that the service always runs on the number of nodes for which you have configured the service. Afterwards, due to either instance failure or planned service relocations, a service may be running on an AVAILABLE instance.

Services are integrated with Resource Manager which enables you to restrict the resources that are used by a service within an instance. The Resource Manager enables you to map a consumer group to a service so that users who connect with the service are members of the specified consumer group. Also, the Automatic Workload Repository (AWR) enables you to monitor performance by service.

Oracle Net Services provides connection load balancing to enable you to spread user connections across all of the instances that are supporting a service. For each service, you can define the method that you want the listener to use for load balancing by setting the connection load balancing goal, CLB_GOAL. You can also specify a single TAF policy for all users of a service by defining the FAILOVER_METHOD, FAILOVER_TYPE, and so on. Oracle RAC uses FAN to notify applications about configuration changes and the current service level that is provided by each instance where the service is enabled.

Oracle Net Services provides the ability to balance client connections across the instances in an Oracle RAC configuration. There are two types of load balancing that you can implement: client-side and server-side load balancing. Client-side load balancing balances the connection requests across the Listeners. With server-side load balancing, the Listener directs a connection request to the best instance currently providing the service by using the load balancing advisory.

In an Oracle RAC database, client connections should use both types of connection load balancing.

FAN, FCF, and the load balancing advisory depend on an accurate connection load balancing configuration that includes setting the connection load balancing goal for the service. You can use a goal of either long or short for connection load balancing. These goals have the following characteristics:

Long := Use the LONG connection load balancing method for applications that have long-lived connections. This is typical for connection pools and SQL*Forms sessions. Long is the default connection load balancing goal. The following is an example of modifying a service, POSTMAN, with the PL/SQL DBMS_SERVICE package and the CLB_GOAL_LONG package constant to define the connection load balancing goal for long-lived sessions:

EXECUTE DBMS_SERVICE.MODIFY_SERVICE (service_name => 'POSTMAN', clb_goal => DBMS_SERVICE.CLB_GOAL_LONG);

Short := Use the SHORT connection load balancing method for applications that have short-lived connections. The following example modifies the service known as ORDER, using the DBMS_SERVICE.CLB_GOAL_SHORT package constant to set the goal to short:

EXECUTE DBMS_SERVICE.MODIFY_SERVICE (service_name => 'ORDER', CLB_GOAL => DBMS_SERVICE.CLB_GOAL_SHORT);



To make things simple let me explain you what actually FAN is :=

FAN (FAST APPLICATION NOTIFICATION) := It is nothing but a notification mechanism which RAC uses to quickly alert applications about configuration and workload service level changes.

On the other hand LBA (Load balancing advisory) := For LBA the concept is simple, it makes recommendations to applications about where to direct application requests to obtain the best service based on the policy that you have defined for that service.

Finally FCF (Fast Connection Failover) is the ability of oracle clients to provide a rapid failover of connections by subscribing to FAN events.

One last thing but not the least := There are 2 types of service level goals := 1) Service Time 2) Throughput

Service Time attempts to direct work requests to instances according to response time. Because LBA stats are based on elapsed time for work done in the service plus available bandwidth to the service.

Throughput attempts to direct work requests according to throughput. LBA stats are based on the rate that work is completed in the service plus available bandwidth to the service

In this post im not gonna deal more about RAC concepts as the question was only for a service. But i shall be posting more on RAC in this blog as i love RAC infact every DBA loves RAC.

-----------------------------------------------------------------------------------------------------------

Related links:
11.2 RAC GOODIES AND SERVERPOOLS

11G R2 RAC PROBLEMS AND SOLUTIONS

CLONE DATABASE HOME IN 11GR2 RAC

NIC BONDING IN 11G R2 RAC

PREREQUISITE TO CONFIGURE GNS AND GPNP IN 11G R2 RAC
  
SETUP 10G RAC ON YOUR LAPTOP

SETUP AND PLAY WITH 11G R2 RAC AT YOUR HOME PC

11g R2 RAC - ADD INSTANCE MANUALLY


11gR2 RAC : USE RCONFIG TO CONVERT NON RAC DATABASE TO RAC DATABASE
http://koenigocm.blogspot.in/search/label/11gR2%20RAC%20%3A%20USE%20RCONFIG%20TO%20CONVERT%20NON%20RAC%20DATABASE%20TO%20%20RAC%20DATABASE

11g R2 RAC : TRACING SERVICES IN A RAC DATABASE
 http://koenigocm.blogspot.in/search/label/11g%20R2%20RAC%20%3A%20TRACING%20SERVICES%20%20IN%20A%20RAC%20DATABASE

11G R2 RAC: INSTANCE RECOVERY
 http://koenigocm.blogspot.in/search/label/11G%20R2%20RAC%3A%20INSTANCE%20RECOVERY

11g R2 RAC: MANAGING THIRD PARTY APPLICATIONS USING APPLICATION VIP
 http://koenigocm.blogspot.in/search/label/11g%20R2%20RAC%3A%20MANAGING%20THIRD%20PARTY%20APPLICATIONS%20USING%20APPLICATION%20VIP









1 comment:

I saygley said...

Hi,

I appreciate your post however one thing still didn't make any sense in my mind.

"Service Time attempts to direct work requests to instances according to response time. Because LBA stats are based on elapsed time for work done in the service plus available bandwidth to the service.

Throughput attempts to direct work requests according to throughput. LBA stats are based on the rate that work is completed in the service plus available bandwidth to the service"

What is the difference between response time and throughput really? What is the rate mentioned with throughput about?