CN108600349A - Connection management method and device in connection pool - Google Patents

Connection management method and device in connection pool Download PDF

Info

Publication number
CN108600349A
CN108600349A CN201810322304.8A CN201810322304A CN108600349A CN 108600349 A CN108600349 A CN 108600349A CN 201810322304 A CN201810322304 A CN 201810322304A CN 108600349 A CN108600349 A CN 108600349A
Authority
CN
China
Prior art keywords
connection
pool
available
connection pool
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810322304.8A
Other languages
Chinese (zh)
Other versions
CN108600349B (en
Inventor
孙立晟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810322304.8A priority Critical patent/CN108600349B/en
Publication of CN108600349A publication Critical patent/CN108600349A/en
Application granted granted Critical
Publication of CN108600349B publication Critical patent/CN108600349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure is directed to the connection management method and devices in connection pool.This method includes:User's request is received, the step of determination can use connection is executed;Wherein it is determined that can include with the step of connection:The connection quantity of detection connection pool centering connects whether to have available first in the first connection pool of fixed value;When it includes available first connection to detect the first connection pool, available connection is connected to using available first;Available first is connected as connection idle in the first connection pool;When it does not include available first connection to detect in the first connection pool, it is to obtain available second connection in the second connection pool for changing value from the connection quantity of connection pool centering, available connection is connected to using second;When obtaining available second connection failure from the second connection pool, by next connection pool to as new connection pool pair, returning and executing the step of determination can use connection.When getting available connection, use can use connection response user to ask.

Description

Connection management method and device in connection pool
Technical field
This disclosure relates to the connection management method and device in field of communication technology more particularly to connection pool.
Background technology
Connection in database is a kind of resource of crucial and limited costliness, web application of this point in multi-user Embody especially prominent in program.The retractility and robustness of entire application program, shadow can be significantly impacted to the management of connection Ring the performance indicator to program.When concurrent user is larger, many identical connections will be repeatedly opened and closed, and be wasted The a large amount of system resource of database, reduces access efficiency.
In traditional connection mode, client-side program opens connection on startup, and connection is closed when exiting the program.This Sample, in the operation of entire program, each client occupies a connection always, even if in the free time not operated largely, When such as user input data, to cause the service efficiency of connection low.
The pattern of connection pool management can connect the low problem of service efficiency with effective solution, in connection pool management pattern In, when user, which really needs, to be operated, just from one connection of connection pool application, user's operation finishes, and connection releases immediately Into connection pool, so that other users use.In this way, not only substantially increasing the service efficiency of connection so that a large number of users can With shared less connection, and eliminate the time for establishing connection.
Invention content
To overcome the problems in correlation technique, the embodiment of the present disclosure provides connection management method and dress in connection pool It sets.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of connection management method in connection pool is provided, including:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect connection pool centering The first connection pool in whether have it is available first connection;The connection pool centering includes the first connection pool and the second connection pool; Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;Work as inspection When to measure first connection pool include available first connection, using described available first be connected to it is described can the company of using It connects;Described available first is connected as connection idle in first connection pool;When detecting in first connection pool not When including available first connection, available second connection is obtained from second connection pool, is made using second connection To be described with connection;When obtaining available second connection failure from second connection pool, by next connection pool pair As new connection pool pair, returns and execute the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
The technical scheme provided by this disclosed embodiment can include the following benefits:User's request is received, is executed true The step of fixed available connection;Wherein it is determined that can include with the step of connection:Detect connection pool centering the first connection pool in whether There is available first connection;Connection pool centering includes the first connection pool and the second connection pool;Connection quantity in first connection pool For fixed value;Connection quantity in second connection pool is to change value;When detecting that the first connection pool includes available first When connection, available connection is connected to using available first;Available first is connected as connection idle in the first connection pool; When it does not include available first connection to detect in the first connection pool, available second connection is obtained from the second connection pool, It is connected to available connection using second;When obtaining available second connection failure from the second connection pool, by next company Pond is connect to as new connection pool pair, returning and executing the step of determination can use connection.When getting available connection, using available Connection response user asks.When flow increases, it may appear that there is no available first connection to respond user in the first connection pool The case where request, can obtain the available connection that can respond user's request, to reach as early as possible by the second connection pool at this moment The demand of each user request is responded, also the user experience is improved while so that system can effectively adapt to flowed fluctuation.
In one embodiment, it is described obtained from second connection pool it is available second connection, including:
When second connection pool includes the second idle connection, determine the second of the free time be connected as it is described can Second connection;
When in second connection pool not including the second idle connection, the second company is created in second connection pool It connects as available second connection.
In one embodiment, the method further includes:
Monitor the time value that the in second connection pool second connection is in idle condition;
When the time value is more than preset time threshold, the occupied resource of release second connection, and delete institute State the second connection.
In one embodiment, the method further includes:Do not include available when detecting all connection pool centerings Connection when, export prompting message;The prompting message prompt obtains the connection failure for responding user's request.
In one embodiment, before the execution determination can use the step of connection, the method further includes:
Obtain the selection strategy for being currently used in selection connection pool pair;
It is available from all connection pool centerings random selections one when the selection strategy is the first preset strategy The step of connection pool is to being used to execute above-mentioned determination available connection;
When the selection strategy is the second preset strategy, first available company is selected from all connection pool centerings Connect the step of pond to executing the available connection of above-mentioned determination for the first time.
In one embodiment, after can using user's request described in connection response described in the use, the method is also wrapped It includes:
After the completion of the user asks response, connection can be used whether effective described in detection;
When detect it is described can use connect effective when, can be put into described in corresponding connection pool with connection;
When detect it is described can use connect invalid when, connection can be used described in deletion.
According to the second aspect of the embodiment of the present disclosure, the connection management device in a kind of connection pool is provided, including:
Receiving module, for receiving user's request;
Execution module, for executing the step of determination can use connection;Wherein, the determination can with connection the step of include: Whether detect has available first connection in the first connection pool of connection pool centering;The connection pool centering includes the first connection pool With the second connection pool;Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is Change value;When it includes available first connection to detect first connection pool, available first connection is used As described with connection;Described available first is connected as connection idle in first connection pool;It is described when detecting When not including available first connection in the first connection pool, available second connection is obtained from second connection pool, is used Described second, which is connected to described can use, connects;It, will when obtaining available second connection failure from second connection pool Next connection pool is to as new connection pool pair, returning and executing the step of determination can use connection;
Respond module, for the execution module get it is described can use connection when, use connection response using described The user request that the receiving module receives.
In one embodiment, the execution module includes:Determination sub-module and newly-built submodule;
The determination sub-module, for when second connection pool includes the second idle connection, determining the sky Not busy second is connected as available second connection;
The newly-built submodule, for when in second connection pool not including the second idle connection, described the Second is created in two connection pools is connected to available second connection.
In one embodiment, described device further includes:Monitoring modular and release module;
The monitoring modular, the time value that the second connection for monitoring in second connection pool is in idle condition;
The release module, for when the monitoring module monitors to the time value are more than preset time threshold, releasing The occupied resource of second connection is put, and deletes second connection.
In one embodiment, described device further includes:Output module;
The output module, for when it does not include available connection to detect all connection pool centerings, exporting Prompting message;The prompting message prompt obtains the connection failure for responding user's request.
In one embodiment, described device further includes:Acquisition module, first choice module and the second selecting module;
The acquisition module, for obtaining the selection strategy for being currently used in selection connection pool pair;
The first choice module, the selection strategy for being obtained when the acquisition module are the first preset strategy When, randomly choose a step of connection pools are to being used to execute above-mentioned determination available connection from all connection pool centerings;
Second selecting module, the selection strategy for being obtained when the acquisition module are the second preset strategy When, select first available connection pool to executing the step of the available connection of above-mentioned determination for the first time from all connection pool centerings Suddenly.
In one embodiment, described device further includes:Detection module is put into module and removing module;
The detection module can be used after the completion of asking response to the user when the respond module described in detection Whether connection is effective;
It is described to be put into module, for when the detection module detect it is described can use connect effective when, will described in can the company of using It connects and is put into corresponding connection pool;
The removing module, for when the detection module detect it is described can use connect invalid when, can use described in deletion Connection.
According to the third aspect of the embodiment of the present disclosure, the connection management device in a kind of connection pool is provided, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect connection pool centering The first connection pool in whether have it is available first connection;The connection pool centering includes the first connection pool and the second connection pool; Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;Work as inspection When to measure first connection pool include available first connection, using described available first be connected to it is described can the company of using It connects;Described available first is connected as connection idle in first connection pool;When detecting in first connection pool not When including available first connection, available second connection is obtained from second connection pool, is made using second connection To be described with connection;When obtaining available second connection failure from second connection pool, by next connection pool pair As new connection pool pair, returns and execute the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
According to the fourth aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, is stored thereon with calculating Machine instructs, when which is executed by processor the step of any one of realization first aspect the method.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the flow chart according to the connection management method in the connection pool shown in an exemplary embodiment.
Fig. 2 is the schematic diagram according to the connection pool pair shown in an exemplary embodiment.
Fig. 3 is the schematic diagram according to the combination connection pool shown in an exemplary embodiment.
Fig. 4 is the schematic diagram according to the FixedRecoverConPool shown in an exemplary embodiment.
Fig. 5 is the schematic diagram according to the SimpleConPool shown in an exemplary embodiment.
Fig. 6 is the flow chart according to the connection management method in the connection pool shown in an exemplary embodiment.
Fig. 7 is the flow chart according to the connection acquisition methods shown in an exemplary embodiment.
Fig. 8 is the flow chart according to the connection acquisition methods shown in an exemplary embodiment.
Fig. 9 is the flow chart according to the Connection Release method shown in an exemplary embodiment.
Figure 10 is the flow chart according to the connection reconstruction method shown in an exemplary embodiment.
Figure 11 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.
Figure 12 is execution module in the connection management device in a kind of connection pool shown according to an exemplary embodiment Block diagram.
Figure 13 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.
Figure 14 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.
Figure 15 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.
Figure 16 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.
Figure 17 is a kind of block diagram for the connection management device 90 in connection pool shown according to an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is according to the flow chart of the connection management method in the connection pool shown in an exemplary embodiment, such as Fig. 1 institutes Show, this approach includes the following steps S101-S103:
In step S101, user's request is received.
In step s 102, the step of determination can use connection is executed;Wherein it is determined that can include with the step of connection:Detection Whether available first connection is had in first connection pool of connection pool centering;Connection pool centering includes that the first connection pool and second connect Connect pond;Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;When detecting When first connection pool includes available first connection, available connection is connected to using available first;Available first connects It is connected in connection idle in the first connection pool;When it does not include available first connection to detect in the first connection pool, from second Available second connection is obtained in connection pool, and available connection is connected to using second;It is available when being obtained from the second connection pool The second connection failure when, next connection pool is executed into the step of determination can use connection to as new connection pool pair, returning.
In step s 103, when getting available connection, use can use connection response user to ask.
When user has request to need response, such as:When user wants browsing webpage, wants to look up data, when system connects After receiving user's request, just it needs to be determined that the connection asked for responding user, timely responds to be made to user's request.For The case where promoting reply flow mutation proposes a kind of connection pool pair to promote the reliability of response user's request, in the disclosure, It will include the first connection pool and the second connection pool in connection pool pair, and the connection quantity in wherein the first connection pool is to fix Value, that is, even if when not having to timely respond to available first connection of user's request in the first connection pool, first connects Pond will not increase new connection;And the connection quantity in the second connection pool is modifiable, it can be in the first connection pool Timely respond to user request it is available first connection when, can be obtained from the second connection pool for respond user ask can Second connection.It by above-mentioned connection pool pair, ensure that when flow is mutated, user's request can also be timely responded to Purpose, that is, when flow is mutated, when available first connection for not having that user's request can be timely responded in the first connection pool When, available second connection for responding user's request can be obtained from the second connection pool, to ensure that user's request can To be timely responded to, avoid period of reservation of number it is longer caused by the poor problem of user experience.
It is exemplary:As shown in Fig. 2, system includes three connection pools pair, respectively connection pool pair 1 and connection pool pair 2;Its In, connection pool pair 1 includes the first connection pool 1 and the second connection pool 1;Connection pool pair 2 includes the first connection pool 2 and the second connection pool 2.When system receives user's request, available first connection is obtained from the first connection pool 1 in connection pool pair 1 first, When obtaining successfully, asked using the available first connection response user;When obtaining failure, continue from the second connection pool 1 It is middle to obtain available second connection, when obtaining successfully, asked using the available second connection response user;Fail when obtaining When, continuation obtains available first connection from the first connection pool 2 in connection pool pair 2, available using this when obtaining successfully The first connection response user request;When obtaining failure, continuation obtains available second connection from the second connection pool 2.
It is illustrated so that user's request is payment as an example, gradual with payment scene is enriched, and user network flow is caused Annual distribution is extremely unbalanced, and such as in the morning 7:00-9:00 and afternoon 5:00-7:00 mass transit card cCredit card payment flow dramatically increases, And it is remarkably decreased at other times.In order to adapt to flowed fluctuation, in the disclosure, when flow is smaller, first can be directly used Available first connection is asked to respond user in connection pool;And when flow increases, and without available in the first connection pool When one connection is asked to respond user, at this point it is possible to asked using available second connection in the second connection pool to respond user, To achieve the purpose that respond each user's request as early as possible, and since the second connection quantity in the second connection pool is modifiable Therefore value even if flow increase is more, can also respond user's request by the second connection in the second connection pool in time, It avoids in the first connection pool without workable first connection come when responding user's request, period of reservation of number is longer to ask Topic, effectively improves user experience.
The technical scheme provided by this disclosed embodiment can include the following benefits:User's request is received, is executed true The step of fixed available connection;Wherein it is determined that can include with the step of connection:Detect connection pool centering the first connection pool in whether There is available first connection;Connection pool centering includes the first connection pool and the second connection pool;Connection quantity in first connection pool For fixed value;Connection quantity in second connection pool is to change value;When detecting that the first connection pool includes available first When connection, available connection is connected to using available first;Available first is connected as connection idle in the first connection pool; When it does not include available first connection to detect in the first connection pool, available second connection is obtained from the second connection pool, It is connected to available connection using second;When obtaining available second connection failure from the second connection pool, by next company Pond is connect to as new connection pool pair, returning and executing the step of determination can use connection.When getting available connection, using available Connection response user asks.When flow increases, it may appear that there is no available first connection to respond user in the first connection pool The case where request, can obtain the available connection that can respond user's request, to reach as early as possible by the second connection pool at this moment The demand of each user request is responded, also the user experience is improved while so that system can effectively adapt to flowed fluctuation.
In one embodiment, it is above-mentioned obtained from the second connection pool it is available second connection include following sub-step A1- A2:
In A1, when the second connection pool includes the second idle connection, it is available to determine that idle second is connected as Second connection.
In A2, when in the second connection pool not including the second idle connection, the second company is created in the second connection pool It connects as available second connection.
When not having available first connection in the first connection pool, idle second can be obtained from the second connection pool and is connected Response user's request is fetched, if there is no the second idle connection in the second connection pool at this time, due to the company in the second connection pool It is modifiable to connect quantity, can create the second new connection in the second connection pool at this time to respond user's request.
The technical scheme provided by this disclosed embodiment can include the following benefits:It is available free in the second connection It when the second connection, is asked using the second idle connection to respond user, and there is no idle second to connect in the second connection pool When connecing, the second connection can be created to respond user's request, so that system significantly more efficient can adapt to flowed fluctuation Situation.
Since the connection quantity in the second connection pool is to change value, there is no available first in the first connection pool Connection is come when responding user's request, and when there is no in the second connection pool idle the second connection response user request, Ke Yi The second connection is created in second connection pool to respond user's request.But if there is no the second idle connection to ring in the second connection pool Asked using family, and there is no the idle resource for establishing the second connection in the second connection pool, then carry out at this time by Next connection pool is to as new connection pool pair, returning and executing the step of determination can use connection.
In one embodiment, the above method further includes following sub-step B1-B2:
In B1, the time value that the in the second connection pool second connection is in idle condition is monitored.
In B2, when time value is more than preset time threshold, the occupied resource of the second connection of release, and delete second Connection.
When the change of user's number of requests is small, user's request is responded without the second excessive connection, and due to the second connection Connection variable amounts in pond more, therefore, can be monitored each second connection, obtain the second connection without sending message And it is not received by the time value of message, if the time value has been more than the preset time threshold of default, is just actively closed Second connection is closed, the resource of this second connection is discharged, second connection is finally deleted from connection queue, to effectively save System resource.
Include the first connection pool and the second connection pool simultaneously in the disclosure, it is ensured that in the premise for saving system resource Under may also adapt to flowed fluctuation, wherein since the connection quantity in the second connection pool is modifiable, in the second connection pool The second time value for being in idle condition of connection when being more than preset time threshold, just discharge the second occupied resource of connection, And the second connection is deleted, therefore, it is possible to effectively save system resource, and also adapt to flowed fluctuation.
The situation deleted due to will appear all second connections in the second connection pool, if only including second in system Connection pool, then when not including the second connection in the second connection pool, even if system receives 1 user's request, then at this time It is also required to create the second connection for responding user's request in the second connection pool, but if newly-built second connection can cause to use The family stand-by period is longer so that user experience is poor, therefore, will include fixed first connection of connection quantity in the disclosure Pond, at this point, even if in the second connection pool include second connection when, due to have in the first connection pool the first of fixed quantity company It connects, can be connected using first in the first connection pool and be asked to respond the user, to reduce the time of user's waiting, effectively The user experience is improved.There is the second connection pool that the first connection pool is assisted to realize the response asked user, can effectively adapt to Flowed fluctuation, and effectively save system resource.In one embodiment, the above method further includes:When detecting all connection pools When centering does not include available connection, prompting message is exported;Prompting message prompt obtains the company for responding user's request Connect failure.
Continuation can using this when obtaining available second successful connection from the second connection pool 2 according to above-mentioned example Second connection response user asks;When obtaining failure, prompt can be exported and obtain the connection asked for responding user The prompt message of failure, at this point, it is also possible that user learns that the request of oneself is unable to get response.
The technical scheme provided by this disclosed embodiment can include the following benefits:When available connection can not be got When, prompting message is exported to user effectively improve use so that user learns that the request of oneself is unable to get response in time in time It experiences at family.
In one embodiment, when combination connection pool includes multiple connection pool clock synchronizations, the above method further includes following son Step C1-C3:
In C1, the selection strategy for being currently used in selection connection pool pair is obtained.
It is available from all connection pool centerings random selection one when selection strategy is the first preset strategy in C2 The step of connection pool is to being used to execute above-mentioned determination available connection.
In C3, when selection strategy is the second preset strategy, first available company is selected from all connection pool centerings Connect the step of pond to executing the available connection of above-mentioned determination for the first time.
Include multiple connection pool clock synchronizations when combining connection pool, can randomly choose and execute in above-described embodiment for determining The sequence connected can be used, when the time of connection can be used in order to shorten selection, in the disclosure, can obtain and be currently used in selection company Connect the selection strategy in pond pair.
Such as:If it is parallel relation that, which there are multiple computer rooms, each computer room in service provider, then can preferentially use randomly selected Strategy, and if it is main and standby relation that, which there are multiple computer rooms, computer room in service provider, then the strategy of active and standby selection can be preferentially used, at this point, The first above-mentioned preset strategy can be randomly selected strategy, the second preset strategy can based on alternative strategy;Alternatively, The first above-mentioned preset strategy can based on alternative strategy, the second preset strategy can be randomly selected strategy.
When selection strategy is randomly selected strategy, an available company can be randomly choosed from all connection pool centerings The step of pond is to being used to execute above-mentioned determination available connection is connect, when the connection pool centering does not have available connection, remaining Connection pool centering randomly choose a step of available connection pool is to continuing to execute above-mentioned available connection again, with such It pushes away.
When selection strategy is the strategy of main alternative, first available connection can be selected from all connection pool centerings The step of pond is to being used to execute the available connection of above-mentioned determination for the first time, when the connection pool centering does not have available connection, then it is right The step of next available connection pool is to continuing to execute above-mentioned available connection, and so on.
This kind of realization method can be adapted to multimachine room, the agreement interconnected between Multi net voting (Internet Protocol, letter Referred to as:IP system).When facilitator system supports multiple computer rooms or multiple IP, if being parallel relation between computer room, make With randomly selected strategy, reach flow equalization;If between computer room being main and standby relation, the connection plan of active and standby selection is used Slightly, it realizes that normal condition down-off only walks main equipment room, when main equipment room service is unavailable, automatically switches to spare computer room, to Greatly improve the stability of system.
The technical scheme provided by this disclosed embodiment can include the following benefits:Based on different selection strategies come The sequence for determining available connection to executing to connection pool is determined, so as to the reliability of lifting system.
In one embodiment, the above method further includes following sub-step D1-D3:
In D1, after the completion of user's request processing, whether the connection detected for responding user's request is effective.
In D2, when detecting that the connection for responding user's request is effective, connection is put into the corresponding connection of connection Chi Zhong.
In D3, when detecting that the connection for responding user's request is invalid, connection is deleted.
In order to save the time of response user's request, the same connection can be multiplexed, be rung thereby using the connection After user's request that should be preceding, it can also continue to proceed to respond to subsequently received user's request using the connection.Therefore, when making After the complete user request of current connection processing, whether effective, when detecting that the connection is effective, just should if can detect current connection Connection is put into corresponding connection pool, so as to the subsequently received user's request of the connection response can be continuing with, to carry The utilization rate of connection is risen;And when detecting that connection is invalid, the connection is just directly deleted, connection occupancy can be discharged at this time System resource.
The technical scheme provided by this disclosed embodiment can include the following benefits:After having responded user's request, Connection can be put into corresponding connection pool, so that connection can be re-used, effectively improve the utilization rate of connection.
Fig. 3 is according to the schematic diagram of the combination connection pool shown in an exemplary embodiment, as shown in figure 3, a combination connects Connect pond (English:CombinationConPool) corresponding a business service, such as Beijing Public Transport platform service correspond to a group Close connection pool;One combination connection pool includes multiple connection pools to (English:ConPoolPair), although different connection pools pair All it is the same business service, but with different IP and port numbers (English:port);There are one solid to tool for one connection pool Surely connect number, connection it is recoverable be fixedly connected pond-FixedRecoverConPool (in above-described embodiment first connection Pond) and one connection number be not fixed, with heartbeat simple connection pool-SimpleConPool (second in above-described embodiment Connection pool);There are one connection pools to management module (English for one combination connection pool tool:ConPoolPairManager), ConPoolPairManager is responsible for the life cycle for obtaining the strategy of a connection, managing connection pool pair.
Fig. 4 be according to the schematic diagram of the FixedRecoverConPool shown in an exemplary embodiment, as shown in figure 4, FixedRecoverConPool includes an attribute configuration management module, a connection creation module, a connection monitoring mould Block, a Connection Release module and a connection queue.Wherein, attribute configuration management module is responsible for ip, port, connection The attributes such as number, the interval time for sending heartbeat;Creation module is connected, when being supported on connection pool initialization and connect invalid Restore a connection, ensures that effective connection number in connection pool is to be fixedly connected with number;Module is monitored in connection, which includes one Heartbeat transmitter, per a heartbeat connection is sent at regular intervals, connection monitors module and is responsible for monitoring connection status and statistics Connection closed moment and the time interval for connecting establishment moment, the time interval can influence the sending time of heartbeat;Connection Release Module, when connecting invalid, which deletes invalid connection from queue, when one connection of business thread needs When, a connection is obtained from connection queue, returns to business thread, when a business thread has used a connection It waits, is released back into connection pool;Storage connection is responsible in connection queue.
Fig. 5 be according to the schematic diagram of the SimpleConPool shown in an exemplary embodiment, as shown in figure 5, SimpleConPool includes an attribute management module, a connection creation module, a Connection Release module and a connection Queue.Attribute management module is responsible for ip and port;Creation module is connected, when business thread application connects, if connection There is no idle connection in pond, then connection creation module just creates a connection;Connection Release module is responsible for business thread Distribution and recycling connection, the Connection Release that will be had been switched off, the module further include an idle monitoring submodule, are responsible for when connection It is not received by within a certain period of time or when transmission data, actively closes connection, then deleted from connection pool;It is negative to connect queue Duty connection storage.
Fig. 6 is according to the flow chart of the connection management method in the connection pool shown in an exemplary embodiment, and this method is answered For in above-mentioned Fig. 3-scenes shown in fig. 5, as shown in fig. 6, this approach includes the following steps:
In step s 201, start the method in this disclosure, receive user's request first.
In step S202, combination connection pool (English:CombinationConPool active procedure) is counted Connection pool in CombinationConPool is to (English:ConPoolPair) number goes to step S203 if it is 0; Terminate;If there is multiple ConPoolPair, step S204 is gone to;If only 1 ConPoolPair, goes to step S205.
In step S203, terminate;And prompting message is exported, prompting message prompt is obtained for responding user's request Connection failure.
In step S204, the strategy of current selection ConPoolpair is judged, if it is random selection (if other side has Multiple computer rooms, each computer room are parallel relations, then using random selection), then go to step S206;(such as if it is active and standby selection It is main and standby relation that fruit other side, which has multiple computer rooms, computer room, then uses active and standby selection), then go to step S205.
In step S205, first available ConPoolpair is selected, step S207 is gone to.
In step S206, an available ConPoolpair is randomly choosed, step S207 is gone to.
In step S207, pond (English is fixedly connected with from selected ConPoolpair: FixedRecoverConPool connection is obtained in), goes to step S208.
In step S208, judge to obtain whether connection succeeds.If it is successful, returning to the connection acquired, terminate, and It is asked using connection response user;If it fails, continuing step S209.
In step S209, from the simple connection pool (English in selected ConPoolpair:SimpleConPool) Middle acquisition connection, goes to step S2010.
In step S2010, judge to obtain whether connection succeeds, if it succeeds, the connection that return obtains, terminates, and It is asked using connection response user;If it fails, continuing step S2011.
In step S2011, current ConPoolpair is set as invalid, goes to step S202.
Fig. 7 is according to the flow chart of the connection acquisition methods shown in an exemplary embodiment, which is used for definition graph 4 Middle FixedRecoverConPool obtains the step of connection, as shown in fig. 7, FixedRecoverConPool obtains the mistake of connection Journey is fairly simple, directly judges to connect either with or without the free time in connection pool, if so, being returned to an idle connection, uses the company Response user's request is connect if being returned to sky without free time connection then to terminate.
Fig. 8 is according to the flow chart of the connection acquisition methods shown in an exemplary embodiment, which is used for definition graph 5 Middle SimpleConPool obtains the step of connection, as shown in figure 8, when obtaining connection from SimpleConPool, if there is Free time connection is then directly returned to idle connection, is asked using connection response user, if connected without the free time, creates one A new connection is asked using the new connection of establishment to respond user.
Fig. 9 is according to the flow chart of the Connection Release method shown in an exemplary embodiment, and this method is applied to above-mentioned figure In 3- scenes shown in fig. 5, no matter connects and obtains from FixedRecoverConPool or obtained from SimpleConPool, Its release process is the same, it is ensured that is released back into the Conpool for getting connection.As shown in figure 9, this method includes: Whether detection connection is also effective first, if connection is effective, according to the information of connection, first looks for the combination connection where connection Pond (English:CombinationConPool);In the CombinationConPool at place, connected according to the information searching of connection ConPoolPair where connecing;The ConPool where connection is searched in ConPoolPair;Then even it will be released back into ConPool Connection queue in;If connection is invalid, the connection is abandoned, is terminated.
Figure 10 is according to the flow chart of the connection reconstruction method shown in an exemplary embodiment, and the embodiment is for illustrating FixedRecoverConPool restores the step of connection, and FixedRecoverConPool on startup, actively creates fixed number The connection of amount is triggered when the detection module in FixedRecoverConPool monitors some Joint failure such as Figure 10 institutes The connection reestablishment procedure shown, the process include the following steps:The connection of failure is deleted first, then creates a new connection, And then judge whether new connection establishment succeeds, if new connection creates successfully, the connection newly created is put into connection queue In and terminate, if new connection creates incident, certain interval of time re-creates new connection.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.
Figure 11 is the block diagram of the connection management device in a kind of connection pool shown according to an exemplary embodiment.Such as Figure 11 Shown, which includes:
Receiving module 11, for receiving user's request;
Execution module 12, for executing the step of determination can use connection;Wherein, the determination can be wrapped with the step of connection It includes:Whether detect has available first connection in the first connection pool of connection pool centering;The connection pool centering includes the first company Connect pond and the second connection pool;Connection quantity in first connection pool is fixed value;Connection number in second connection pool Amount is worth to change;When it includes available first connection to detect first connection pool, described available first is used Described can use is connected to connect;Described available first is connected as connection idle in first connection pool;When detecting When not including available first connection in first connection pool, available second connection is obtained from second connection pool, Described can use is connected to using described second to connect;When obtaining available second connection failure from second connection pool When, by next connection pool to as new connection pool pair, returning and executing the step of determination can use connection;
Respond module 13, for the execution module 12 get it is described can use connection when, using described with connection Respond the user request that the receiving module 11 receives.
In one embodiment, as shown in figure 12, the execution module 12 includes:Determination sub-module 121 and newly-built submodule Block 122;
The determination sub-module 121, described in when second connection pool includes the second idle connection, determining Idle second is connected as available second connection;
The newly-built submodule 122, when for being connected when in second connection pool do not include the free time second, described Second is created in second connection pool is connected to available second connection.
In one embodiment, as shown in figure 13, described device further includes:Monitoring modular 14 and release module 15;
The monitoring modular 14, the time that the second connection for monitoring in second connection pool is in idle condition Value;
The release module 15 monitors that the time value is more than preset time threshold for working as the monitoring modular 14 When, the occupied resource of release second connection, and delete second connection.
In one embodiment, as shown in figure 14, described device further includes:Output module 15;
The output module 15, for when detect all connection pool centerings include available connection when, it is defeated Go out prompting message;The prompting message prompt obtains the connection failure for responding user's request.
In one embodiment, as shown in figure 15, described device further includes:Acquisition module 16,17 and of first choice module Second selecting module 18;
The acquisition module 16, for obtaining the selection strategy for being currently used in selection connection pool pair;
The first choice module 17, the selection strategy for being obtained when the acquisition module 16 are the first default plan When slightly, an available connection pool is randomly choosed to being used to execute the available connection of above-mentioned determination from all connection pool centerings The step of;
Second selecting module 18, the selection strategy for being obtained when the acquisition module 16 are the second default plan When slightly, select first available connection pool to executing the available connection of above-mentioned determination for the first time from all connection pool centerings Step.
In one embodiment, as shown in figure 16, described device further includes:Detection module 19 is put into module 110 and deletes Module 111;
The detection module 19 can described in detection after the completion of asking response to the user when the respond module It is whether effective with connecting;
It is described to be put into module 110, for when the detection module 19 detect it is described can use connect effective when, will described in can It is put into corresponding connection pool with connection;
The removing module 111, for when the detection module 111 detect it is described can use connect invalid when, delete institute State available connection.
According to the third aspect of the embodiment of the present disclosure, the connection management device in a kind of connection pool is provided, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, processor is configured as:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect connection pool centering The first connection pool in whether have it is available first connection;The connection pool centering includes the first connection pool and the second connection pool; Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;Work as inspection When to measure first connection pool include available first connection, using described available first be connected to it is described can the company of using It connects;Described available first is connected as connection idle in first connection pool;When detecting in first connection pool not When including available first connection, available second connection is obtained from second connection pool, is made using second connection To be described with connection;When obtaining available second connection failure from second connection pool, by next connection pool pair As new connection pool pair, returns and execute the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
Above-mentioned processor is also configured to:
It is described obtained from second connection pool it is available second connection, including:
When second connection pool includes the second idle connection, determine the second of the free time be connected as it is described can Second connection;
When in second connection pool not including the second idle connection, the second company is created in second connection pool It connects as available second connection.
The method further includes:
Monitor the time value that the in second connection pool second connection is in idle condition;
When the time value is more than preset time threshold, the occupied resource of release second connection, and delete institute State the second connection.
The method further includes:When it does not include available connection to detect all connection pool centerings, output carries Show message;The prompting message prompt obtains the connection failure for responding user's request.
Before the execution determination can use the step of connection, the method further includes:
Obtain the selection strategy for being currently used in selection connection pool pair;
It is available from all connection pool centerings random selections one when the selection strategy is the first preset strategy The step of connection pool is to being used to execute above-mentioned determination available connection;
When the selection strategy is the second preset strategy, first available company is selected from all connection pool centerings Connect the step of pond to executing the available connection of above-mentioned determination for the first time.
After can using user's request described in connection response described in the use, the method further includes:
After the completion of the user asks response, connection can be used whether effective described in detection;
When detect it is described can use connect effective when, can be put into described in corresponding connection pool with connection;
When detect it is described can use connect invalid when, connection can be used described in deletion.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Figure 17 is a kind of block diagram for the connection management device 90 in connection pool shown according to an exemplary embodiment. For example, device 90 may be provided as a server.Device 90 includes processing component 902, further comprises one or more Processor, and by the memory resource representated by memory 903, for store can by the instruction of the execution of processing component 902, Such as application program.The application program stored in memory 903 may include it is one or more each correspond to one The module of group instruction.In addition, processing component 902 is configured as executing instruction, to execute the above method.
Device 90 can also include the power management that a power supply module 906 is configured as executive device 90, and one wired Or radio network interface 905 is configured as device 90 being connected to network and input and output (I/O) interface 908.Device 90 It can operate based on the operating system for being stored in memory 903, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is executed by the processor of device 90 When so that device 90 is able to carry out the connection management method in above-mentioned connection pool, and method includes:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect connection pool centering The first connection pool in whether have it is available first connection;The connection pool centering includes the first connection pool and the second connection pool; Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;Work as inspection When to measure first connection pool include available first connection, using described available first be connected to it is described can the company of using It connects;Described available first is connected as connection idle in first connection pool;When detecting in first connection pool not When including available first connection, available second connection is obtained from second connection pool, is made using second connection To be described with connection;When obtaining available second connection failure from second connection pool, by next connection pool pair As new connection pool pair, returns and execute the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
It is described obtained from second connection pool it is available second connection, including:
When second connection pool includes the second idle connection, determine the second of the free time be connected as it is described can Second connection;
When in second connection pool not including the second idle connection, the second company is created in second connection pool It connects as available second connection.
The method further includes:
Monitor the time value that the in second connection pool second connection is in idle condition;
When the time value is more than preset time threshold, the occupied resource of release second connection, and delete institute State the second connection.
The method further includes:When it does not include available connection to detect all connection pool centerings, output carries Show message;The prompting message prompt obtains the connection failure for responding user's request.
Before the execution determination can use the step of connection, the method further includes:
Obtain the selection strategy for being currently used in selection connection pool pair;
It is available from all connection pool centerings random selections one when the selection strategy is the first preset strategy The step of connection pool is to being used to execute above-mentioned determination available connection;
When the selection strategy is the second preset strategy, first available company is selected from all connection pool centerings Connect the step of pond to executing the available connection of above-mentioned determination for the first time.
After can using user's request described in connection response described in the use, the method further includes:
After the completion of the user asks response, connection can be used whether effective described in detection;
When detect it is described can use connect effective when, can be put into described in corresponding connection pool with connection;
When detect it is described can use connect invalid when, connection can be used described in deletion.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (14)

1. a kind of connection management method in connection pool, which is characterized in that including:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect the of connection pool centering Whether available first connection is had in one connection pool;The connection pool centering includes the first connection pool and the second connection pool;It is described Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;When detecting When first connection pool includes available first connection, it is connected to described can use using described available first and connects; Described available first is connected as connection idle in first connection pool;Do not include when detecting in first connection pool When available first connection, available second connection is obtained from second connection pool, institute is connected to using described second State available connection;When obtaining available second connection failure from second connection pool, by next connection pool to conduct New connection pool pair returns and executes the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
2. according to the method described in claim 1, it is characterized in that, described obtain available second from second connection pool Connection, including:
When second connection pool includes the second idle connection, determine the second of the free time be connected as it is described available Second connection;
When in second connection pool not including the second idle connection, the second connection is created in second connection pool and is made For available second connection.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
Monitor the time value that the in second connection pool second connection is in idle condition;
When the time value is more than preset time threshold, the occupied resource of release second connection, and delete described the Two connections.
4. according to the method described in claim 1, it is characterized in that, the method further includes:When detecting all connections When pond centering does not include available connection, prompting message is exported;The prompting message prompt is obtained for responding the user The connection failure of request.
5. according to the method described in claim 1, it is characterized in that, the execution determination can use connection the step of before, it is described Method further includes:
Obtain the selection strategy for being currently used in selection connection pool pair;
When the selection strategy is the first preset strategy, an available connection is randomly choosed from all connection pool centerings The step of pond is to being used to execute above-mentioned determination available connection;
When the selection strategy is the second preset strategy, first available connection pool is selected from all connection pool centerings To the step of executing the available connection of above-mentioned determination for the first time.
6. according to the method described in claim 1, it is characterized in that, user's request described in connection response can be used described in the use Later, the method further includes:
After the completion of the user asks response, connection can be used whether effective described in detection;
When detect it is described can use connect effective when, can be put into described in corresponding connection pool with connection;
When detect it is described can use connect invalid when, connection can be used described in deletion.
7. the connection management device in a kind of connection pool, which is characterized in that including:
Receiving module, for receiving user's request;
Execution module, for executing the step of determination can use connection;Wherein, the determination can with connection the step of include:Detection Whether available first connection is had in first connection pool of connection pool centering;The connection pool centering includes the first connection pool and the Two connection pools;Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is variable More it is worth;When it includes available first connection to detect first connection pool, it is connected to using described available first The connection;Described available first is connected as connection idle in first connection pool;When detecting described first When not including available first connection in connection pool, available second connection is obtained from second connection pool, using described Second, which is connected to described can use, connects;It, will be next when obtaining available second connection failure from second connection pool A connection pool is to as new connection pool pair, returning and executing the step of determination can use connection;
Respond module, for the execution module get it is described can use connection when, using described described in connection response The user request that receiving module receives.
8. device according to claim 7, which is characterized in that the execution module includes:Determination sub-module and newly-built son Module;
The determination sub-module, for when second connection pool includes the second idle connection, determining the free time Second is connected as available second connection;
The newly-built submodule, for when in second connection pool not including the second idle connection, connecting described second Connect in pond create second be connected to it is described it is available second connection.
9. device according to claim 7, which is characterized in that described device further includes:Monitoring modular and release module;
The monitoring modular, the time value that the second connection for monitoring in second connection pool is in idle condition;
The release module, for when the monitoring module monitors to the time value are more than preset time threshold, discharging institute The occupied resource of the second connection is stated, and deletes second connection.
10. device according to claim 7, which is characterized in that described device further includes:Output module;
The output module, for when it does not include available connection to detect all connection pool centerings, output to prompt Message;The prompting message prompt obtains the connection failure for responding user's request.
11. device according to claim 7, which is characterized in that described device further includes:Acquisition module, first choice mould Block and the second selecting module;
The acquisition module, for obtaining the selection strategy for being currently used in selection connection pool pair;
The first choice module is used for when the selection strategy that the acquisition module obtains is the first preset strategy, from All connection pool centerings randomly choose a step of available connection pools are to being used to execute above-mentioned determination available connection;
Second selecting module is used for when the selection strategy that the acquisition module obtains is the second preset strategy, from All connection pool centerings select the step of first available connection pool to executing the available connection of above-mentioned determination for the first time.
12. device according to claim 7, which is characterized in that described device further includes:Detection module, be put into module and Removing module;
The detection module can use connection after the completion of asking response to the user when the respond module described in detection Whether effectively;
It is described to be put into module, for when the detection module detect it is described can use connect effective when, can be put described with connection Enter in corresponding connection pool;
The removing module, for when the detection module detect it is described can use connect invalid when, connection can be used described in deletion.
13. the connection management device in a kind of connection pool, which is characterized in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Receive user's request;
Execute the step of determination can use connection;Wherein, the determination can with connection the step of include:Detect the of connection pool centering Whether available first connection is had in one connection pool;The connection pool centering includes the first connection pool and the second connection pool;It is described Connection quantity in first connection pool is fixed value;Connection quantity in second connection pool is to change value;When detecting When first connection pool includes available first connection, it is connected to described can use using described available first and connects; Described available first is connected as connection idle in first connection pool;Do not include when detecting in first connection pool When available first connection, available second connection is obtained from second connection pool, institute is connected to using described second State available connection;When obtaining available second connection failure from second connection pool, by next connection pool to conduct New connection pool pair returns and executes the step of determination can use connection;
When can use connection described in getting, the user described in connection response is used to ask.
14. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the instruction is by processor The step of any one of claim 1 to 6 the method is realized when execution.
CN201810322304.8A 2018-04-11 2018-04-11 Connection management method and device in connection pool Active CN108600349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810322304.8A CN108600349B (en) 2018-04-11 2018-04-11 Connection management method and device in connection pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810322304.8A CN108600349B (en) 2018-04-11 2018-04-11 Connection management method and device in connection pool

Publications (2)

Publication Number Publication Date
CN108600349A true CN108600349A (en) 2018-09-28
CN108600349B CN108600349B (en) 2021-01-05

Family

ID=63621851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810322304.8A Active CN108600349B (en) 2018-04-11 2018-04-11 Connection management method and device in connection pool

Country Status (1)

Country Link
CN (1) CN108600349B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289993A (en) * 2019-06-06 2019-09-27 阿里巴巴集团控股有限公司 A kind of connection pool management method, apparatus, equipment and adapting system
CN115396313A (en) * 2022-08-22 2022-11-25 度小满科技(北京)有限公司 Communication method, communication apparatus, storage medium, and electronic apparatus
WO2024113830A1 (en) * 2022-11-29 2024-06-06 华为技术有限公司 Data transmission method, apparatus, device and system, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581313A (en) * 2013-10-29 2014-02-12 华为技术有限公司 Connection establishment method for processing equipment and cluster server and processing equipment
CN103605727A (en) * 2013-11-19 2014-02-26 浪潮电子信息产业股份有限公司 Connection pool based efficient multiuser database access optimization method and framework
US20140324911A1 (en) * 2013-04-26 2014-10-30 Oracle International Corporation Support for cloud-based multi-tenant environments using connection labeling
CN105512127A (en) * 2014-09-24 2016-04-20 阿里巴巴集团控股有限公司 Method and device for distributing database connection
CN106250500A (en) * 2016-07-29 2016-12-21 广州唯品会信息科技有限公司 The dynamic management approach of database connection pool and system
CN106326446A (en) * 2016-08-26 2017-01-11 广州唯品会信息科技有限公司 Distribution type database connecting method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324911A1 (en) * 2013-04-26 2014-10-30 Oracle International Corporation Support for cloud-based multi-tenant environments using connection labeling
CN103581313A (en) * 2013-10-29 2014-02-12 华为技术有限公司 Connection establishment method for processing equipment and cluster server and processing equipment
CN103605727A (en) * 2013-11-19 2014-02-26 浪潮电子信息产业股份有限公司 Connection pool based efficient multiuser database access optimization method and framework
CN105512127A (en) * 2014-09-24 2016-04-20 阿里巴巴集团控股有限公司 Method and device for distributing database connection
CN106250500A (en) * 2016-07-29 2016-12-21 广州唯品会信息科技有限公司 The dynamic management approach of database connection pool and system
CN106326446A (en) * 2016-08-26 2017-01-11 广州唯品会信息科技有限公司 Distribution type database connecting method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289993A (en) * 2019-06-06 2019-09-27 阿里巴巴集团控股有限公司 A kind of connection pool management method, apparatus, equipment and adapting system
CN115396313A (en) * 2022-08-22 2022-11-25 度小满科技(北京)有限公司 Communication method, communication apparatus, storage medium, and electronic apparatus
WO2024113830A1 (en) * 2022-11-29 2024-06-06 华为技术有限公司 Data transmission method, apparatus, device and system, and storage medium

Also Published As

Publication number Publication date
CN108600349B (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN105468450B (en) Method for scheduling task and system
CN108847982B (en) Distributed storage cluster and node fault switching method and device thereof
CN106302565B (en) Scheduling method and system of service server
US7548973B2 (en) Managing a high availability framework by enabling and disabling individual nodes
CN109151045B (en) Distributed cloud system and monitoring method
WO2016184175A1 (en) Database processing method and apparatus
CN107491346A (en) A kind of task processing method of application, apparatus and system
CN107241242A (en) A kind of data processing method and device
CN107666493B (en) Database configuration method and equipment thereof
CN111176888B (en) Disaster recovery method, device and system for cloud storage
CN109245926B (en) Intelligent network card, intelligent network card system and control method
CN113596176A (en) Self-selection method and device of Internet of things center node, Internet of things equipment and system
CN109033814A (en) intelligent contract triggering method, device, equipment and storage medium
CN108600349A (en) Connection management method and device in connection pool
CN114675983A (en) Business data processing method and device, storage medium and electronic equipment
CN111694518A (en) Method, device and equipment for automatically migrating data after cluster expansion or contraction
CN112612635B (en) Multi-level protection method for application program
CN109462646A (en) A kind of method and apparatus of exception response
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
CN111193778B (en) Method and device for balancing WEB service load
US20030145050A1 (en) Node self-start in a decentralized cluster
WO2015067051A1 (en) Test agent method and device thereof
CN110213778B (en) Method and device for intelligently pairing main network element and standby network element
CN111885169B (en) Method, system and device for realizing high availability of cloud hard disk service
CN108154343A (en) The emergency processing method and system of a kind of enterprise information system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant