Sie sind auf Seite 1von 18

Abstract

A computer cluster is a group of loosely coupled computers that work together closely so that in many respects it can be viewed as though it were a single computer. Clusters are commonly connected through fast local area networks. Clustering allows us to run an application on several parallel servers. The load is distributed across different servers, and even if any of the servers fails, the application is still accessible via other cluster nodes. The main features clustering are high availability, scalability and load balancing. Microsoft, Oracle, Sun Microsystems, and other leading hardware and software companies offer database clustering packages that are said to offer scalability as well as availability. Oracle Real Application Clusters (RAC) provides unbeatable fault tolerance, performance, and scalability with no application changes necessary. 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 a highly scalable and available database solution for all business applications. By providing protection from hardware and software failures, Oracle Real Application Clusters provides systems availability ensuring continuous data access.

Oracle Real Application Clusters

Contents
1.

Introduction

3 4 4 5 6 7 8 8 9 10 10 11 11 12 12 13 14 14 14 15 15 17 18

2. Oracle Architecture 2.1 Oracle database structure 2.2 Oracle memory structure 2.3 Oracle background processes 2.4 Oracle processes 3. Real Application Clusters Architecture 3.1 Hardware Architecture 3.2 Oracle Clusterware 3.3 File Systems and Volume Management 3.4 Virtual Internet Protocol Address (VIP) 4. Features of Oracle Real Application Clusters: 4.1 Load Balancing 4.2 Failover 4.3 Cache Fusion 5. Managing Oracle Real Application Clusters Database 6. Oracle RAC Advantages and Disadvantages 6.1 Advantages 6.1.1 High Availability 6.1.2. Scalability 6.2 Oracle RAC Disadvantages 7. Conclusion 8. Bibliography

Oracle Real Application Clusters

1. Introduction
Computing is an evolutionary process. Five generations of development history with each generation improving on the previous ones technology, architecture, software, applications, and representative systems make that clear. As part of this evolution, computing requirements driven by applications have always outpaced the available technology. So, system designers have always needed to seek faster, more cost effective computer systems. Parallel and distributed computing provides the best solution, by offering computing power that greatly exceeds the technological limitations of single processor systems. Unfortunately, although the parallel and distributed computing concept has been with us for over three decades, the high cost of multiprocessor systems has blocked commercial success so far. Today, a wide range of applications are hungry for higher computing power, and even though single processor PCs and workstations now can provide extremely fast processing; the even faster execution that multiple processors can achieve by working concurrently is still needed. Now, finally, costs are falling as well. Networked clusters of commodity PCs and workstations using off-the-shelf processors and communication platforms are becoming increasingly cost effective and popular. This concept, known as cluster computing, will surely continue to flourish. Cluster computing has emerged as a result of the convergence of several trends, including the availability of inexpensive high performance microprocessors and high speed networks, the development of standard software tools for high performance distributed computing, and the increasing need of computing power for computational science and commercial applications. Microsoft, Oracle, Sun Microsystems, and other leading hardware and software companies offer database clustering packages that are said to offer scalability as well as availability. Oracle Real Application Clusters (RAC) allows Oracle Database to run any packaged or custom application, unchanged across a set of clustered servers. This provides the highest levels of availability and the most flexible scalability. If a clustered server fails, Oracle continues running on the remaining servers. And when you need more processing power, simply add another server without taking users

Oracle Real Application Clusters

offline.

To keep costs low, even the highest-end systems can be built out of Oracle Real Application Clusters is an option of Oracle Database that was first

Standardized, commodity parts. introduced with Oracle 9i. application. Oracle Real Application Clusters is now proven

technology used by thousands of customers in every industry in every type of Oracle RAC provides options for scaling applications beyond the capabilities of a single server. This allows customers to take advantage of lower cost commodity hardware to reduce their total cost of ownership and provide a scaleable computing environment that supports their application workload.

2. Oracle Architecture
There are two components in Oracle Architecture. a) Oracle Instance: The processes and memory structures running on a server to allow access to the data. It will be residing in Memory. b) Oracle database: The physical structures residing on storage which actually hold the data, commonly known as datafiles.

