Dynamic control method and device for double-database connection pool and related equipment

A dynamic control and database technology, applied in the computer field, can solve problems such as occupying system database resources, affecting user experience, and requesting a large number of connections

Pending Publication Date: 2019-05-24
PING AN TECH (SHENZHEN) CO LTD
View PDF0 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the maximum number of database connections set is small and the number of requested connections is large, it will seriously affect the user experience and cause users to wait for a long time
If the maximum number of database connections is set too large, the system database resources will be seriously occupied, resulting in unstable system operation.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic control method and device for double-database connection pool and related equipment
  • Dynamic control method and device for double-database connection pool and related equipment
  • Dynamic control method and device for double-database connection pool and related equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] figure 1 It is a dynamic control method for dual database connection pools provided by Embodiment 1 of the present invention. The dynamic control method for dual database connection pools monitors the current database connection pool indicators of computer equipment, and uses the database connection pools according to the monitored database connection pools. Dynamically control the dual database connection pool. According to different requirements, the execution sequence in the flow chart can be changed, and some steps can be omitted.

[0056] S11: Create a first database connection pool and a second database connection pool, and initialize the maximum number of database connections in the first database connection pool.

[0057] In this embodiment, after the application server is started, two database connection pools can be created, the first database connection pool can be used as a common database connection pool, and the second database connection pool can be used...

Embodiment 2

[0101] figure 2 It is a functional module diagram in a preferred embodiment of the dynamic control device of the dual database connection pool in the present invention.

[0102] In some embodiments, the dynamic control device 20 of the dual database connection pool runs in a computer device. The dynamic control device 20 of the dual database connection pool monitors the current database connection pool index of the computer equipment, and dynamically controls the dual database connection pool according to the monitored usage rate of the database connection pool. The dynamic control device 20 of the dual database connection pool may include a plurality of functional modules composed of program code segments. The program codes of each program segment in the dynamic control device 20 of the dual database connection pool can be stored in a memory and executed by at least one processor.

[0103] In this embodiment, the dynamic control device 20 of the dual database connection po...

Embodiment 3

[0147] image 3 It is a schematic diagram of a computer device provided by Embodiment 3 of the present invention.

[0148] The computer device 3 includes: a memory 31 , at least one processor 32 , a computer program 33 stored in the memory 31 and executable on the at least one processor 32 , and at least one communication bus 34 .

[0149] When the at least one processor 32 executes the computer program 33, the steps in the above embodiment of the dynamic control method for dual database connection pools are realized.

[0150] Specifically, when the at least one processor 32 executes the computer program 33, the steps in the embodiment of the dynamic control method for implementing the dual database connection pool include:

[0151] Create a first database connection pool and a second database connection pool, and initialize the maximum number of database connections in the first database connection pool;

[0152] When receiving the database connection request of the applica...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A dynamic control method for double database connection pools comprises the steps of creating a first database connection pool and a second database connection pool and initializing the maximum database connection number of the first database connection pool; when a database connection request of the application program is received, calculating the current utilization rate of the first database connection pool; judging whether the current utilization rate of the first database connection pool is greater than a preset database connection pool utilization rate threshold or not; when it is determined that the database connection pool is smaller than or equal to the application program, allocating available database connection to the application program through the first database connection pool; and when it is determined that the first database connection is greater than the second database connection, creating a temporary database connection through the second database connection pool and allocating to the application. The invention further provides a dynamic control device of the double-database connection pool, computer equipment and a storage medium. According to the method, database connection can be dynamically adjusted by using a double-database connection pool through cloud monitoring, a user request can be responded in time, and database resources can be used to the maximum extent.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a dynamic control method, device, computer equipment and storage medium of a double database connection pool. Background technique [0002] Database connections are a critical, limited and expensive resource, especially in multi-user web applications. When the number of concurrent users is large, many identical connections will be opened and closed repeatedly, which wastes a lot of system resources of the database and reduces access efficiency. The management of database connections can significantly affect the scalability and robustness of the entire application, and affect the performance indicators of the program. [0003] The database connection pool is proposed for this problem. The database connection pool is responsible for allocating, managing, and releasing database connections. It allows applications to reuse an existing database connection instead of re-establishin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/25G06F9/50
Inventor陈东杰
OwnerPING AN TECH (SHENZHEN) CO LTD