CN114422565A - Network connection management method based on connection pool and related device - Google Patents

Network connection management method based on connection pool and related device Download PDF

Info

Publication number
CN114422565A
CN114422565A CN202011091016.XA CN202011091016A CN114422565A CN 114422565 A CN114422565 A CN 114422565A CN 202011091016 A CN202011091016 A CN 202011091016A CN 114422565 A CN114422565 A CN 114422565A
Authority
CN
China
Prior art keywords
connection
target
pool
connection pool
hot
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.)
Pending
Application number
CN202011091016.XA
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011091016.XA priority Critical patent/CN114422565A/en
Publication of CN114422565A publication Critical patent/CN114422565A/en
Pending legal-status Critical Current

Links

Images

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
    • 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
    • H04L67/141Setup of application sessions

Landscapes

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

Abstract

The application discloses a network connection management method based on a connection pool and a related device, and belongs to the technical field of cloud. Acquiring use information of the target connection by inputting a request of the target connection pool in response to the target connection; inputting the target connection into a hot connection pool if the use information meets a preset condition; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, and the connection resources in the cold connection pool can be managed when the target connection is accessed into the hot connection pool, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.

Description

Network connection management method based on connection pool and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network connection management method and a related apparatus based on a connection pool.
Background
With the popularization and development of network technology and computers, proxy services are becoming more forms of online application. The proxy service is that an internal network sends a connection request to the internet, and the proxy service needs to be formulated to send the HTTP which is directly transmitted to the web server to the proxy server. In the reverse proxy service in the cloud scenario, the reverse proxy server generally proxies different long connection requests of various terminals and various service scenarios.
In general, the process of long connection management is to configure a connection pool for managing long connections, which is a first-in first-out connection pool with a fixed maximum. A free long connection can enter the connection pool, and when the connection in the connection pool reaches the maximum value, the free connection which enters the connection pool firstly is squeezed out and closed, so that the load stability of the connection pool is ensured.
However, in the connection selection of the network service, a situation that a link which needs to be connected currently is closed may occur, which causes a situation of connection failure and affects the stability of the network connection management process.
Disclosure of Invention
In view of this, the present application provides a network connection management method based on a connection pool, which can effectively improve the stability of the network connection management process.
A first aspect of the present application provides a network connection management method based on a connection pool, which can be applied to a system or a program that includes a network connection management function in a terminal device, and specifically includes:
responding to a request of inputting a target connection pool by a target connection, and acquiring use information of the target connection, wherein the target connection pool comprises a hot connection pool and a cold connection pool;
if the use information meets a preset condition, inputting the target connection into the hot connection pool to update the hot connection pool;
and determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool.
Optionally, in some possible implementation manners of the present application, the obtaining the usage information of the target connection in response to a request that the target connection inputs the target connection pool includes:
responding to a request of inputting a target connection pool by target connection, and acquiring a connection record of the target connection in the target connection pool;
extracting the multiplexing times in the connection record:
and determining the use information of the target connection based on the multiplexing times.
Optionally, in some possible implementation manners of the present application, the obtaining the usage information of the target connection in response to a request that the target connection inputs the target connection pool includes:
responding to a request of inputting a target connection into a target connection pool by the target connection, and determining a domain name corresponding to the target connection so as to determine a target service;
extracting scene connection parameters of the target service based on connection indexes, wherein the scene connection parameters are used for indicating use information corresponding to connection contained in the target service;
and determining the use information of the target connection according to the scene connection parameters.
Optionally, in some possible implementation manners of the present application, the extracting the scene connection parameter of the target service based on the connection index includes:
determining a service connection set corresponding to the target service based on the connection index;
determining connection information of a connection in the service connection set within a preset time period, wherein the connection information comprises connection times and connection behavior intervals;
and determining the scene connection parameters of the target service according to the connection information.
Optionally, in some possible implementation manners of the present application, the determining the scene connection parameter of the target service according to the connection information includes:
determining weight information corresponding to the connection times and the connection behavior intervals;
and weighting based on the weight information to determine the scene connection parameters of the target service.
Optionally, in some possible implementation manners of the present application, the determining resource adjustment information corresponding to when the hot connection pool is updated, so as to adjust connection resources included in the target connection pool, includes:
determining corresponding resource adjustment information when the hot connection pool is updated;
acquiring a load value of the hot connection pool;
and if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, allocating the idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool.
Optionally, in some possible implementations of the present application, the method further includes:
if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value, closing idle connection in the cold connection pool to generate the idle resources;
and allocating the free resources to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool.
Optionally, in some possible implementations of the present application, the method further includes:
and if the use information does not meet the preset condition, inputting the target connection into the cold connection pool so as to update the cold connection pool.
Optionally, in some possible implementations of the present application, the method further includes:
acquiring a load value of the cold connection pool;
if the load value reaches the second preset value, screening out eliminated connections from the cold connection pool based on connection duration;
and deleting the eliminated connection so as to update the cold connection pool.
Optionally, in some possible implementations of the present application, the method further includes:
monitoring connection information of the target connection in the hot connection pool;
and if the connection information indicates that the target connection is idle, scheduling the target connection to the cold connection pool.
Optionally, in some possible implementations of the present application, the method further includes:
determining a corresponding time identifier when the target connection is input into the cold connection pool;
configuring a close order for the target connection based on the time identification.
Optionally, in some possible implementations of the present application, the target connection is a long connection, and the long connection is used for providing a reverse proxy service.
A second aspect of the present application provides a network connection management apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for responding to a request that a target connection inputs a target connection pool and acquiring the use information of the target connection, and the target connection pool comprises a hot connection pool and a cold connection pool;
the input unit is used for inputting the target connection into the hot connection pool to update the hot connection pool if the use information meets a preset condition;
and the management unit is used for determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool.
Optionally, in some possible implementation manners of the present application, the obtaining unit is specifically configured to obtain, in response to a request that a target connection inputs into a target connection pool, a connection record of the target connection in the target connection pool;
the obtaining unit is specifically configured to extract the multiplexing times in the connection record:
the obtaining unit is specifically configured to determine the usage information of the target connection based on the multiplexing times.
Optionally, in some possible implementation manners of the present application, the obtaining unit is specifically configured to determine, in response to a request that a target connection inputs into a target connection pool, a domain name corresponding to the target connection, so as to determine a target service;
the obtaining unit is specifically configured to extract a scene connection parameter of the target service based on a connection index, where the scene connection parameter is used to indicate usage information corresponding to a connection included in the target service;
the obtaining unit is specifically configured to determine the usage information of the target connection according to the scene connection parameter.
Optionally, in some possible implementation manners of the present application, the obtaining unit is specifically configured to determine, based on the connection index, a service connection set corresponding to the target service;
the acquiring unit is specifically configured to determine connection information of a connection in the service connection set within a preset time period, where the connection information includes connection times and connection behavior intervals;
the obtaining unit is specifically configured to determine the scene connection parameter of the target service according to the connection information.
Optionally, in some possible implementation manners of the present application, the obtaining unit is specifically configured to determine weight information corresponding to the connection times and the connection behavior intervals;
the obtaining unit is specifically configured to perform weighting based on the weight information to determine the scene connection parameter of the target service.
Optionally, in some possible implementation manners of the present application, the management unit is specifically configured to determine resource adjustment information corresponding to the update of the hot connection pool;
the management unit is specifically configured to obtain a load value of the hot connection pool;
the management unit is specifically configured to, if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, allocate, based on the resource adjustment information, the idle resources in the cold connection pool to the hot connection pool, so as to adjust the connection resources included in the target connection pool.
Optionally, in some possible implementation manners of the present application, the management unit is specifically configured to close an idle connection in the cold connection pool to generate the idle resource, if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value;
the management unit is specifically configured to allocate the idle resources to the hot connection pool based on the resource adjustment information, so as to adjust connection resources included in the target connection pool.
Optionally, in some possible implementation manners of the present application, the management unit is specifically configured to input the target connection to the cold connection pool to update the cold connection pool if the usage information does not satisfy the preset condition.
Optionally, in some possible implementations of the present application, the management unit is specifically configured to obtain a load value of the cold connection pool;
the management unit is specifically configured to screen out eliminated connections from the cold connection pool based on connection duration if the load value reaches the second preset value;
the management unit is specifically configured to delete the eliminated connection to update the cold connection pool.
Optionally, in some possible implementations of the present application, the management unit is specifically configured to monitor connection information of the target connection in the hot connection pool;
the management unit is specifically configured to schedule the target connection to the cold connection pool if the connection information indicates that the target connection is idle.
Optionally, in some possible implementations of the present application, the management unit is specifically configured to determine a time identifier corresponding to when the target connection is input into the cold connection pool;
the management unit is specifically configured to configure a closing order for the target connection based on the time identifier.
A third aspect of the present application provides a computer device comprising: a memory, a processor, and a bus system; the memory is used for storing program codes; the processor is configured to execute the network connection management method according to any one of the first aspect and the first aspect according to instructions in the program code.
A fourth aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the network connection management method of the first aspect or any one of the first aspects.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the network connection management method provided in the first aspect or the various alternative implementations of the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
obtaining usage information of a target connection by inputting a request of the target connection pool in response to the target connection, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, the connection resources in the cold connection pool can be managed when the target connection is connected into the hot connection pool, and the connection resources in the cold connection pool are connected in an inactive mode, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a diagram of a network architecture in which a network connection management system operates;
fig. 2 is a flowchart of a network connection management according to an embodiment of the present application;
fig. 3 is a flowchart of a method for managing network connection based on a connection pool according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for managing network connection based on a connection pool according to an embodiment of the present application;
fig. 5 is a flowchart of another method for managing network connections based on connection pools according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of another method for managing network connections based on connection pools according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a network connection management apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a network connection management method based on a connection pool and a related device, which can be applied to a system or a program containing a network connection management function in terminal equipment, and can obtain the use information of a target connection by responding to a request of inputting the target connection pool by the target connection, wherein the target connection pool comprises a hot connection pool and a cold connection pool; if the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, the connection resources in the cold connection pool can be managed when the target connection is connected into the hot connection pool, and the connection resources in the cold connection pool are connected in an inactive mode, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some nouns that may appear in the embodiments of the present application are explained.
Long connection: after the request of the client and the server is completed, the client does not close the connection, but directly multiplexes the previous connection to transmit and receive data when the next request of the server is made. The connection time of the client and the server is reduced through long connection, and the user experience is improved.
TCP connect three-way handshake: the client and the server are connected, three-time connection communication is needed, the three-time handshake is commonly called, and only after the three-time handshake is completed, the client and the server can start to communicate and send data after the connection is established.
Cloud acceleration reverse proxy server: in a cloud server scenario, there is a proxy server that receives a client request and initiates a request as a proxy to a target server. For example, the Wangcai flow-free service can avoid flow only when the network link of the agent is walked, and the agent requests real server resources.
It should be understood that the network connection management method provided by the present application may be applied to a system or a program including a network connection management function in a terminal device, for example, a kernel application of HTML5, and specifically, the network connection management system may operate in a network architecture as shown in fig. 1, please refer to fig. 1, which illustrates a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a terminal device 10, a reverse proxy server 20 and a target server 30.
The above-described terminal device 10 may request a service from the target server 30 through the network. The terminal device 10 may be a terminal such as a mobile phone, a tablet Computer, a PC (Personal Computer), a desktop Computer, or a server, which is not limited in this embodiment of the present application.
Optionally, the terminal device 10 described above includes more than one.
The reverse proxy server 20 may communicate with the terminal device 10 and the target server 30, respectively, through a wireless network, and relay information between the terminal device 10 and the target server 30 to achieve communication between the terminal device 10 and the target server 30.
In the embodiment of the present application, the reverse proxy server 20 is further configured to manage a connection pool in which a plurality of connections exist. The reverse proxy server 20, upon receiving the request transmitted by the terminal device 10, may select one of the connections in the connection pool to transmit the request to the target server 30.
The target server 30 may provide a service to the terminal device 100 through a network. The target server 30 may be a terminal such as a mobile phone, a tablet computer, a PC, a desktop computer, or a server, which is not limited in this embodiment of the present application.
Alternatively, the target server 30 may include more than one.
It should be noted that the terminal device 10 and the target server 30 are located in two different regions. That is, the terminal device 10 and the target server 30 are located in two different geographical location areas with a distance therebetween. Alternatively, the terminal device 10 and the target server 30 may be located in two different cities in one country, or may be located in two different countries, which is not limited in this embodiment of the present application. When the terminal device 10 and the target server 30 are located in two different regions, especially in two different countries, the problem of high request delay is easily caused if the short connection method is adopted because of the long distance.
In addition, the server related in this embodiment of the present application may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content delivery network), and a big data and artificial intelligence platform, which is not limited in this embodiment of the present application.
The Cloud technology (Cloud technology) is a hosting technology for unifying series resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data of different levels are processed separately, and various industry data need strong system background support, wherein the application of agent service is involved.
With the popularization and development of network technology and computers, proxy services are becoming more forms of online application. The proxy service is that an internal network sends a connection request to the internet, and the proxy service needs to be formulated to send the HTTP which is directly transmitted to the web server to the proxy server. In the reverse proxy service in the cloud scenario, the reverse proxy server generally proxies different long connection requests of various terminals and various service scenarios.
In general, the process of long connection management is to configure a connection pool for managing long connections, which is a first-in first-out connection pool with a fixed maximum. A free long connection can enter the connection pool, and when the connection in the connection pool reaches the maximum value, the free connection which enters the connection pool firstly is squeezed out and closed, so that the load stability of the connection pool is ensured.
However, in the connection selection of the network service, a situation that a link which needs to be connected currently is closed may occur, which causes a situation of connection failure and affects the stability of the network connection management process.
In order to solve the above problem, the present application proposes a connection pool-based network connection management method, which is applied in the flow framework of network connection management shown in fig. 2, as shown in fig. 2, for the flow framework of network connection management provided in the embodiment of the present application, a target connection pool in a reverse proxy server is divided into a hot connection pool and a cold connection pool for network connection management, where the hot connection pool is used for managing active connection resources, and the cold connection pool is used for managing inactive connection resources (e.g. connection resources that are not connected for a long time); and the connection resources between the hot connection pool and the cold connection pool can be dynamically switched, for example, when the connection resources in the hot connection pool are inactive, the connection resources are moved into the cold connection pool, or when the connection resources in the cold connection pool are active, the connection resources are moved into the hot connection pool; in addition, the closing of the connection can only be performed by the cold connection pool, thereby ensuring the orderliness of the connection closing. It can be understood that the connection resource in this embodiment is a long connection resource, that is, sequential network connection management needs to be performed to ensure that a service corresponding to a long connection is performed normally.
In a possible scenario, when a cloud server (reverse proxy server) is started, the number of long connections supported by the cloud server is configured according to the connection resource condition of the cloud server. The server maintains the long connection quantity of the terminal configuration quantity at most, and redundant connection resources are closed if the long connection quantity exceeds the long connection quantity, so that the system is prevented from being crushed. Initializing two connection pools when starting initialization, wherein the total number of long connections which can be cached by the two pools is fixed; while at initialization, the number of cold connection pools is allocated in a 3 to 1 ratio to the hot connection pools, since the generally active long connections are in the minority.
Specifically, the distribution ratio of the number of the cold connection pools to the number of the hot connection pools may be set according to the ratio of the access number of the target connection pool to the active connection in a period of time, and the specific distribution ratio is determined according to an actual scene and is not limited herein.
In addition, when a new connection is accessed, intelligent prejudgment based on the activity of the use information can be carried out on the new connection, so that whether the hot connection pool or the cold connection pool is input is judged, the hierarchical management of the connection access is realized, and the connection closing sequence is ensured by setting the closing permission of the cold connection pool.
It can be understood that the method provided by the present application may be a program written as a processing logic in a hardware system, or may be a network connection management device, and the processing logic is implemented in an integrated or external manner. As one implementation, the network connection management apparatus obtains usage information of a target connection by inputting a request of a target connection pool in response to the target connection, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, the connection resources in the cold connection pool can be managed when the target connection is connected into the hot connection pool, and the connection resources in the cold connection pool are connected in an inactive mode, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.
With reference to the above flow architecture, the following will describe a network connection management method in the present application, please refer to fig. 3, where fig. 3 is a flow chart of a network connection management method based on a connection pool according to an embodiment of the present application, where the management method may be executed by a reverse proxy server, and the embodiment of the present application at least includes the following steps:
301. and responding to a request of inputting the target connection pool by the target connection, and acquiring the use information of the target connection.
In this embodiment, the target connection pool includes a hot connection pool and a cold connection pool; for the specific dividing process, reference is made to the description in fig. 2, which is not described herein again.
It is understood that the dividing of the hot connection pool and the cold connection pool may be performed during the initialization of the reverse proxy server; or instant division can be performed in response to the setting of the user in the operation process of the reverse proxy server, and at this time, the connection resources contained in the original connection pool corresponding to the reverse proxy server are judged based on the network connection management method of the application, and the corresponding hot connection pool or cold connection pool is input.
Specifically, the target connection may be a connection that has been accessed to the target connection pool, and at this time, the usage information of the target connection may be determined by a connection record corresponding to the usage information of the target connection, specifically, the connection record of the target connection in the target connection pool is obtained in response to a request that the target connection inputs into the target connection pool; the number of multiplexes in the connection record is then extracted: next, usage information for the target connection is determined based on the number of multiplexes. The number of times of multiplexing in the connection record, that is, the number of times of accessing the target connection pool by the target connection, may be counted as one of the hot connection pool and the cold connection pool, for example, the number of times of entering the hot connection pool; the count of the number of times may be set based on the sum of accesses of the hot connection pool and the cold connection pool, thereby comprehensively reflecting the access situation of the target connection.
In a possible scenario, the target connection of the present application is a long connection, that is, the client and the reverse proxy server need to keep information interaction; and the target TCP connection needs three-way handshake in the process of establishing the long connection, and at this time, if the condition of accessing the target connection pool is involved, the condition can be ignored, that is, the access condition after the connection is successful is taken as the standard, so that the accuracy of data is ensured.
It should be noted that since the long connection process is a dynamic request process, the determination of the usage information may also be dynamically updated, i.e. the occurrence of a service request is monitored in real time for each connection in the target connection pool, so as to update its usage information, which is entered into the hot connection pool when it reaches the input criteria of the hot connection pool, and into the cold connection pool otherwise.
302. If the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool;
in this embodiment, the preset condition is to indicate whether the usage information of the target connection meets the input standard of the hot connection pool; for example, the preset condition may be that the target connection pool access frequency is greater than 50, and if the usage information of the target connection indicates that the target connection pool access frequency is greater than 50, the input criterion of the hot connection pool is satisfied, and the hot connection pool is input.
It is understood that, in order to ensure the management efficiency of the hot connection pool, an upper capacity limit, i.e., an upper limit of the number of connection resources (a first preset value) included in the hot connection pool, may be set for the hot connection pool. In this scenario, when the target connection is input into the hot connection pool, and the load capacity of the hot connection pool does not reach the upper limit, the target connection is directly input into the hot connection pool and corresponding service connection is performed. When the target connection is input into the hot connection pool, the load capacity of the hot connection pool reaches the upper limit, and since the total load capacity of the target connection pool is a fixed value, the resources need to be allocated from the cold connection pool, for example, one connection resource in the cold connection pool is closed, and the connection resource is converted into the connection resource of the hot connection pool for the target connection input. Therefore, the network access management of the hot connection pool and the cold connection pool in the application is a dynamic management process, namely adaptive capacity allocation is carried out on the basis of the activity of actual input connection, so that the sequence of closing the long connection of the network is ensured, and the stability of connection access is also ensured.
Optionally, when the usage information does not satisfy the preset condition, the target connection may be input to the cold connection pool to update the cold connection pool. The target connection entered into the cold connection pool may also establish a corresponding service connection, but the normal long connection service process is not affected, as compared to the case where the connection in the hot connection pool is closed with a higher probability or earlier in the closing sequence.
It can be understood that, due to the capacity limitation of the target connection pool, there is also a load limitation for the cold connection pool, that is, when the target connection is input into the cold connection pool, the load value of the cold connection pool is obtained; if the load value reaches a second preset value (the upper limit of the capacity of the cold connecting pool), screening out eliminated connections from the cold connecting pool based on the connection duration; and deleting the eliminated connection to update the cold connection pool. The screening of the eliminated connection can be the connection with the longest unused time, or a closing sequence table is maintained in the screening cold connection pool, and the closing sequence table is set based on the sequence of the connection input into the cold connection pool, namely, the connection input into the cold connection pool is earlier in the closing sequence table, and once the connection is used, the connection is automatically adjusted to the last in the closing sequence table, so that the dynamic management in the closing sequence table and the dynamic setting of the eliminated connection are carried out, the condition that the eliminated connection is the connection to be used is avoided, and the stability of network connection management is improved.
303. And determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool.
In this embodiment, the resource adjustment information is related to connection resources included in the cold connection pool, and the resource adjustment information is connection resources required by the hot connection pool, for example, if the connection resources of the hot connection pool are sufficient, the resource adjustment information indicates that regulation and control of the cold connection pool are not needed; and if the hot connection pool is lack of connection resources, the resource adjustment information indicates that the cold connection pool is required to regulate and control the connection resources and corresponding parameters of access connection, so that access of the connection resources is obtained from regulation and control of the cold connection pool, the regulation and control process of the connection resources can be realized without secondary feedback of the cold connection pool, and the resource regulation and control efficiency is improved.
It can be understood that, the connection resources included in the target connection pool are adjusted, that is, when the load capacity in the target connection pool reaches the upper limit, the inactive connection is closed and a new connection is added on the basis that the load capacity of the target connection pool is not changed; or the joining of a new connection when the load capacity in the target connection pool is not full.
In particular, the process of adjusting connection resources contained in the target connection pool involves scheduling connection resources of the hot connection pool and the cold connection pool, and the scheduling occurs in relation to the load condition of the cold connection pool of the hot connection pool. Firstly, determining corresponding resource adjustment information when a hot connection pool is updated; then acquiring a load value of the thermal connection pool; and when the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, allocating the idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool. When the hot connection pool reaches the upper load limit and the cold connection pool does not reach the upper load limit, unallocated connection resources (idle resources) in the cold connection pool are directly allocated to the hot connection pool, so that connection services in the hot connection pool are guaranteed.
In another possible scenario, if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool reaches a second preset value, closing idle connection in the cold connection pool to generate idle resources; and allocating free resources to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool. Namely, when the hot connection pool reaches the upper load limit and the cold connection pool also reaches the upper load limit, the connection resources which are not connected for a long time in the cold connection pool are closed, and then the connection interfaces are distributed to the hot connection pool so as to ensure the connection service in the hot connection pool.
Through the dynamic scheduling of the hot connection pool and the cold connection pool, the smooth execution of the access connection can be ensured, and the connection which is possibly executed cannot be closed.
Furthermore, the time consumption of the dynamic scheduling process is considered, and the efficiency of the network connection management process is improved. Real-time connection inspection can be carried out, namely, connection information of a target connected in the hot connection pool is monitored; and if the connection information indicates that the target connection is idle, scheduling the target connection to the cold connection pool. Therefore, the space of the thermal connection pool is intelligently vacated, and the time consumption caused by dynamic scheduling is saved.
It can be understood that when the target identifier is input into the cold connection pool, the corresponding time identifier when the target connection is input into the cold connection pool can also be determined; and configuring a closing order for the target connection based on the time stamp. This is to ensure the accuracy of the closing sequence in the cold junction cells.
In a possible scenario, the process of connection access may refer to the decision flow shown in fig. 4, and fig. 4 is a schematic flow chart of a network connection management method based on a connection pool according to an embodiment of the present disclosure. For new connection, firstly, acquiring the use information of the new connection, wherein the use information is updated in real time and can be an accumulated numerical value; and then judging whether the use information meets a hot connection standard, if so, entering a hot connection pool, judging the upper limit of the capacity of the hot connection pool, if not, completing access and providing corresponding business service, and if so, reducing the capacity of a cold connection pool to achieve the aim of accessing the target connection pool.
And if the capacity of the cold connection pool reaches the upper limit, the aim of accessing the target connection pool is fulfilled by closing idle connection (old connection) in the cold connection pool.
In summary, the setting of the entry criteria for the thermal connection pool may include: 1. for the connection of the cold connection pool, the cold connection pool can enter the hot connection pool after being heated for many times; 2. if a new connection is inferred to be a potentially active connection, the hot pool may be entered directly. Accordingly, the exit criteria for a hot connection pool may include: 1. the connection is cooled after overtime and then is withdrawn from the hot connection pool; 2. determining that the cold connection pool enters after exiting based on the usage information; 3. the connection is closed after the connection is input into the cold connection pool and is judged to be eliminated.
In addition, the setting of the entry criteria for the cold connection pool may include: 1. inputting a cold connection pool for a first idle connection request; 2. if the cold connection pool is full of capacity, the newly entered connection closes the oldest idle connection in the cold connection pool; 3. when the capacity of the cold connection pool is enough, the long connection is withdrawn if overtime happens; when the cold connection pool capacity is not sufficient, the newly entered connection will close the oldest long connection. Thereby ensuring the dynamic balance of the capacity of the target connection pool.
With reference to the foregoing embodiments, obtaining usage information of a target connection by inputting a request for the target connection into a target connection pool in response to the target connection, where the target connection pool includes a hot connection pool and a cold connection pool; if the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, the connection resources in the cold connection pool can be managed when the target connection is connected into the hot connection pool, and the connection resources in the cold connection pool are connected in an inactive mode, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.
The above embodiments describe a network connection management process based on usage information of a connection, and in some scenarios, the acquisition of the usage information is also related to a service scenario corresponding to the connection, which is described below. Referring to fig. 5, fig. 5 is a flowchart of another network connection management method based on a connection pool according to an embodiment of the present application, which may be executed by a reverse proxy server, where the embodiment of the present application at least includes the following steps:
501. and acquiring a target service corresponding to the target connection.
In this embodiment, the target service corresponding to the target connection may be obtained by analyzing a domain name, that is, each target service corresponds to an associated domain name, and the corresponding target connection may be obtained based on the domain name, and in the execution process of the target service, the corresponding target connection is generally in a service connection state, so that the usage information of the corresponding target connection may be reflected by statistics of hot connection data (scene connection parameters) of the target service; in addition, for the connection of the new input target connection pool, the current use information may not meet the standard of the hot connection pool, but the corresponding service is an active service, and other connections in the service have an active state, so that the misjudgment of the connection of the new input target connection pool can be avoided from the viewpoint of connecting the corresponding service, and the situations of inputting a cold connection pool and closing can be caused.
Specifically, a domain name corresponding to a target connection is determined in response to a request that the target connection is input into a target connection pool, so as to determine a target service; then extracting scene connection parameters of the target service based on the connection indexes; and then determining the use information of the target connection according to the scene connection parameters. Therefore, the use information corresponding to the target connection is obtained from the dimension of the service scene so as to judge the access of the connection pool.
502. And determining scene connection parameters of the target service.
In this embodiment, the scene connection parameter may be determined based on the connection information, that is, a service connection set corresponding to the target service is determined based on the connection index; then determining connection information of the connection in the service connection set within a preset time period; and then determining scene connection parameters of the target service according to the connection information. The connection information includes connection times and connection behavior intervals, that is, the total connection times of the target connection pool in all connections corresponding to the target service, and an average time interval between adjacent connection behaviors.
Optionally, the connection times and the connection behavior intervals adopt different dimensions to describe the connection scenario of the target service, and the connection scenario can be weighted uniformly to facilitate the judgment of the hot connection. Firstly, determining weight information corresponding to connection times and connection behavior intervals; and then weighting based on the weight information to determine scene connection parameters of the target service. For example, a scene connection parameter is set to 0.8+ 0.2.
It is to be understood that the specific weight setting may be adjusted based on the description accuracy of the connection scenario of the target service, and is not limited herein.
503. A target connection input hot connection pool is determined based on the context connection parameters.
In this embodiment, after determining the target service of the target connection, it is possible to determine whether to input the target connection into the hot connection pool. Specifically, if the weighted value of the scene connection parameter in step 502 is greater than the hot connection threshold, the target connection is input into the hot connection pool.
It is understood that the scheduling process of the cold connection pool after the hot connection pool is input is similar to steps 302 and 303 of the embodiment shown in fig. 3, and related features may be referred to, which are not described herein again.
In a possible scenario, since the scene connection parameter of the target service is determined based on a plurality of connections, during the determination process of inputting each connection into the target connection pool, the scene connection parameter of the target service may also be updated based on the usage information of the connection, for example, after connection 1 in the target service accesses the target connection pool, the scene connection parameter corresponding to the target service is recorded by adding one to the connection number.
Specifically, a process of updating a scene connection parameter of a target service is shown in fig. 6, where fig. 6 is a schematic flow diagram of another network connection management method based on a connection pool according to an embodiment of the present application. In the figure, when the connection is input, on one hand, the scene connection information can be determined according to the target service, and then the hot connection standard is determined, especially for the connection newly added to the target connection pool, the other connection of the corresponding target service may have already established connection in the target connection pool, so that the use probability of the connection newly added to the target connection pool can be reflected.
In addition, for other connections in the target service, the scene connection information is updated based on the real-time connection condition, the specific update item comprises the connection times and the connection interval, and the scene connection information can be obtained by performing weighted calculation on the connection times and the connection interval, so that the dynamic scene connection information judgment process is realized, and the accuracy of the scene connection information and the accuracy of the use information are ensured.
In the embodiment, through the two-stage connection pool, the hot long connection is guaranteed not to be washed away by the cold connection, and meanwhile, the hot degree of each scene is scored (scene connection information) by counting the historical use condition of the connection of each service scene, so that the new connection of the service scene can well enter the hot connection pool, and the probability of being closed is avoided.
In order to better implement the above-mentioned aspects of the embodiments of the present application, the following also provides related apparatuses for implementing the above-mentioned aspects. Referring to fig. 7, fig. 7 is a schematic structural diagram of a network connection management apparatus according to an embodiment of the present application, where the network connection management apparatus 700 includes:
an obtaining unit 701, configured to obtain usage information of a target connection in response to a request that the target connection inputs into a target connection pool, where the target connection pool includes a hot connection pool and a cold connection pool;
an input unit 702, configured to input the target connection into the hot connection pool to update the hot connection pool if the usage information satisfies a preset condition;
a management unit 703 is configured to determine resource adjustment information corresponding to updating of the hot connection pool, so as to adjust connection resources included in the target connection pool, where the resource adjustment information is related to connection resources included in the cold connection pool.
Optionally, in some possible implementation manners of the present application, the obtaining unit 701 is specifically configured to, in response to a request that a target connection is input into a target connection pool, obtain a connection record of the target connection in the target connection pool;
the obtaining unit 701 is specifically configured to extract the multiplexing times in the connection record:
the obtaining unit 701 is specifically configured to determine the usage information of the target connection based on the multiplexing times.
Optionally, in some possible implementation manners of the present application, the obtaining unit 701 is specifically configured to determine, in response to a request that a target connection inputs into a target connection pool, a domain name corresponding to the target connection, so as to determine a target service;
the obtaining unit 701 is specifically configured to extract a scene connection parameter of the target service based on a connection index, where the scene connection parameter is used to indicate usage information corresponding to a connection included in the target service;
the obtaining unit 701 is specifically configured to determine the usage information of the target connection according to the scene connection parameter.
Optionally, in some possible implementation manners of the present application, the obtaining unit 701 is specifically configured to determine, based on the connection index, a service connection set corresponding to the target service;
the obtaining unit 701 is specifically configured to determine connection information of a connection in the service connection set within a preset time period, where the connection information includes connection times and connection behavior intervals;
the obtaining unit 701 is specifically configured to determine the scene connection parameter of the target service according to the connection information.
Optionally, in some possible implementation manners of the present application, the obtaining unit 701 is specifically configured to determine the connection times and weight information corresponding to the connection behavior intervals;
the obtaining unit 701 is specifically configured to perform weighting based on the weight information to determine the scene connection parameter of the target service.
Optionally, in some possible implementation manners of the present application, the management unit 703 is specifically configured to determine resource adjustment information corresponding to the update of the hot connection pool;
the management unit 703 is specifically configured to obtain a load value of the hot connection pool;
the management unit 703 is specifically configured to, if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, allocate, based on the resource adjustment information, the idle resources in the cold connection pool to the hot connection pool, so as to adjust the connection resources included in the target connection pool.
Optionally, in some possible implementation manners of the present application, the management unit 703 is specifically configured to close an idle connection in the cold connection pool to generate the idle resource, if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value;
the management unit 703 is specifically configured to allocate the idle resources to the hot connection pool based on the resource adjustment information, so as to adjust connection resources included in the target connection pool.
Optionally, in some possible implementation manners of the present application, the management unit 703 is specifically configured to input the target connection to the cold connection pool to update the cold connection pool if the usage information does not satisfy the preset condition.
Optionally, in some possible implementation manners of the present application, the management unit 703 is specifically configured to obtain a load value of the cold connection pool;
the management unit 703 is specifically configured to, if the load value reaches the second preset value, screen out obsolete connections from the cold connection pool based on connection duration;
the management unit 703 is specifically configured to delete the eliminated connection, so as to update the cold connection pool.
Optionally, in some possible implementations of the present application, the management unit 703 is specifically configured to monitor connection information of the target connection in the hot connection pool;
the management unit 703 is specifically configured to schedule the target connection to the cold connection pool if the connection information indicates that the target connection is idle.
Optionally, in some possible implementation manners of the present application, the management unit 703 is specifically configured to determine a time identifier corresponding to when the target connection is input into the cold connection pool;
the management unit 703 is specifically configured to configure a closing order for the target connection based on the time identifier.
Obtaining usage information of a target connection by inputting a request of the target connection pool in response to the target connection, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the use information meets the preset condition, inputting the target connection into the hot connection pool to update the hot connection pool; and then determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool. Therefore, the intelligent management process of the connection resources in the target connection pool is realized, the connection resources in the cold connection pool can be managed when the target connection is connected into the hot connection pool, and the connection resources in the cold connection pool are connected in an inactive mode, so that the connection closing sequence is ensured, the condition that a link needing to be connected is closed is avoided, and the stability of the network connection management process is improved.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a server provided in this embodiment, where the server 800 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 822 (e.g., one or more processors) and a memory 832, and one or more storage media 830 (e.g., one or more mass storage devices) storing applications 842 or data 844. Memory 832 and storage medium 830 may be, among other things, transient or persistent storage. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, a central processor 822 may be provided in communication with the storage medium 830 for executing a series of instruction operations in the storage medium 830 on the server 800.
The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input-output interfaces 858, and/or one or more operating systems 841, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The steps performed by the management apparatus in the above-described embodiment may be based on the server configuration shown in fig. 8.
Also provided in the embodiments of the present application is a computer-readable storage medium, which stores network connection management instructions and when the computer-readable storage medium is executed on a computer, causes the computer to perform the steps performed by the network connection management apparatus in the methods described in the foregoing embodiments shown in fig. 2 to 6.
Also provided in the embodiments of the present application is a computer program product including network connection management instructions, which when run on a computer, causes the computer to perform the steps performed by the network connection management apparatus in the method described in the foregoing embodiments shown in fig. 2 to 6.
Embodiments of the present application further provide a network connection management system, where the network connection management system may include the network connection management apparatus in the embodiment described in fig. 7 or the server described in fig. 8.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a network connection management apparatus, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. A network connection management method based on a connection pool is characterized by comprising the following steps:
responding to a request of inputting a target connection pool by a target connection, and acquiring use information of the target connection, wherein the target connection pool comprises a hot connection pool and a cold connection pool;
if the use information meets a preset condition, inputting the target connection into the hot connection pool to update the hot connection pool;
and determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool.
2. The method of claim 1, wherein the obtaining usage information of the target connection in response to the request for the target connection to enter the target connection pool comprises:
responding to a request of inputting a target connection pool by target connection, and acquiring a connection record of the target connection in the target connection pool;
extracting the multiplexing times in the connection record:
and determining the use information of the target connection based on the multiplexing times.
3. The method of claim 1, wherein the obtaining usage information of the target connection in response to the request for the target connection to enter the target connection pool comprises:
responding to a request of inputting a target connection into a target connection pool by the target connection, and determining a domain name corresponding to the target connection so as to determine a target service;
extracting scene connection parameters of the target service based on connection indexes, wherein the scene connection parameters are used for indicating use information corresponding to connection contained in the target service;
and determining the use information of the target connection according to the scene connection parameters.
4. The method of claim 3, wherein the extracting scene connection parameters of the target service based on the connection index comprises:
determining a service connection set corresponding to the target service based on the connection index;
determining connection information of a connection in the service connection set within a preset time period, wherein the connection information comprises connection times and connection behavior intervals;
and determining the scene connection parameters of the target service according to the connection information.
5. The method of claim 4, wherein the determining the scene connection parameter of the target service according to the connection information comprises:
determining weight information corresponding to the connection times and the connection behavior intervals;
and weighting based on the weight information to determine the scene connection parameters of the target service.
6. The method according to claim 1, wherein the determining resource adjustment information corresponding to the update of the hot connection pool to adjust connection resources included in the target connection pool comprises:
determining corresponding resource adjustment information when the hot connection pool is updated;
acquiring a load value of the hot connection pool;
and if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, allocating the idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool.
7. The method of claim 6, further comprising:
if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value, closing idle connection in the cold connection pool to generate the idle resources;
and allocating the free resources to the hot connection pool based on the resource adjustment information so as to adjust the connection resources contained in the target connection pool.
8. The method according to any one of claims 1-7, further comprising:
and if the use information does not meet the preset condition, inputting the target connection into the cold connection pool so as to update the cold connection pool.
9. The method of claim 8, further comprising:
acquiring a load value of the cold connection pool;
if the load value reaches the second preset value, screening out eliminated connections from the cold connection pool based on connection duration;
and deleting the eliminated connection so as to update the cold connection pool.
10. The method according to any one of claims 1-7, further comprising:
monitoring connection information of the target connection in the hot connection pool;
and if the connection information indicates that the target connection is idle, scheduling the target connection to the cold connection pool.
11. The method of claim 10, further comprising:
determining a corresponding time identifier when the target connection is input into the cold connection pool;
configuring a close order for the target connection based on the time identification.
12. The method of claim 1, wherein the target connection is a long connection, and wherein the long connection is used to provide reverse proxy services.
13. A network connection management apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for responding to a request that a target connection inputs a target connection pool and acquiring the use information of the target connection, and the target connection pool comprises a hot connection pool and a cold connection pool;
the input unit is used for inputting the target connection into the hot connection pool to update the hot connection pool if the use information meets a preset condition;
and the management unit is used for determining corresponding resource adjustment information when the hot connection pool is updated so as to adjust the connection resources contained in the target connection pool, wherein the resource adjustment information is related to the connection resources contained in the cold connection pool.
14. A computer device, the computer device comprising a processor and a memory:
the memory is used for storing program codes; the processor is configured to execute the network connection management method according to any one of claims 1 to 12 according to instructions in the program code.
15. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the network connection management method of any of the preceding claims 1 to 12.
CN202011091016.XA 2020-10-13 2020-10-13 Network connection management method based on connection pool and related device Pending CN114422565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011091016.XA CN114422565A (en) 2020-10-13 2020-10-13 Network connection management method based on connection pool and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011091016.XA CN114422565A (en) 2020-10-13 2020-10-13 Network connection management method based on connection pool and related device

