Oracle RAC (Real Application Clusters) & Cache Fusion

Oracle RAC (Real Application Clusters) & Cache Fusion in Oracle Database: Oracle Real Application Clusters (RAC) provides active-active high availability and…

Oracle Real Application Clusters (RAC) provides active-active high availability and horizontal scalability. Multiple database instances running on separate physical server nodes mount and read/write to the same shared physical database files simultaneously.


RAC Architecture & Grid Infrastructure

                    [ SCAN Listener: scan.corp.local ]
                                   |
                +------------------+------------------+
                |                                     |
       [ Node 1 Instance ]                   [ Node 2 Instance ]
       (SGA / Buffer Cache)                  (SGA / Buffer Cache)
                |                                     |
                +======= Private Interconnect ========+
                     (Cache Fusion Protocol)
                                |
                +---------------+---------------+
                |                               |
        [ Shared SAN Storage - Oracle ASM (Disk Groups) ]
          +--- Datafiles (+DATA)
          +--- Redo Logs (+RECO)
          +--- Voting Disks & OCR

Core RAC Components

  1. Oracle ASM (Automatic Storage Management): Built-in cluster volume manager and file system that stripes and mirrors database files across storage disks evenly.
  2. Cluster Interconnect: Ultra-high-speed, low-latency private network connecting the nodes.
  3. Cache Fusion: The protocol that makes shared-everything possible. If Node 1 needs a data block currently cached in Node 2's SGA, Cache Fusion transfers that data block across the high-speed interconnect directly into Node 1's memory without writing the block to disk first.
  4. GCS & GES (Global Cache / Enqueue Services): Coordinate block access locks and lock conversions across all active nodes to preserve transaction serializability.
  5. SCAN (Single Client Access Name): A virtual cluster hostname with multiple IP addresses. Clients connect to the SCAN address; Oracle routes requests across nodes according to real-time workload balancing.

Monitoring RAC Instances in Real-Time

In a RAC environment, standard V$ dynamic performance views show metrics only for the local instance. Prepending G (GV$ views) aggregates metrics across every active node in the cluster:

-- View all running instances and their health status
SELECT 
    inst_id,
    instance_name,
    host_name,
    status,
    parallel,
    archiver
FROM gv$instance
ORDER BY inst_id;

-- Monitor interconnect latency and Cache Fusion transfer speeds
SELECT 
    inst_id,
    name,
    value
FROM gv$sysstat
WHERE name IN (
    'gc cr blocks received',
    'gc current blocks received',
    'gc cr block receive time'
);

Failover Technologies: TAF and FCF

  • TAF (Transparent Application Failover): OCI client mechanism that automatically redirects a session to a surviving node if its connected node fails.
  • FCF (Fast Connection Failover): Integrated with Universal Connection Pool (UCP) and application servers (WebLogic, Spring Boot, HikariCP) via Fast Application Notification (FAN) events, immediately evicting dead connections and rerouting work without socket timeout hangs.

Exercises

  1. Query GV$SESSION to analyze user connection distribution across a 4-node cluster.
  2. Explain the consequence of an interconnect bottleneck on Cache Fusion performance.
  3. Describe the role of the Oracle Cluster Registry (OCR) and Voting Disks during node fencing.