10 grac service architecture

Upload: alokmishra4533

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 10 Grac Service Architecture

    1/31

    Oracle10g RAC ServiceArchitecture

    Overview of Real Application ClusterReady Services, Nodeapps, and User

    Defined Services

  • 8/13/2019 10 Grac Service Architecture

    2/31

    Overview

    Service Architecture

    Cluster Ready Services (CRS)

    Nodeapps

    User defined Services

    ASM Services

    Internally Managed Services Monitoring Services

  • 8/13/2019 10 Grac Service Architecture

    3/31

    RAC Service Architecture

    Oracle 10g RAC features a service basedarchitecture

    This is an improvement over 9i RAC in

    several ways Increased flexibility

    Increased manageability

    Improvements in High Availability Enables 10g Grid Deployment

  • 8/13/2019 10 Grac Service Architecture

    4/31

    RAC Services and HighAvailability

    Oracle Services facilitate high availability ofdatabases and related applications

    If key database resources become unavailable(network, storage, etc.): Instances and Services will be relocated to another

    node

    The failed node will be rebooted

    By default, after any server boot-up, Oracle

    attempts to restart all services on the node

  • 8/13/2019 10 Grac Service Architecture

    5/31

    Cluster Ready Services

    Manage the RAC Cluster Several Different Services

    OracleCRSService

    Oracle CSService

    OracleEVMService OraFenceService

    Required for RAC installation

    Installed in its own CRS_HOME

  • 8/13/2019 10 Grac Service Architecture

    6/31

    CRS Basics

    Used to manage RAC Only one set of CRS Daemons per system

    Multiple instances share the same CRS

    CRS runs as both root and Oracle users CRS must be running before RAC can

    start

  • 8/13/2019 10 Grac Service Architecture

    7/31

    CRS Management

    Started automatically Can stop and start manually

    Start the OracleCRSService

    Stop the OracleCRSService

    Uses the voting disk and OCR (Oracle ClusterRepository)

    Requires 3 network addresses Public

    Private

    Virtual Public

  • 8/13/2019 10 Grac Service Architecture

    8/31

    CRS Services

    OracleCRSService Cluster Ready Services Daemon

    OracleCSService

    Oracle Cluster Synchronization Service Daemon

    OracleEVMService

    Event Manager Daemon

    OraFenceService

    Process Monitor

  • 8/13/2019 10 Grac Service Architecture

    9/31

    Cluster Ready Services DaemonOracleCRSService Runs as Administrator user Automatically restarted

    Manages Application Resources

    Starts, stops and fails-over application resources Maintains the OCR (Oracle Cluster Repository)

    Keeps state information in the OCR

  • 8/13/2019 10 Grac Service Architecture

    10/31

    Oracle Cluster Synchronization

    Service DaemonOracleCSService Runs as Administrator user

    Maintains the heartbeat (failure causes systemreboot)

    Provides Node Membership

    Group Access

    Basic Cluster Locking

    Can integrate with 3rdparty clustering productsor run standalone

    OracleCSService also works with non-RACsystems

  • 8/13/2019 10 Grac Service Architecture

    11/31

    Event Manager DaemonOracleEVMService Runs as Administrator user Restarts on failure

    Generates Events

    Starts the racgevt thread to invokes ServerCallouts

  • 8/13/2019 10 Grac Service Architecture

    12/31

    Process MonitorOraFenceService Runs as Administrator user Locked in memory to monitor the cluster

    Provides I/O fencing

    OraFenceService periodically monitors clusterstatus, and can reboot the node if a problem isdetected

    An OraFenceService failure results in Oracle

    Clusterware restarting the node

  • 8/13/2019 10 Grac Service Architecture

    13/31

    RACG

    RACG is a behind-the-scenes process (orthread) that extends clusterware tosupport Oracle-specific requirements andcomplex resources.

    Runs server callout scripts when FANevents occur.

    Runs as processes (or threads), not as a

    service (racgmain.exe, racgimon.exe)

  • 8/13/2019 10 Grac Service Architecture

    14/31

    Cluster Ready ServicesManagement

    Log Files

    OracleCRSService

    %ORA_CRS_HOME%\log\hostname\crsd

    Oracle Cluster Registry (OCR)

    %ORA_CRS_HOME%log\hostname\ocr

    OracleEVMService

    %ORA_CRS_HOME%\log\hostname\evmd

    OracleCSService

    %ORA_CRS_HOME%log\hostname\cssd

    RACG

    %ORA_CRS_HOME%log\hostname\racg

  • 8/13/2019 10 Grac Service Architecture

    15/31

    Nodeapp Services

    Nodeapps are a standard set of Oracleapplication services that are automaticallylaunched for RAC

    Virtual IP (VIP)

    Oracle Net Listener

    Global Services Daemon (GSD)

    Oracle Notification Service (ONS)

    Nodeapp services run on each node

    Can be relocated to other nodes through the virtual IP

  • 8/13/2019 10 Grac Service Architecture

    16/31

    VIP (Virtual IP)

    Creates a virtual IP address used by the Listener

    The virtual IP address fails over between nodes

    Multiple virtual IP addresses can exist on thesame system (during failover)

    Independent of the Oracle Instance Potential Problem if more than one database per

    node

  • 8/13/2019 10 Grac Service Architecture

    17/31

    Global Services Daemon(GSD) The daemon which executes SRVCTL

    commands

    GSD receives requests from SRVCTL toexecute administrative tasks, such as startup orshutdown

    The command is executed locally on eachnode, and the results are sent back toSRVCTL.

    The daemon is installed on the nodes bydefault. It is important that you do not kill thisprocess and it should not be deleted.

  • 8/13/2019 10 Grac Service Architecture

    18/31

    Listener

    Server-side component of Oracle Net

    Listens for incoming client connection requests

    Manages the traffic to the server; when a clientrequests a network session with a server, the

    listener actually receives the request andbrokers the client request

    If the client's information matches the listener'sinformation, then the listener grants a connection

    to the server.

  • 8/13/2019 10 Grac Service Architecture

    19/31

    Oracle Notification Service(ONS)

    The Oracle Notification Service isinstalled automatically on each RAC nodeas a Node Application

    ONS starts automatically with each boot ONS uses a simple push/subscribe

    method to publish event messages to all

    RAC nodes with active ONS daemons

  • 8/13/2019 10 Grac Service Architecture

    20/31

    ONS and Fast ApplicationNotification

    ONS can be configured to run on nodeshosting client or mid-tier applications

    ONS is the key component of Fast

    Application Notification (FAN) Can be utilized to extend RAC high

    availability and load balancing to mid-tierapplications

    Independent of True Application Failover

    Less reliance on network configuration

  • 8/13/2019 10 Grac Service Architecture

    21/31

    User Defined Services

    User defined, named services may be createdto manage database resources that areassociated with application workloads

    One or more database instances may be

    mapped to a single service A database instance may be assigned to one or

    more services

    The Automated Workload Repository may be

    used to monitor Service metrics

  • 8/13/2019 10 Grac Service Architecture

    22/31

    User Defined Services andFailover Services can be defined with preferred

    and alternate instances

    A service may be assigned to start on

    preferred instances The same service may have alternate

    instances assigned for failover

    If multiple services are assigned for the same

    database, the preferred and alternateinstance assignments may be different foreach service

  • 8/13/2019 10 Grac Service Architecture

    23/31

    Automatic Storage ManagementServices Automatic Storage Management (ASM) is a

    storage option for creating and managingdatabases

    ASM operates like a Logical Volume Manager

    between the physical storage and the database. A small, automatically managed Oracle database

    instance is created on each node (if ASM is chosenas a storage option)

    ASM instances start automatically as Oracleservices

  • 8/13/2019 10 Grac Service Architecture

    24/31

    Internally Managed Services When the Global Services Daemon is started as a part

    of the Node Applications, it in turn launches keyinternally managed services The Global Cache Service manages Cache Fusion and in-

    memory data buffers

    The Global Enqueue Service manages inter-instance lockingand RAC recovery

    GCS and GES show up as OS processes or threads,but GSD is the only service that can be externallycontrolled

    GCS and GES together manage a set of virtual tables

    in memory, called the Global Resouce Directory

  • 8/13/2019 10 Grac Service Architecture

    25/31

    Global Cache Service (GCS)

    The controlling process that implements Cache Fusion.

    Manages the status and transfer of data blocks across the buffercaches of all instances.

    Tightly integrated with the buffer cache manager to enable fastlookup of resource information in the Global Resource Directory.

    Maintains the block mode for blocks in the global role.

    Employs various background processes (or threads) such as theGlobal Cache Service Processes (LMSn) and Global EnqueueService Daemon (LMD).

  • 8/13/2019 10 Grac Service Architecture

    26/31

    Global Enqueue Service Monitor(LMON)

    Background process that monitors theentire cluster to manage global resources.

    Manages instance and process expirations

    and recovery for GCS. Handles the part of recovery associated

    with global resources

  • 8/13/2019 10 Grac Service Architecture

    27/31

    Global Resource Directory

    The data structures associated with global resources. Itis distributed across all instances in a cluster.

    Global Cache Service and Global Enqueue Servicemaintain the Global Resource Directory to recordinformation about resources and enqueues held

    globally. The Global Resource Directory resides in memory and

    is distributed throughout the cluster to all nodes. In thisdistributed architecture, each node participates inmanaging global resources and manages a portion of

    the Global Resource Directory.

  • 8/13/2019 10 Grac Service Architecture

    28/31

    Monitoring RAC Services %ORA_CRS_HOME%\bin\crs_stat

    NAME=ora.rac1.gsd TYPE=application

    TARGET=ONLINE

    STATE=ONLINE

    NAME=ora.rac1.oem TYPE=application

    TARGET=ONLINE

    STATE=ONLINE

    NAME=ora.rac1.ons

    TYPE=application

    TARGET=ONLINE

    STATE=ONLINE

    C S

  • 8/13/2019 10 Grac Service Architecture

    29/31

    Monitoring RAC Services Creating a tabular report:

    %ORA_CRS_HOME%\bin\crs_stat -tName Type Target State Host

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

    ora.rac1.gsd application ONLINE ONLINErac1

    ora.rac1.oem application ONLINE ONLINErac1

    ora.rac1.ons application ONLINE ONLINErac1

    ora.rac1.vip application ONLINE ONLINE rac1

    ora.rac2.gsd application ONLINE ONLINE

    rac2ora.rac2.oem application ONLINE ONLINE

    rac2

    ora.rac2.ons application ONLINE ONLINErac2

    ora.rac2.vip application ONLINE ONLINE rac2

    R i

  • 8/13/2019 10 Grac Service Architecture

    30/31

    Review

    What advantages does a service basedarchitecture offer?

    What four services comprise ClusterReady Services?

    Nodeapps consists of which fourapplications?

    True or False: a database instance maybe assigned to multiple services

  • 8/13/2019 10 Grac Service Architecture

    31/31

    Summary Service Architecture

    Cluster Ready Services (CRS)

    OracleCRSService

    OracleCSService

    OracleEVMService

    OraFenceService

    Nodeapps

    VIP Listener

    GSD

    ONS

    User defined Services

    ASM Services

    Internally managed services

    Global Cache Service

    Global Enqueue Service

    Global Resource Directory

    Monitoring Services