What is Oracle RAC? A Complete Guide to Cluster Configuration with Clusterware and ASM

Introduction

I will explain the mechanism of Oracle RAC. It may seem complex at first, but understanding the fundamentals can help optimize your design and enable rapid response in case of failures. I hope this article will help deepen your understanding.

What is Oracle RAC ?

Oracle RAC (Real Application Clusters) is a clustering technology that allows a single database to be configured across multiple servers. Until around the year 2000, the Active/Standby approach was mainstream, where the standby server would take over if the primary database server failed. Nowadays, an all-active node configuration using Oracle RAC is commonly adopted, especially in mission-critical systems. In this article, we will use a sample diagram of a two-node configuration to make the explanation easier to understand.

ComponentsExplanation
Oracle Grid InfrastructureThe primary software required to implement Oracle RAC. From 11g Release 2 onward, Oracle Clusterware and Oracle ASM have been integrated and are provided as Oracle Grid Infrastructure.
Oracle ClusterwareMiddleware that forms the foundation for Oracle RAC databases and applications, providing high availability and scalability.
Oracle ASMASM stands for Automatic Storage Management. It serves as both a volume manager and file system for Oracle Database files, streamlining storage management and optimizing performance.
Shared StorageShared storage where database files are located, accessible from all instances.
FC Switch (Fiber Channel Switch)A switch used to connect servers to shared storage. Fiber optic connections are commonly used, enabling high-speed network communication.
L2SW (L2 Switch)In Oracle RAC, internal communication (interconnect) occurs between instances. L2 switches are typically used to connect servers and build this network.

Purpose of Implementing Oracle RAC

The purpose of implementing Oracle RAC is to improve availability and scalability. The following sections provide an overview of each.

Improving Availability

Implementing Oracle RAC minimizes the impact of instance failures. Since multiple servers are all running in an active state, if one instance fails, processing can continue on the other servers.
In traditional HA configurations (Active/Standby), processing would stop during failover to the standby instance in the event of a failure. Oracle RAC, however, allows processing to continue uninterrupted, which is a significant difference.
The diagram below illustrates this scenario. Even if Database Server #1 fails, processing continues on Server #2 and Server #3.

Improving Scalability

Implementing Oracle RAC enhances scalability through scale-out. In traditional HA configurations, the only option was to scale up by increasing CPU or memory, which sometimes required replacing the server.
With Oracle RAC, you can expand resources simply by adding new servers, without making significant changes to the existing ones.
The diagram below illustrates the scale-out concept. You can add Database Server #4 without modifying Database Servers #1 through #3.

Functions of Oracle Clusterware

Oracle Clusterware is middleware that provides high availability and scalability for Oracle RAC. It includes various functions to manage the cluster configuration.
Resources managed by Clusterware include databases, instances, services, listeners, VIPs, and application processes. These are collectively referred to as CRS (Cluster Ready Service) resources.
Oracle Clusterware manages CRS resources based on configuration information stored in the OCR (Oracle Cluster Registry).

Functions of Oracle ASM

Oracle ASM is a virtualization technology that aggregates multiple physical disks into a single virtual storage pool. By using this technology, performance and availability can be improved, and adding or removing disks becomes easy.
To use ASM, an ASM instance must be started separately from the database instance. The ASM instance manages metadata for disk groups (such as disks, file names, and the locations of data extents) and provides extent maps—which indicate where data is stored—to the SGA of the database instance.
The virtual storage pools are called ASM disk groups. The diagram below illustrates the relationship between physical and logical disks at each layer.

Performance Improvement

Applying Oracle ASM with striping allows storage and disks to be used in parallel, improving disk I/O performance. In recent years, as CPU performance has increased, system bottlenecks are increasingly occurring at storage disk I/O, making the active use of this technology highly recommended.

Note: Striping with ASM differs from striping using storage RAID 0. ASM striping distributes data evenly at the level of ASM files (data files), whereas RAID 0 cannot recognize ASM files and distribute them accordingly. As a result, using only RAID 0 may cause read/write imbalances (hot spots).

Availability Improvement

Using Oracle ASM for mirroring allows data to be stored redundantly in two or three copies, enhancing availability. Data is mirrored across different disks in units called “failure groups,” so even if a disk fails, the data files remain accessible. Additionally, mirroring can be enabled or disabled at the disk group level.

Adding and Removing Disks

With Oracle ASM, rebalancing (data redistribution) can be performed when disks are added or removed. This feature allows optimization of data placement after failures or expansion of storage volumes without stopping the service.

Conclusion

Thank you for reading this far. I hope you now have a better understanding of how Oracle RAC works. I also have other articles on Oracle-related topics, so please feel free to check them out.

Complete Guide to Reading and Analyzing Oracle AWR Reports | Essential for Performance Tuning & Troubleshooting – From Skills to Fun: Make Work Your Hobby !!

コメント