Oracle Real Application clusters (RAC) allows multiple instances to access a single Oracle database. These instances often run on multiple nodes.
The Component Diagram with explanation shows all the components that inter-relate to each other and together make up THE “Oracle RAC architecture“.
RAC is the principal component for the Oracle Grid Architecture. It’s an option to the Oracle Database that provides High Availability (HA) and scalability to the Oracle Database without requiring any application changes.
From a system point of view, a group of independent servers defines a cluster. These servers are inter-connected and cooperate as a single system.
Oracle RAC is heavily dependent on the interconnect, an efficient and high speed private network
Shared vs Dedicated Database components in a RAC architecture
As an Oracle DBA, you know that a standard database runs on a single instance. In the RAC architecture, the concept is different because some components are shared and others are dedicated for each instance.
Shared Database Components in Real Application Cluster
Datafiles, Control Files and Flash Recovery Log
Control Files, Datafiles and Flash Recovery Log are shared accross all instances in a shared storage area (NAS, SAN).
Online Redo Logfile
In an Oracle RAC database, each instance must have at least two groups of redo log files.
Only one instance can write in it’s place but other instances can read during recovery and archiving. If an instance is down, log file switches by remaining instances can force the idle instance redo logs to be archived.
Dedicated Database components
Each instance has its own SGA.
Though each instance has a local buffer cache, Cache Fusion causes sharing of cache and hence resolves the problems like concurrency.
Oracle Cache Fusion is the magic that works in the background to synchronize the cache of all the instances running on the different nodes. This synchronization allows multiple users sessions to execute concurrent transactions on either instance of the Oracle RAC Database without incurring stale reads.
New in Oracle19c RAC, Database Reliability Framework(DRF) attempts to detect any problems early before it can cause disruption in service. The concept is to detect problems and identify root cause.
Each instance has its own set of background processes.
Archived Redo Logfile
Private to the instance but other instances will need access to all required archive logs if a media recovery is required by the system.
Alert Log and Trace Files
These files or private to each instance. Other instances never read or write to those files.
On a single instance, you create the Oracle database home on the same server than the Database. As a shared file system is mandatory for RAC, you can use it to install your Oracle Home. In this case, you will create it on an Oracle ASM Cluster File System (ACFS). The Oracle Home will be available on all nodes of the cluster.
Installing a Shared Oracle database home has many management advantages in a multi node cluster environment: Out-of-place patching with ACFS snapshots significantly improves the patching process. It eliminates database downtime when coupled with the on-line migration feature of RAC and minimized downtime otherwise.
On Node-Local Oracle Database Homes; The advantage it provides is the ability to apply certain one-off patches in a rolling upgrade fashion.
Specific RAC components
The major components of a Oracle RAC system are:
- Shared disk system
- Oracle Clusterware
- Cluster high-speed Interconnect
Shared disk system
The shared storage provides the concurrent access by all the cluster nodes to the storage array.
Oracle provides a very flexible and high performing shared storage File System, “Automatic Storage Management” or ASM.
ASM is Oracle’s recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices. ASM uses disk groups to store datafiles; an ASM disk group is a collection of disks that ASM manages as a unit. The ASM volume manager functionality provides flexible server-based mirroring options. ASM also uses the Oracle Managed Files (OMF) feature to simplify database file management.
When using Oracle RAC, it’s a good idea to deploy Oracle Flex ASM.
This feature enables an Oracle ASM instance to run on a separate physical server from the database servers. With this deployment, larger clusters of Oracle ASM instances can support more database clients while reducing the Oracle ASM footprint for the overall system.
Command to check whether Oracle Flex ASM is enabled or not:
ASM cluster : Flex mode enabled
Clusterware, CRS and OCR
Each of the instances in the cluster configuration communicates with other instances by using the cluster manager or clusterware.
Oracle Clusterware is the technology which unifies servers in a server farm to form a cluster.
Oracle Clusterware is a complete, free-of-charge clustering solution that can be used with Oracle RAC, RAC One Node and even Single instance Oracle databases. It is shipped with Oracle Grid Infrastructure (GI). GI is a suite of software packages which includes Oracle Automatic Storage Management (ASM) for databases and Oracle Automatic Storage Cloud File System (ACFS).
New in 19c is support for bidirectional ACFS snapshots and even better integration with Oracle Data Guard when using ACFS to store the datafiles.
The Clusterware software is run by the Cluster Ready Services (CRS) using the Oracle Cluster Registry (OCR). The OCR records and maintains the cluster and node membership information and the voting disk which acts as a breaker during communication failures. Consistent heartbeat information travels across the interconnect to the voting disk when the cluster is running.
Oracle Clusterware 19c enhances the new deployment options for easier management and deployments of large pool of clusters. This new architecture is called Oracle Cluster Domain. It of a single Domain Services Cluster (DSC) and one or more Member Clusters. DSC provides many services which can be utilized by the four new types of Member Clusters.
Cluster high-speed Interconnect
In an Oracle Real Application Clusters (RAC) environment, all the instances or servers communicate with each other using high-speed interconnect on a private network. The “Interconnect” enables all the instances to be in sync in accessing the data.
You can use the Oracle Enterprise Manager Interconnects page to monitor the Oracle Clusterware environment. The Interconnects page shows the public and private interfaces on the cluster and the load contributed by database instances on the interconnect.
The CLUSTER_INTERCONNECTS parameter can be used to override the default interconnect with a preferred cluster traffic network. This parameter is useful in Data Warehouse systems that have reduced availability requirements and high interconnect bandwidth demands.
What are the benefits of integrating the Oracle cluster architecture?
- Your application is more scalable ; if you need more power, just add a new node.
- You can also reduce the total cost of ownership for the infrastructure by providing a scalable system using low-cost commodity hardware
- In case of a problem, you have the ability to fail over from one node to another
- You can increase throughput on demand for cluster-aware applications. One more time, increase cluster resources by adding servers to your cluster
- Increase throughput for cluster-aware applications by enabling the applications to run on all of the nodes in a cluster or just in a selection of nodes
- You can easily program the startup of applications in a planned order. In that way you ensure dependent processes are started in the correct sequence
- Ability to monitor processes and restart them if they stop
- With the RAC architecture, you eliminate your Single Point of Failure (SPOF) and unplanned downtime due to hardware or software malfunctions
- And finally, you can reduce or eliminate planned downtime for software maintenance
If you want more information than this tutorial you can read the official overview for Oracle 19c: https://www.oracle.com/technetwork/database/options/clustering/rac-twp-overview-5303704.pdf
Thank you for reading this blog!
Author: Vincent Fenoll – Oracle DBA