Oracle RAC load balancing test (combined with server and client)

Source: Internet
Author: User

Oracle RAC Load Balancing allows connections initiated from clients to be effectively allocated to instances with low listener load. There are two methods to achieve load balancing on the client. One is to configure the load_balance of the client, and the other is to configure the remote_listener parameter on the server. The two methods have their own advantages and disadvantages, and they are not mutually exclusive. Therefore, the two methods can be combined to achieve load balancing more effectively. This article describes the use of the two (oralce 10g RAC ).

For separate tests on Server Load balancer between clients, see:
Load Balance)
Oracle RAC server connection Load Balance)

The tests in this article combine the scripts and samples used in the previous article, which is a summary of the previous two tests.

 

I. Configuration Requirements

1. The listeners on each node on the server provide services normally. If you use non-default port 1521, refer to the non-default port listening configuration in Oracle RAC (listener. ora tnsnames. ora) Oracle @ bo2dbp: ~> More $ ORACLE_HOME/Network/admin/listener. ora # listener. ora. bo2dbp network configuration file:/u01/Oracle/DB/Network/admin/listener. ora. bo2dbp # generated by Oracle configuration tools. listener_bo2dbp = (description_list = (description = (address = (Protocol = TCP) (host = bo2dbp-vip.2gotrade.com) (Port = 1521) (IP = first) (address = (Protocol = TCP) (host = 192.168.7.51) (Port = 1521) (IP = first ))) Sid_list_listener_bo2dbp = (sid_list = (sid_desc = (sid_name = plsextproc) (ORACLE_HOME =/u01/Oracle/DB) (program = EXTPROC) Oracle @ bo2dbp: ~> LSNRCTL Status Service "gobo4" has 2 instance (s ). instance "gobo4a", status ready, has 2 handler (s) for this service... instance "gobo4b", status ready, has 1 handler (s) for this service... 2. The remote_listener parameter on the server requires that the connection identifier of the remote_listener parameter be tnsnames on the server. ora has corresponding SQL> show parameter listener name type value ---------------------------------------- -------------------------------------- local_l Istener string remote_listener string remote_lsnr_gobo4 Oracle @ bo2dbp: ~> More $ ORACLE_HOME/Network/admin/tnsnames. ora # tnsnames. ora network configuration file:/u01/Oracle/DB/Network/admin/tnsnames. ora # generated by Oracle configuration tools. remote_lsnr_gobo4 = (address_list = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521) 3. Client tnsnames. enable load_balance Oracle @ szdb in ora: ~> Tail-11 $ ORACLE_HOME/Network/admin/tnsnames. ora gobo4 = (description = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521) (load_balance = yes) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = gobo4 )))

Ii. Test Load Balance

# Still use the previous steps to test # Author: Robinson # blog: http://blog.csdn.net/robinson_0612oracle@SZDB:~> More load_balance.sh #! /Bin/bashfor I in {1 .. 1000} doecho $ ISQLPLUS-S system/Oracle @ gobo4 <eofselect instance_name from V \ $ instance; eofsleep 1 doneexit 0oracle @ szdb: ~> ./Load_balance.sh> load_bal.log # view the log Oracle @ szdb: ~> Grep gobo4a load_bal.log | WC-l750oracle @ szdb: ~> Grep gobo4b load_bal.log | WC-l250 # view listener log Oracle @ bo2dbp:/u01/Oracle/DB/Network/log> grep establish listener_bo2dbp.log | WC-l894oracle @ bo2dbp: /u01/Oracle/DB/Network/log> grep instance_name = gobo4 listener_bo2dbp.log | WC-l415 # The Node bo2dbp received a total of 894 connection requests, 415 of connection requests are forwarded by bo2dbs # therefore, in fact, the actual number of connection requests sent from the client to bo2dbp is 894-415 = 479 # The following figure shows the listening log Oracle @ bo2dbs on the node bo2dbs: /u01/Oracle/DB/Network/log> grep establish L Istener_bo2dbs.log | WC-l665oracle @ bo2dbs:/u01/Oracle/DB/Network/log> grep instance_name = gobo4 listener_bo2dbs.log | WC-L 144 # As shown in the preceding query, node bo2dbs received a total of 665 connection requests, and 144 connection requests were forwarded by bo2dbp # therefore, in fact, the actual number of connection requests sent from the client to bo2dbs is 655-144 = 511 # As shown in the preceding results, # The number of client-based connection requests is 479 for the node bo2dbp, node bo2dbs is 511 # The number of listeners routed to the local instance is, node bo2dbp, 479-144 = 335, node bo2dbs, 511-415 = 96 # The local instance data of the remote listener route is 415, And the node bo2dpb is, node bo2dbs is 144 # listener routing concept refers to server-side load balancing # That is, server-side listener Root The current connection request is forwarded locally or remotely according to the load of the listener and the remote listener. This is the route.

Iii. More references

For more information about the basics and concepts of Oracle network configuration, see:
Configure the Oracle client to connect to the database
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Oracle RAC Listener Configuration
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)

Load Balance)

Configure RAC load balancing and Failover

For more information about user-managed backup and recovery, see

Oracle cold backup

Oracle Hot Backup

Concept of Oracle backup recovery

Oracle instance recovery

Oracle recovery based on user management

System tablespace management and Backup Recovery

Sysaux tablespace management and recovery

Oracle backup control file recovery (unsing backup controlfile)

 

For information on RMAN backup recovery and management, see

RMAN overview and architecture

RMAN configuration, Monitoring and Management

Detailed description of RMAN backup

RMAN restoration and recovery

Create and use RMAN catalog

Create RMAN storage script based on catalog

Catalog-based RMAN backup and recovery

RMAN backup path confusion

 

For the Oracle architecture, see

Oracle tablespace and data files

Oracle Password File

Oracle parameter file

Oracle online redo log file)

Oracle Control File)

Oracle archiving logs

Oracle rollback and undo)

Oracle database instance startup and Shutdown Process

Automated Management of Oracle 10g SGA

Oracle instances and Oracle databases (Oracle Architecture)

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.