Oracle 11g resident Connection Pool

Source: Internet
Author: User
Tags connection pooling oracle database

Oracle introduced the database Resident connection pooling (DRCP) in 11g. Prior to this, we can use dedicated or share to link the database, dedicated way is the Oracle database default link way, not too much configuration, and about dedicated bug is very few, therefore, usually, It is recommended that you use the dedicated method to link the database. However, the dedicated approach is powerless when server resources are limited, and the number of users connecting to the database is very large. Assuming that the concurrent user is 5000, each dedicated process needs to contain 4m of memory, and each sessioin consumes 400k of memory, then we need 21.43g of memory altogether. At this point we can connect the database in a share way, assuming that the number of shared services processes is 100, a total of 2.29g of memory is required, where 2g of memory is allocated from the SGA. But shared connections are not the way we want to connect, because there are too many bugs and some configuration work is needed to use shared methods.

In today's web-infested, database technology is facing unprecedented challenges. People who are familiar with web technology know that the web is a stateless technology. The user requests the webpage, the server processing uses the request, the connection database obtains the data and carries on the processing, disconnects the database connection, displays the webpage to the user, this is the general webpage processing flow, it has the database connection time short, the frequent connection database, the concurrent quantity big characteristic. At this point, the connection pool technology is introduced, but most of these technologies are implemented at the client level or at the middleware level, with the following drawbacks.

1. The connection pool is a single individual node, if multiple nodes need to use a common database connection, often need to configure each node alone, which will undoubtedly waste database resources

2. Most of the connection pool using a pre-configured way to connect to the database, so in the case of low user pressure, the same will continue to maintain the database connection, and thereby wasting the database resources

In addition, in some multiple processes, single-threaded environments (such as PHP), the use of connection pooling technology is basically impossible.

The introduction of DRCP can effectively solve these problems, DRCP the session and server processes bundled together for caching (pool server), when the user requests to connect to the database, the first connection to the connection broker process, The broker process selects pool server from the connection pool and assigns it to the requesting user based on the connection information, after which the user communicates directly with pool server, and broker no longer participates until the user disconnects and returns the pool server to the connection pool.

Also assume that the number of concurrent users is 5000,pool server for 100,DRCP memory x (KB + 4 MB) + (5000 X 35KB) = 609.9 MB, where (5000*35k) is the broker memory, as shown in figure:

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.