1. Oracle cluster architecture: OracleRAC, the full name is OracleRealApplicationCluster, which is a real application cluster. It is a parallel cluster system provided by oracle. The entire cluster system is composed of OracleClusterware.
1. Oracle cluster architecture: OracleRAC, the full name is OracleRealApplicationCluster, which is a real application cluster. It is a parallel cluster system provided by oracle. The entire cluster system is composed of OracleClusterware.
I. Oracle cluster architecture
Oracle RAC stands for Oracle Real Application Cluster, which is a Real Application Cluster. The virtual host is a parallel Cluster system provided by oracle. The entire Cluster system is composed of Oracle Clusterware (Cluster ready software) and Real Application Clusters (RAC.
The essence of oracle RAC is that Oracle instance nodes in different operating systems access the same Oracle database at the same time, and each node communicates through a private network to monitor the running status of each node, all data files, online log files, and control files of the oracle database are stored on shared storage devices in the cluster. The shared storage devices can be RAW, ASM, and OCFS2, all cluster nodes can read and write shared storage at the same time. The basic topology of Oracle RAC is as follows:
The topology structure shows that:
An Oracle Rac database consists of multiple server nodes. Each server node has its own operating system, ClusterWare, and oracle Rac database program, and each node has its own network listener. ClusterWare is a cluster software mainly used for cluster system management. The oracle Rac database program is used to provide oracle instance processes for clients to access the cluster system. The listening service is mainly used to monitor network port information, all services and programs access a shared storage through the operating system, and finally complete data read and write. There are many ways to implement shared storage. You can use Automatic Storage Management (ASM), Oracle Cluster File System (OCFS), Raw, and network region storage (NAS) to ensure the data consistency of the entire cluster system.
Starting from Oracle10g, Oracle provides its own Cluster software, namely, Oracle clusterware, which is implemented through CRS (that is, Cluster Ready Services). This software is a prerequisite for installing oracle rac, it is also the basis for stable operation of the RAC environment. In versions earlier than oracle10g, RAC must be installed with a third-party cluster software, and after oracle10g, oracle rac must be installed, you can use the cluster software that comes with oracle or a third-party cluster software that has been certified by RAC.
From the oracle operating mechanism, each server in the cluster is an oracle instance. Multiple oracle instances correspond to the same oracle database and form an oracle database cluster. See:
It can be seen that the database instances running on the two nodes access the same RAC database, and the local disks of the two nodes are only used to store the oracle installer and ClusterWare software, while on the shared storage, it stores oracle data files, control files, online log files, and archive log files. This is a data storage distribution method when oracle Rac is installed. In fact, RAC provides multiple data storage methods, which will be described separately below.
II. Introduction to the architecture and process of Oracle Clusterware
2.1 Introduction to Oracle Clusterware
Cluster Ready Services (CRS) is a Cluster software developed by oracle. Similar to other Cluster software, CRS mainly implements Cluster member management, heartbeat monitoring, failover, and other functions, CRS requires that the operating systems of each cluster node must be the same. In this way, the operating systems of multiple nodes are bound through CRS, and the client accesses the cluster just like accessing a server.
CRS consists of two Cluster suites: voting disk and Oracle Cluster Registry.
Voting disk is a voting disk. each node in the cluster regularly evaluates its health status and puts its status information on the voting disk. In addition, the nodes view the running status of each other and pass the information to other nodes to write them to the voting disk. When a cluster node fails, the voting disk can also be used for voting and arbitration. Therefore, the voting disk must be placed on the shared storage device. To ensure that each node can be accessed. A voting disk can be a raw disk partition or an independent file. Because it only records node running information, the disk size is generally about 10-20 mb.
Oracle Cluster Registry (OCR for short) is the Cluster registration service. OCR is used to record the configuration information of the Cluster and database in RAC. This information includes the list of cluster nodes, the ing between cluster database instances and nodes, and the CRS Application resource information.
CRS uses two heartbeat devices to verify the status of node members and ensure the integrity of the cluster. One is the voting disk. The cluster synchronization service process writes a heartbeat message to the voting disk every several seconds, the cluster verifies the node status by voting on the disk. If a node does not write information to the voting disk within the specified maximum period, the cluster determines that the node is invalid and implements failover. Another heartbeat is the heartbeat of private Ethernet networks between nodes. This heartbeat mechanism can be used to determine whether a network fault has occurred between nodes. The combination of the two heartbeat mechanisms effectively increases the cluster reliability.
In addition, CRS suggests that the private Ethernet heartbeat used for internal communication must be separated from the network used for communication between RAC nodes, that is, it cannot be in the same network, if the communication network between RAC nodes and the private Ethernet heartbeat are in the same network, you must ensure that the network cannot be accessed by nodes of non-cluster systems.
2.2 Introduction to the Oracle Clusterware Process
Oracle Clusterware uses Cluster Ready Services to complete Cluster functions. CRS contains a group of background processes that work together. The following describes several important background processes in CRS.
1 Cluster Synchronization Services
CSS for short is used to manage and coordinate the relationship between nodes in the cluster and for inter-node communication. When a node joins or leaves the cluster, css notifies the cluster. The background process of CSS in the cluster is CSSD, which is run and managed by oracle users. When a node fails, cssd automatically restarts the operating system.
2 Cluster Ready Services
CRS is the main program for managing high-availability operations in a cluster. CRS manages all resources in the cluster, including databases, services, instances, vip addresses, listeners, and application processes, the background process of CRS in the cluster is CRSD, which can start, stop, monitor, and fault tolerance cluster resources. In normal conditions, CRSD monitors various node resources, when a resource is abnormal, it is automatically restarted or switched.
3 Process Monitor Daemon
OPROCD for short, the process is locked in the memory, used to monitor the cluster and provide I/O protection (I/O fencing ). OPROCD runs on each node and regularly performs health check. If it still cannot communicate with a node within the desired interval, OPROCD resets the processor and restarts the node. An OPROCD failure will also cause Clusterware to restart the node.
4 Oracle Notification Service
The oracle announcement service (ONS) is used to publish and subscribe to Fast Application Notification events.
5 Event Management
EVM is a background process for event detection, which is run and managed by oracle users.
Iii. RAC database system institutions and processes
3.1 RAC Introduction