Overview
Oracle RAC runs several database instances on different servers against one shared database (shared storage). It provides instance-level high availability and horizontal scale for many workloads. The test environment reported Real Application Clusters = FALSE in V$OPTION; this note is conceptual and not executed.
Core concepts
- Each instance has its own SGA, redo thread and undo tablespace; all share data files and control files via ASM (Automatic Storage Management) or a cluster file system.
- Cache Fusion: when instance B needs a block that instance A holds in its buffer cache, the block is sent over the private interconnect instead of being written to disk and re-read. Contention shows as
gcwait events (for examplegc current block 2-way,gc buffer busy). - Grid Infrastructure (Clusterware) manages nodes, VIPs, the SCAN listener name, ASM and failover. Services let you route workloads to instances (
srvctl add service) and define preferred/available instances. - Failover: if a node dies, sessions are reconnected to a surviving instance (with Transparent Application Failover or Application Continuity to replay in-flight work).
- Design implications: avoid hot blocks accessed from all nodes (sequences without cache, small hot tables, right-growing indexes) with partitioning by service,
CACHEsequences, reverse-key or hash-partitioned indexes (oracle-partitioning). - RAC protects against node failure, not against site loss or corruption: add Data Guard (oracle-data-guard) and backups (oracle-rman-backup).
Worked example
Checking the cluster from the documentation (not executed):
SELECT inst_id, instance_name, host_name, status FROM gv$instance;
SELECT inst_id, event, total_waits, time_waited_micro/1e6 secs
FROM gv$system_event WHERE event LIKE 'gc%' ORDER BY time_waited_micro DESC FETCH FIRST 5 ROWS ONLY;GV$ views show every instance; V$ shows only the one you connect to. AWR reports exist per instance and as RAC-wide reports (oracle-awr-ash).
Pitfalls and production notes
- RAC does not make a slow query fast; a badly tuned SQL statement just wastes more cluster resources.
- Interconnect latency and bandwidth set the ceiling for gc waits; use dedicated, redundant networks.
- Licensing is by option and edition; evaluate if a single-instance with Data Guard meets your availability goal, as many do.
- Rolling patching reduces downtime but needs careful procedure (oracle-patching-upgrades).
- Containers (Kubernetes) and RAC are an awkward fit; for K8s consider single-instance with Data Guard or other HA.
Practice questions
- What does Cache Fusion avoid?
- Why can an application that works on a single instance scale poorly on RAC?
- Which failures does RAC not protect against?
References
- Oracle Real Application Clusters Administration and Deployment Guide
Related
oracle-data-guard · oracle-architecture · oracle-awr-ash · sqlserver-always-on