2.1 Oracle database structure


The Oracle database is basically categorized as follows: a) Physical layer b) Logical layer The physical layer comprises the following files:

The control file: It is the most crucial and critical file. The criticality of this file is ascribed to the fact that if it is damaged then the database recovery operation becomes tedious. It contains the requisite information to start the database.

Data files: These hold data that is stored in tables of a database. They are usually the largest files in the database, ranging in size from MB, GB, to TB. Redo Log files: These files contain information that helps in recovery in the event of system failure. It contains information stored in the Redo Log Buffer.

Oracle Real Application Clusters

The information in the Redo Log Buffer is written into Redo Log files by the LGWR background process. The Redo Log files are generally multiplexed and copied for recovery purposes. Sets of redo Log files are known as Redo Log groups. Each database has minimum of two Redo Log groups. Redo Log groups are used in a circular fashion. The logical layer comprises one or more tablespaces and the database schema. The database schema consists of tables, clusters, indexes, views, procedures, triggers, sequences, and so on. The database schema is a collection of schema objects. The hierarchy of Oracle disk-space management is as follows: a) Tablespaces: These are at the highest level of Oracle disk-space management. b) Segments. c) Extents. d) Data blocks: These are at the lowest level of Oracle disk-space management.

2.2 Oracle memory structure


The most basic components of Oracle memory are: a) SGA- It stands for System Global Area. SGA is allocated whenever an Oracle instance starts and gets de-allocated when the Oracle instance is shutdown. Components of SGA: The Database Buffer Cache: Caches the data that has been most recently accessed by database users. (it consists of a number of buffer blocks of same size.) The Redo Log Buffer: Stores transaction information for recovery purposes. The Shared Pool: Caches the most recently used SQL statements that have been issued by database users. b) PGA- It stands for Program Global Area. It is a region in memory that contains data and control information for a single process. This can be either a

Oracle Real Application Clusters

server or a background process. A PGA is allocated whenever an Oracle database user connects to a database and a session is created for him/her.

Oracle Architecture

2.3 Oracle background processes


The background processes are: a) DBWR It writes data blocks from SGA to data files. b) LGWR It writes data from the Log Buffer to the redo log. c) CKPT It timestamps all the data files and the control files whenever a checkpoint occurs.

Oracle Real Application Clusters

d) PMON It stands for process monitor. It keeps track of database processes. It also cleans up the process that has died pre-maturely. The result is that all the cache and the resources are freed up. It also restarts those dispatcher processes that might have failed. e) Some of the main functions of background processes are: Communication among Oracle instances. Performing computer maintenance. Writing the dirty blocks to disk.

f) SMON It stands for system monitor. It performs instance recovery at instance startup.

2.4 Oracle processes


At the user level, two processes allow a user to interact with the instance and, ultimately, with the database: a) User Process b) Server Process. Whenever a user runs an application, such as a human resources or order-taking application, Oracle starts a User Process to support the users connection to the instance. The User Process initiates a connection to the instance. Oracle calls the process of initiating and maintaining communication between the User Process and the instance a connection. Once the connection is made, the user establishes a session in the instance. After establishing a session, each user then starts a Server Process on the host server itself. It is this Server Process that is responsible for performing the tasks that actually allow the user to interact with the database. it fetches the data from the data file to the database buffer cache and the data is fetched at block level. In addition to the User and Server processes that are associated with each user connection, an additional memory structure called the Program Global Area (PGA) is also created for each user. The PGA stores user-specific session information such as bind variables and session variables. Every Server Process on the server has a PGA memory area. Whenever a user executes a query, Oracle checks whether the query is correct

Oracle Real Application Clusters

syntactically and semantically. Then it checks if the user has the privilege to access that particular database. After this the data will be fetched from the disk blocks to buffer blocks. When the user try to modify the data, all the modifications will be applied to it at buffer cache and written back to disk files if the user commits the transaction.

3. Real Application Clusters Architecture


