What is Oracle Real Application Clusters or RAC?
Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide highly scalable and available database solutions for business applications.
Evolution of RAC?
The evolution of RAC can be tracked back from Oracle 7, where it was called Oracle Parallel Server (OPS). But it was in Oracle 9i that RAC was introduced. It was not merely a name change from Oracle 7 to Oracle 9i. Oracle has changed almost everything. RAC supports even direct sharing of Oracle database blocks between two or more database instances. This sharing is the major change that can be tracked from OPS. In OPS blocks where not directly shared leaving one instance notifies another instance of a required database block and wait till the other instance hand overs the same after it has been written its content to the disk. This wait is totally absent in the new RAC design.
What is OPS and its architecture?
Oracle has had the functionality to handle parallel servers since Version 7 with the help of OPS. OPS is a technique whereby multiple Oracle database instances share a single set of database files. In the architecture of OPS only a single instance was allowed to modify a block at any given point of time. An instance in order to write to a block uses a technique called block pinging.
Each OPS instance creates locks in their own distributed lock area to manage consistency between multiple instances, which are called Parallel Cache Management (PCM) locks.
The responsibility of a PCM lock is to ensure that the instance reading a block gets a consistent image of the data in the block. An instance must acquire a PCM lock on a block before reading/modifying data in the block. When a block is requesting for a block and that block is currently being locked by another instance, then the holding instance must write the block back to disk before the requesting instance can read or edit the block. This way consistency is maintained.
Thus OPS would allow multiple Oracle instances to use same database, which will allow scalability to expand by simple addition of a server. Performance issues can be solved easily with this kind of architecture. But the performance of OPS was not up to the mark. It even required application level changes, functional data partitioning to prove it works.
What does RAC offer other than OPS?
With the advent of high speed interconnectivity Oracle now uses memory to memory transfer of data blocks at high speed (thanks to technology) which completely rubs out the use of disk as a transfer mechanism.
The major benefits of RAC are many, like Scalability, High availability, Transparency. Scalability is achieved through introduction of multiple RAC nodes to increase performance. High availability is meant by the process of one node talking over the load of other when it fails. By Transparency, Oracle server provides full transparency to underlying mechanisms from applications.