Business segmentation of RAC Architecture

Source: Internet
Author: User

Business segmentation of RAC Architecture

As we have discussed earlier, RAC is actually an instance-level redundant architecture. Applications can connect to an instance randomly or randomly as needed for business operations.

As far as I know, most RAC architectures are designed in this way. The advantage of doing so is to achieve instance redundancy, even if an instance is down, does not affect normal business operations.

However, as we mentioned earlier, when data blocks are distributed to the memory of different instances, data block replication may occur between instances. This involves a series of memory management mechanisms, oracle is called cache fusion. The cost of Inter-memory data block transfer is also relatively high, and may even have a long wait.

For this reason, in some systems, in order to make efficient use of the RAC architecture, you can use a technology to allocate some or more types of services to one or more instances, other services are allocated to other instances.

The purpose of this operation is to centralize similar businesses, so that data blocks are concentrated in a small memory as much as possible to avoid waiting events caused by cache fusion.

For example, in the following example, this is an OLAP system with a RAC consisting of four instances (distributed on four servers). This database has two main functions, that is, data loading and data query.

Since these two services are almost non-overlapping, we consider assigning them to different instances for running.

In the RAC architecture, business segmentation is represented as 11-3.

 

Let the data loading service use instance 1 and instance 2, and let the data query service use instance 3 and instance 4, thus achieving the purpose of business segmentation.

The following is a demonstration of the implementation of this technology.

SQL> select instance_name from GV $ instance orderby 1;

 

Instance_name

----------------

Rac11

Rac12

Rac13

Rac14

 

As you can see, the current RAC is composed of four instances, whose names are rac11, rac12, rac13, and rac14.

We can use the service to achieve the purpose of business segmentation. We create two services, rac_load and rac_query. Each Service is allocated with two instances. rac_load is allocated with rac11 and rac12, and rac_query is allocated with rac13 and rac14.

You can use the following method to create these two services.

This is the initial CRS status:

[Oracle @ node1 ~] $ Crs_stat-t

Name type target State host

------------------------------------------------------------

Ora. db601.db application online node3

Ora... 11. Inst application online node1

Ora... 12. Inst application online node2

Ora... 13. Inst application online node3

Ora... 14. Inst application online node4

Ora... sm1.asm application online node1

Ora... e1.lsnrapplication online node1

Ora. node1.gsd application online node1

Ora. node1.ons application online node1

Ora. node1.vip application online node1

Ora... sm2.asm application online node2

Ora... e2.lsnrapplication online node2

Ora. node2.gsd application online node2

Ora. node2.ons application online node2

Ora. node2.vip application online node2

Ora... sm3.asm application online node3

Ora... e3.lsnrapplication online node3

Ora. node3.gsd application online node3

Ora. node3.ons application online node3

Ora. node3.vip application online node3

Ora... sm4.asm application online node4

Ora... e4.lsnrapplication online node4

Ora. node4.gsd application online node4

Ora. node4.ons application online node4

Ora. node4.vip application online node4

 

Manually add two services, rac_load and rac_query:

[Oracle @ node1 ~] $ Srvctladd service-D Rac-s rac_load-r "rac11, rac12"

[Oracle @ node1 ~] $ Srvctladd service-D Rac-s rac_query-r "rac13, rac14"

 

The-R parameter indicates the instance with priority.

When creating a service, you can specify the instance to be used first and the instance to be used.

The service first uses the priority instance. When the priority instance is unavailable, the available instance is used.

This is because the service is only divided into instances, and priority is not required in the same group of instances. Therefore, the instances used by each service are set as priority, then the client will randomly connect to services on any instance.

 

[Oracle @ node1 ~] $ Crs_stat-t

Name type target State host

------------------------------------------------------

Ora. db601.db application online node3

Ora... 11. Inst application online node1

Ora... 12. Inst application online node2

Ora... 13. Inst application online node3

Ora... 14. Inst application online node4

Ora... load. CS application offline

Ora... 011.srv application offline

Ora... 012.srv application offline

Ora... uery. CS application offline

Ora... 013.srv application offline

Ora... 014.srv application offline

Ora... sm1.asm application online node1

Ora... e1.lsnr application online node1

Ora. node1.gsd application online node1

Ora. node1.ons application online node1

Ora. node1.vip application online node1

Ora... sm2.asm application online node2

Ora... e2.lsnr application online node2

Ora. node2.gsd application online node2

Ora. node2.ons application online node2

Ora. node2.vip application online node2

Ora... sm3.asm application online node3

Ora... e3.lsnr application online node3

Ora. node3.gsd application online node3

Ora. node3.ons application online node3

Ora. node3.vip application online node3

Ora... sm4.asm application online node4

Ora... e4.lsnr application online node4

Ora. node4.gsd application online node4

Ora. node4.ons application online node4

Ora. node4.vip application online node4

 

We can see that a group of names has been added to the CRS resource, but their statuses are offline.

You can use crs_stat without parameters to make it clearer.

 

This article is excerpted from the book "Making Oracle run faster 2-database design and optimization based on massive data.

Book details: http://blog.csdn.net/broadview2006/article/details/6650914

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.