A RAC database is a clustered database. A cluster is a group of independent servers that cooperate as a single system. Clusters provide improved fault resilience and modular incremental system growth over single symmetric multi-processor (SMP) systems. In the event of a system failure, clustering ensures high availability to users. Access to mission critical data is not lost. Redundant hardware components, such as additional nodes, interconnect, and disks, allow the cluster to provide high availability. With Real Application Clusters, we de-couple the Oracle Instance, the processes and memory structures running on a server to allow access to the data, from the Oracle database, the physical structures residing on storage which actually hold the data, commonly known as data files. A clustered database is a single database that can be accessed by multiple instances. Each instance runs on a separate server in the cluster. When additional resources are required, additional nodes and instances can be easily added to the cluster with no downtime. Once the new instance is started, applications using services can immediately take advantage of it with no changes to the application or application server.

3.1 Hardware Architecture


Oracle Real Application Clusters is a shared everything architecture. All servers in the cluster must share all storage used for a RAC database. The type of disk storage used can be network attached storage (NAS), storage area network (SAN). The storage choice is dictated by the server hardware choice and what hardware vendor supports. The key to choosing your storage is choosing a storage system that will provide scalable I/O for your application, an I/O system that will scale as

Oracle Real Application Clusters

additional servers are added to the cluster. A cluster requires an additional network to the Local Area Network (LAN) that a database server is attached to for application connections. A cluster requires a second private network commonly known as interconnect. Interconnect is used by the cluster for inter-node messaging. Interconnect is also used by RAC to implement the cache fusion technology.

Real Application Cluster Architecture

The cluster is made up of 1 to many servers each having a LAN connection, an interconnect connection, and must be connected to the shared storage. With Oracle Database 10g Release 2, Oracle Clusterware and Real Application Clusters support up to 100 nodes in the cluster. Each server in the cluster does not have to be exactly the same but it must run the same operating system, and the same version of Oracle. All servers must support the same architecture E.G. all 32bit or all 64bit.

Oracle Real Application Clusters

3.2 Oracle Clusterware


Starting with Oracle Database 10g, Oracle provides Oracle Clusterware, a portable Clusterware solution that is integrated and designed specifically for Oracle Database. Oracle Clusterware is integrated with the Oracle Universal Installer. The clusterware utility must be installed in one of the nodes of the cluster so that it will automatically be installed in other nodes. Oracle Clusterware monitors and manages Real Application Cluster databases. When a node in the cluster is started, all instances, listeners and services are automatically started. If an instance fails, the clusterware will automatically restart the instance so the service is often restored before the administrator notices it was down. When registering the process with Oracle Clusterware, information is provided on how to start, stop, and monitor the process. You can also specify if the process should be relocated to another node in the cluster when the node it is executing on fail.

3.3 File Systems and Volume Management

Since RAC is a shared everything architecture, the volume management and file system used must be cluster-aware. Oracle recommends the use of Automatic Storage Management (ASM), which is a feature, included with Oracle Database 10g to automate the management of storage for the database. ASM eliminates the need for the DBA to directly manage the thousands of Oracle database files that could be present in a modern Oracle instance. ASM distributes I/O load across al available resource to optimize performance while removing the need for manual I/O tuning. Alternatively Oracle supports the use of raw devices and some cluster file systems such as Oracle Cluster File System (OCFS) which available on Windows, Linux and Solaris. OCFS supports high input/output.

Oracle Real Application Clusters

10

3.4 Virtual Internet Protocol Address (VIP)


Oracle Real Application Clusters 10g requires a virtual IP address for each server in the cluster. The virtual IP address is an unused IP address on the same subnet as the Local Area Network (LAN). This address is used by applications to connect to the RAC database. If a node fails, the Virtual IP is failed over to another node in the cluster to provide an immediate node down response to connection requests. This increases the availability for applications as they no longer have to wait for network timeouts before the connection request fails over to another instance in the cluster.

4. Features of Oracle Real Application Clusters:


