IBMDB2pureScale cluster database application configuration

Source: Internet
Author: User
Tags db2 client
Part 1 of this article summarizes the architecture and technology of DB2pureScale. When thinking about the advantages of a cluster database and a variety of reliable components that DB2 luw integrates into the pureScale feature, it is easy to remember this technology from a conceptual perspective (for more information, see section 1st ). However, what is really challenging is to develop the best way to motivate

Part 1 of this article outlines the DB2 pureScale architecture and technology. It is easy to remember this technology from a conceptual point of view (for details, for more information, see section 1st ). However, what is really challenging is to develop the best way to motivate

It is easy to remember this technology from a conceptual perspective when thinking about the advantages of a variety of reliable components that clusters and DB2 LUW integrate into the pureScale feature (for more information, see section 1st ). However, what is really challenging is to develop the best way to enable the pureScale feature to serve your enterprise's applications. To provide insights into this challenge, we use two different methods to connect to a pureScale cluster: Server Load balancer and client affinities ).

DB2 pureScale Load Balancing

Connect the client to the DB2 pureScale cluster to achieve load balancing. After WLB is enabled, the cluster members save the priority list. Members communicate with each other regularly, ask for the system load of other members, and refresh their respective lists.

Assign permissions to each member in each list. The server list designs a connection for each member and returns it to the DB2 client. Evaluate the priority and route the work to the highest priority, so that each member in the cluster is near equal.

Since only one database directory or connection object is required to connect to the DB2 pureScale cluster, you can add or delete members to or from the pureScale system as needed without making any changes to the database directory or application code. You can use only one command to add or delete members or other cache devices in a group. The ability to easily manage capacity not only applies to growing business applications, but also supports enterprises to survive the processing peak. Enterprises can deal with business activities during off-peak hours without the need for "super-large" systems.

WLB can effectively handle OLTP workloads, complete transactions in a short time, and easily move between members. When the client application needs to persistently store values outside the transaction scope, for example, when using a sequence or declaring a cursor through with hold, or when you use the preserve rows attribute to create temporary tables and define them, the database server limits the client to use WLB.

It is very easy to enable WLB. You only need to set a required attribute. For example, if you are using a Java-based connection, you only need to set the enableSysplexWLB connection attribute to "true ". For non-Java applications, you can also use the enableWLB parameter in the db2dsdriver. cfg file to configure WLB.

After the WLB connection is defined, automatic client re-routing (ACR) is activated by default ). After ACR is activated, if the Members are offline (whether intentionally or unintentionally), the system automatically routes the requests to the remaining online cluster members. When the members are online again, the connections and transactions of the previously unavailable members are also restored.

The pureScale WLB component helps eliminate potential bottlenecks by allocating transactions to members with the maximum number of available resources for processing with new requests evaluated. This helps ensure fair use of all system resources.

This example shows how to enable WLB by setting the enableSysplexWLB JDBC attribute in the URL and setting the attribute file through the application code. This URL connects to the database SAMPLE on the DB2 pureScale member 172.16.42.102 through port 60200.

Jdbc: db2: // 172.16.42.102: 60200/SAMPLE: enableSysplexWLB = true;

The following example shows how to use the property file to set the enableSysplexWLB attribute in the application code:

String url = jdbc: db2: // 172.16.42.102: 60200/SAMPLE; Properties properties = new Properties (); properties. put ("user", "yourID"); properties. put ("password", "yourPassword"); properties. put ("enableSysplexWLB", "true ");
Connection con = DriverManager. getConnection (url, properties );

Client affinity

The second method for connecting to a pureScale cluster is called client affinity connection. This method can be considered when multiple applications are run on the integrated database resources or a cluster.

When connecting based on client affinity, You need to specify each application as a single member in the pureScale cluster. All connections and requests of an application are processed by the specified member. Other members in the pureScale cluster can be used during planned or unplanned interruptions.

However, WLB can work effectively with OLTP applications, and client affinity connections can be effectively processed in batches, which is conducive to saving the memory heap of dedicated members. Like WLB, client affinity connections are configured through the JDBC attribute or in the db2dsdriver. cfg file.

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.