Starting with Oracle Grid Infrastructure 12c Release 2, it is now possible to run read-only instances on Leaf nodes. Oracle Grid Infrastructure 12c introduced the concept of Oracle Flex cluster in which nodes can be classified as a Hub node or a Leaf node. In Oracle Grid Infrastructure12c Release 1, database instances could only be installed on Hub nodes and Leaf nodes were used to host applications. Starting with Oracle Grid Infrastructure 12c Release 2, it is now possible to run read-only instances on Leaf nodes.
Customers can configure their OLTP services to connect to the instances running on Hub nodes while DSS or read sessions can be directed to the instances running on Leaf nodes.
Oracle RAC Reader Nodes
Reader nodes are instances of an Oracle RAC database that run on Leaf Nodes in an Oracle Flex Cluster, a feature that was unavailable in previous Oracle Clusterware releases.
An advantage of using reader nodes is that these instances are not affected if you need to reconfigure a hub node. Parallel query jobs running on reader nodes are not subject to the brownout times that can occur when you reconfigure a hub node, and can continue to service clients that are connected to reader nodes, as long as the hub node to which it is connected is not evicted from the cluster. You can scale up to 64 reader nodes per hub node, and reader nodes can utilize massive parallel query to speed up operations on large data sets.
Database instances running on reader nodes have different characteristics than database instances running on Hub Nodes. Hub Node instances are similar to previous versions of Oracle RAC database instances, whereas instances running on reader nodes have the following notable differences:
- Database instances run in read-only mode.
- Database instances are unaffected if you reconfigure Hub Node Clusterware. Database instances running on reader nodes are not subject to the brownout times and can continue to service the clients connected to the reader nodes, as long as the Hub Node to which it is connected is not evicted from the cluster. Using reader nodes, you can scale up to 64 reader nodes per hub.
- Because database instances running on the reader nodes are read only, you will receive an error if you attempt any DDL or DML operations.
You can create services to direct queries to read-only instances running on reader nodes. These services can use parallel query to further speed up performance. Oracle recommends that you size the memory in these reader nodes as high as possible so that parallel queries can use the memory for best performance.
You can use Leaf Nodes to host RAC database instances that run on reader nodes in read-only mode. You can optimize these nodes for parallel query by provisioning nodes with a large amount of memory so that data is cached on the Leaf Node. In this architecture, updates to the read-write instances are immediately propagated to the read-only instances on the Leaf Nodes, where they can be used for online reporting or instantaneous queries.
Summary
- Reader nodes are instances of an Oracle RAC database that run on Leaf Nodes.
- Database instances on reader nodes should run in read-only mode.
alter system set instance_mode='read-only' family='rf_node'scope=spfile;
- These instances are not affected if you need to reconfigure a hub node.
- Parallel queries running on reader nodes are not subject to brownouts that can occur when a hub node is reconfigured.
Running RAC Instances on Leaf Nodes
To run Oracle RAC database instances on reader nodes:
1. Connect Leaf Nodes to storage, if not already connected. Running database instances on Leaf Nodes requires that they have direct storage access.
2. Install Oracle Database home on all required nodes, and at least one Hub Node. To run a database instance on a Leaf Node, you must install a database home like any other node.
3. Extend public network to Leaf Nodes with the srvctl modify network command:
# srvctl modify network -netnum 1 -extendtoleaf YES # srvctl start nodeapps
4. Create a policy-managed RAC database using DBCA. RAC Reader Nodes and Massive Parallel Query Oracle RAC require a policy-managed database. You cannot extend admin-managed databases to Leaf Nodes.
- For Massive Parallel Query RAC, create new server pools along with the database. Ensure that you create one Parallel Query server pool.
- For RAC Reader Nodes, create databases on Hub Nodes. The addition of database instances on Leaf nodes is dynamic and is managed from the command line.
5. Extend listeners to the Leaf Nodes using the srvctl modify listener command.
# srvctl modify listener -listener LISTENER -extendtoleaf yes
6. For Oracle RAC Reader Nodes, add a Reader Farm server pool to the system using the srvctl add service command.
$ srvctl add srvpool -serverpool RF1POOL -category LEAF $ srvctl add service -database rfdb -service RFWL -rfpool RF1POOL $ srvctl start service -database rfdb -service RFWL