Detailed configuration of Oracle arc load Balancing

Source: Internet
Author: User
Tags cpu usage

The specific configuration of Oracle load Balancing is described in detail in this paper. Through the client and server side of the configuration, the text of the code is more comprehensive, worthy of reference.

For professional data-processing Oracle arcs, load-balancing settings are even more important. So how do you configure Oracle load Balancing? Let's take a look at this article to learn it. We'll explain it from the client and server side.

Oracle load Balancing mainly refers to how the new connection is connected to the RAC database, how to determine which node to connect to work, in the Oracle load balancing is divided into two types, one is based on the client connection, the other is based on the server side,

The client's Oracle load Balancing configuration is relatively simple, just add a load_balance=on option to Tnsnames.ora, such as TNS below:

RAC =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = RAC1-VIP) (PORT = 1521))

(address = (PROTOCOL = TCP) (HOST = RAC2-VIP) (PORT = 1521))

(load_balance = ON)

(FAILOVER = ON)

(Connect_data =

(SERVER = dedicated)

(service_name = RAC)

)

)

In this way, when the client connects to the RAC database, it randomly picks a listener address in TNS to connect, and before oracle10g, if a node is down or something like this happens, the client may choose to connect to the node, which will take a long time to wait for the TCP to timeout, and after 10g, As a result of the introduction of VIP and fan, such a situation can be greatly improved, the client's Oracle load balancing under normal circumstances can work better, but because the connection is randomly initiated at the client, so that the client does not know the number of RAC nodes load and connectivity, It is possible that a large load of nodes will continue to add new connections, causing the RAC nodes to not work evenly.

Starting with Oracle 10g, the server-side Oracle Load Balancing can determine the allocation of new client connections to the least load nodes based on the load and number of connections for each node in the RAC, and the Pmon process of each node in the RAC will load the respective nodes (including load, Maximum LOAD,CPU usage) and the number of connections updated into the Service_register, and then if the load of the node changes, will be notified to the listener, by the listener program to determine the new client connection to which node, if a node in the RAC failed to monitor, Pmon every minute to check if it's back to normal,

The server-side listener configuration adds an entry to each node's tnsnames.ora inside the nodes, and then sets the Remote_listeners parameter in the initialization parameter, such as:

Listeners_rac =

(Address_list =

(address = (PROTOCOL = TCP) (HOST = RAC1-VIP) (PORT = 1521))

(address = (PROTOCOL = TCP) (HOST = RAC2-VIP) (PORT = 1521))

)

ALTER SYSTEM SET remote_listener = Listeners_rac;

This enables the server-side Oracle load Balancing to be configured to complete.

At the same time, the Oracle MMNL process counts the service goodness, which is a measure of how an instance can provide resources for a service, and the larger the number, the greater the attractiveness and the ability to provide more connection services. The results of the statistics are stored in gv$servicemetric and gv$servicemetric_history.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

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.