Publications (1)

Publication Number Publication Date
CN114422565A true CN114422565A (en) 2022-04-29

Family

ID=81260643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011091016.XA Pending CN114422565A (en) 2020-10-13 2020-10-13 Network connection management method based on connection pool and related device

Country Status (1)

Country Link
CN (1) CN114422565A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344366A (en) * 2022-08-10 2022-11-15 中电金信软件有限公司 Connection pool object switching method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344366A (en) * 2022-08-10 2022-11-15 中电金信软件有限公司 Connection pool object switching method and device, electronic equipment and readable storage medium
CN115344366B (en) * 2022-08-10 2023-10-31 中电金信软件有限公司 Connection pool object switching method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
KR102154446B1 (en) Method for fast scheduling for resource balanced allocation on distributed and collaborative container platform environment
US9571347B2 (en) Reactive auto-scaling of capacity
JP2021516395A (en) Resource configuration method, equipment, terminals, and storage media
US20230300203A1 (en) Data processing method and system, related device, storage medium, and product
CN110990138B (en) Resource scheduling method, device, server and storage medium
Nithya et al. SDCF: A software-defined cyber foraging framework for cloudlet environment
CN102591921A (en) Scheduling and management in a personal datacenter
CN111224806A (en) Resource allocation method and server
CN102281190A (en) Networking method for load balancing apparatus, server and client access method
JPWO2007072544A1 (en) Information processing apparatus, computer, resource allocation method, and resource allocation program
US8799474B2 (en) Apparatus and method to allocate limited resources
CN110247856A (en) Server resource method for releasing and device
CN111078404B (en) Computing resource determining method and device, electronic equipment and medium
CN111131841A (en) Live indirect access method and device, electronic equipment and storage medium
Ma et al. Dynamic task scheduling in cloud-assisted mobile edge computing
KR20160147927A (en) Optimizing capacity expansion in a mobile network
CN112600761A (en) Resource allocation method, device and storage medium
CN114422565A (en) Network connection management method based on connection pool and related device
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN112286930A (en) Method, device, storage medium and electronic equipment for resource sharing of redis business side
CN115484167B (en) Network slice shutdown method in communication network, computer device and storage medium
CN111124669A (en) Operation method, system, terminal and storage medium of distributed SaaS software
CN114402313A (en) Label updating method and device, electronic equipment and storage medium
CN112448833A (en) Multi-management-domain communication method and device
CN113271228B (en) Bandwidth resource scheduling method, device, equipment and computer readable storage medium

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