4.1 Load Balancing
Oracle Net Services provides connection load balancing for database connections. Client side load balancing which balances connection requests across all listeners for the cluster is achieved by listing all servers in the cluster in the address list of the client connection string. It will randomly select one of the servers. If the server chosen is not available, the next server in the list is tried. If the same application is loaded on all of the nodes in the cluster, users can be distributed across all of the nodes. In either a round-robin fashion or through distribution. In either case, any user connecting through any node with sees the same data. Server side load balancing is achieved at the listener. Each listener is aware of all instances in the cluster providing each service. Based on goal defined for the service, the listener chooses the instance that will best meet the goal and the connection is made to that instance. The listener is a process that resides on the cluster server nodes. This process listens for incoming client connection requests and manages the traffic to the server. The listener brokers the client request, handing off the request to the server. Every time a client (or server acting as a client) requests a network session with a server, a listener receives the actual request then the listener grants a connection to the server Oracle Real Application Clusters 11

with least load.

4.2 Failover
Oracle RAC can also be used for failover. Since any 2 nodes will be configured exactly the same and have access to the same set of data, if one server in the cluster goes down, the users can be transferred to another node in the cluster and the replacement node(s) will take over the duties of the failed server. Oracle RAC systems provide two methods of failover to provide reliable access to data. If a connection failure occurs at connect time, the application can fail over the connection to another active node in the cluster. Connection failover ensures that an open route to data is always available, even when server downtime occurs. Enabling connection failover allows the client to connect to another node if a connection attempt on one node fails. When an application requests a connection to an Oracle database server, a connection request will be sent to a listener process, which forwards the request to the appropriate Oracle database instance. In an Oracle RAC system, each active Oracle database instance in the RAC system registers with each listener configured for the Oracle RAC. RAC checks to detect node and network failures. A disk-based heartbeat mechanism uses the control file to monitor node membership and the cluster interconnect is regularly checked to determine correct operation. If a communication link failure occurs after a connection is established, the connection fails over to another active node. Any disrupted transactions are rolled back, and session properties and server-side program variables are lost. In some cases, if the statement executing at the time of the failover is a Select statement, that statement may be automatically re-executed on the new connection with the cursor positioned on the row on which it was positioned prior to the failover. This is called Transparent Application Failover (TAF) because it masks failures to the users and they do not need to log back in to the system.

4.3 Cache Fusion


The concept of Cache Fusion allows Oracle instances in the cluster to send data back and forth to other instance without having to write the data to a disk fist. This helps maintain cluster-wide concurrency or resources and ensures the integrity of Oracle Real Application Clusters 12

shared data. Disk pinging, where the data had to be written on a disk first, was very slow and cumbersome and often slowed down application performance. All computers/instances in an RAC access the same database, the overall system must guarantee the coordination of data changes on different computers such that whenever a computer queries data it receives the current version even if another computer recently modified/updated that data. Oracle RAC refers to this functionality as Cache Fusion. Cache Fusion involves the ability of Oracle RAC to "fuse" the inmemory data cached physically separately on each computer into a single, global cache. The Primary aim of Cache Fusion is: a) Maintains cluster-wide concurrency of resources b) Ensures integrity of shared data There are four key steps that make the Cache Fusion architecture scalable. Utilizing the collective (fast) database caches of all the nodes in the system to satisfy application requests to any one node. It removes slow disk operations from the critical path of inter-node synchronization. It Reduces the required number of messages for inter-node synchronization Uses scalable inter-node data block transfers that greatly benefit from the above breakthroughs.

5. Managing Oracle Real Application Clusters Database


Oracle Real Application Clusters provides a single system image for easy configuration and management. The RAC database can be installed, configured, and managed from a single location. Enterprise Manager 10g Database Control is the GUI management tool provided by Oracle to manage your Oracle Database. Database Control is Enterprise automatically configured by the DBCA when a database is created.

Manager 10g Grid Control is the GUI Management tool provided by Oracle to Oracle Real Application Clusters 13

manage the enterprise. Grid Control is installed from a separate CD included in the Oracle. Both these tools are cluster-aware and provide a centralized console to manage cluster database. From the Cluster Database Page we can: View overall system status, e.g., the number of nodes in the cluster database and their current status. Monitor performance metrics aggregated across all instances or displayed side by side so that instances can be readily compared, with additional drilldown as needed. Perform cluster database-wide operations including the ability to initiate backup & recovery operations, start/stop instances, and so on. Manage services by performing operations such as create, modify, start/stop, enable/disable and relocate services as well as monitoring of service performance.

6. Oracle RAC Advantages and Disadvantages


6.1 Advantages
6.1.1 High Availability Oracle Real Application Clusters 10g provides the infrastructure for datacenter high availability. it is also an integral component of Oracles High Availability Architecture, which provides best practices to provide the highest availability data management solution. Oracle Real Application Clusters provides protection against the main characteristics of high availability solutions. Reliability Oracle Database is known for its reliability. Real Application Clusters takes this a step further by removing the database server as a single point of failure. If an instance fails, the remaining instances in the cluster are open and active. Recoverability Oracle Database includes many features that make it easy to recover from all types of failures. If an instance fails in a RAC database, it is recognized by another instance in the cluster and recovery automatically takes place. Fast Oracle Real Application Clusters 14

Application Notification, Fast Connection Failover and Transparent Application Failover make it easy for applications to mask component failures from the user. Error Detection Oracle Clusterware automatically monitors RAC databases and provides fast detection of problems in the environment. Also it automatically recovers from failures often before anyone has noticed a failure has occurred. Fast Application Notification provides the ability for applications to receive immediate notification of cluster component failures and mask the failure from the user by resubmitting the transaction to a surviving node in the cluster. 6.1.2 Scalability Oracle Real Application Clusters provides unique technology for scaling applications. Traditionally, when the database server ran out of capacity, it was replaced with a new larger server. expensive. capacity. As servers grow in capacity, they are more For databases using RAC, there are alternatives for increasing the Applications that have traditionally run on large SMP servers can be

migrated to run on clusters of small servers. Alternatively, you can maintain the investment in the current hardware and add a new server to the cluster (or to create a cluster) to increase the capacity. Adding servers to a cluster with Oracle Clusterware and RAC does not require an outage and as soon as the new instance is started, the application can take advantage of the extra capacity. All servers in the cluster must run the same operating system and same version of Oracle but they do not have to be exactly the same capacity. Customers today run clusters that fit their needs whether they are clusters of servers where each server is a 2 cpu commodity server to clusters where the servers have 32 or 64 cpus in each server.

6.2 Oracle RAC Disadvantages


The biggest disadvantage is that you are adding more complexity to your database architecture. With more complexity comes a higher cost in maintaining and administering the database along with a higher chance that something will go wrong, i.e. a bug can cause your problems. . Some applications require additional exception handling.

Oracle Real Application Clusters

15

Extensive testing required for configuration changes. DBA training necessary for success.

Oracle Real Application Clusters

16

7. Conclusion
Oracle Real Application Clusters has been designed for high availability and Scalability. By providing protection from hardware and software failures, Oracle Real Application Clusters provides systems availability ensuring continuous data access. Its scale out and scale up features offer a platform, which can grow in any direction allowing enterprises to grow their businesses. Existing applications as well as newly developed applications benefit from the transparency Oracle Real Application Clusters provides. Application development as well as administration and change management thus become much easier allowing reduction in total cost of ownership. Oracle Real Application Clusters is unique to the market with its offering and capabilities. RAC is used by thousands of customers worldwide in all industries in mission critical and many other application environments.

Oracle Real Application Clusters

17

8. Bibliography
http://www.oracle.com/technetwork/database/clustering/overview/index.html http://en.wikipedia.org/wiki/Oracle_RAC http://avdeo.com/2008/07/21/oracle-rac-10g-cache-fusion/ http://www.orabyte.com/oracle_rac.php http://www.springer.com/computer/communication+networks/journal/10586 http://www.ccgrid.org/

Oracle Real Application Clusters

18

Das könnte Ihnen auch gefallen