CN111431735B - Method, device and apparatus for managing connection pool and storage medium - Google Patents

Method, device and apparatus for managing connection pool and storage medium Download PDF

Info

Publication number
CN111431735B
CN111431735B CN202010123968.9A CN202010123968A CN111431735B CN 111431735 B CN111431735 B CN 111431735B CN 202010123968 A CN202010123968 A CN 202010123968A CN 111431735 B CN111431735 B CN 111431735B
Authority
CN
China
Prior art keywords
service
connection pool
connection
service system
internet protocol
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.)
Active
Application number
CN202010123968.9A
Other languages
Chinese (zh)
Other versions
CN111431735A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010123968.9A priority Critical patent/CN111431735B/en
Publication of CN111431735A publication Critical patent/CN111431735A/en
Application granted granted Critical
Publication of CN111431735B publication Critical patent/CN111431735B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a management method, equipment, a device and a storage medium of a connection pool, wherein the method comprises the steps of acquiring an internet protocol address and a port of the connection pool, allocating the internet protocol address and the port of the connection pool to a service system, acquiring idle connection from the connection pool when receiving a service request sent by the service system according to the internet protocol address and the port of the connection pool, allocating the idle connection to the service system, and performing management link by using the internet protocol address and the port to avoid management confusion of a production environment; and monitoring whether the operation of the deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal, sending alarm information to a target terminal when the deployed asynchronous network communication engine Swoole service process corresponding to the service system is abnormal, monitoring the connection pool based on the operation and maintenance of the pedestal, timely discovering the abnormal process and reducing service risks.

Description

Method, device and apparatus for managing connection pool and storage medium
Technical Field
The invention relates to the technical field of pedestal operation and maintenance, in particular to a method, equipment, a device and a storage medium for managing a connection pool.
Background
In the traditional connection pool management, operation and maintenance personnel check the service operation condition at a production server and observe different servers, so that the operation state of each instance in the distributed cluster is obtained. More automatically, engineers write unified scripts to deploy and view the server-like objects of each instance. In the two management states, the service cannot be accurately judged, data delay exists, and the influence on the service cannot be timely stopped.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, equipment, a device and a storage medium for managing a connection pool, and aims to solve the technical problem that the timeliness of connection pool management in the prior art is poor.
In order to achieve the above object, the present invention provides a method for managing a connection pool, including the steps of:
acquiring an internet protocol address and a port of a connection pool, and distributing the internet protocol address and the port of the connection pool to a service system;
when a service request sent by the service system according to the Internet protocol address of the connection pool and the port is received, acquiring idle connection from the connection pool, and distributing the idle connection to the service system;
monitoring whether the operation of a deploying asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal;
and when the service process of the asynchronous network communication engine Swoole deployed corresponding to the service system is abnormal, sending alarm information to a target terminal.
Preferably, after sending the alarm information to the target terminal when the dispatch asynchronous network communication engine zooole service process corresponding to the service system is abnormal, the method for managing the connection pool further includes:
acquiring a service running log corresponding to the service request;
identifying whether the operation log is abnormal or not according to the operation log to obtain an identification result;
and sending the identification result to the target terminal.
Preferably, the identifying whether there is an abnormality according to the operation log to obtain an identification result includes:
extracting a server internet protocol address and an error reporting reason from the running log;
and identifying whether the target service is abnormal or not according to the server Internet protocol address and the error reporting reason, and obtaining an identification result.
Preferably, after the obtaining of the operation log of the service corresponding to the service request, the method for managing the connection pool further includes:
and extracting the running state of each service from the running log, and displaying the running state on a display interface.
Preferably, the extracting the operation state of each service from the operation log and displaying the operation state on a display interface includes:
extracting the running state of each service from the running log, and searching a corresponding grade color according to the running state;
and displaying the running state on a display interface in the grade color.
Preferably, after the operation status of each service is extracted from the operation log and displayed on a display interface, the method for managing the connection pool further includes:
when an access request of a user is received, extracting a user identification of the user from the access request;
judging whether the user identification meets the access authority corresponding to the access request according to an authority authentication management rule;
and when the user identification meets the access right corresponding to the access request, acquiring access data corresponding to the access request, and displaying the access data.
Preferably, after acquiring the idle connection from the connection pool and allocating the idle connection to the service system, the method for managing the connection pool further includes:
acquiring service data corresponding to the service request;
encrypting the service data according to a preset asymmetric encryption algorithm and a random character string to obtain encrypted data;
and sending the encrypted data to the corresponding service system.
In addition, in order to achieve the above object, the present invention further provides a management device for a connection pool, where the management device for a connection pool includes a memory, a processor, and a management program for a connection pool stored in the memory and operable on the processor, and the management program for a connection pool is configured to implement the steps of the management method for a connection pool as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, in which a management program of a connection pool is stored, and the management program of the connection pool, when executed by a processor, implements the steps of the management method of the connection pool as described above.
In order to achieve the above object, the present invention further provides a management apparatus for a connection pool, including:
the system comprises an acquisition module, a service system and a management module, wherein the acquisition module is used for acquiring an internet protocol address and a port of a connection pool and distributing the internet protocol address and the port of the connection pool to the service system;
the allocation module is used for acquiring idle connection from the connection pool and allocating the idle connection to the service system when receiving a service request sent by the service system according to the internet protocol address of the connection pool and the port;
the monitoring module is used for monitoring whether the operation of the service process of the deployed asynchronous network communication engine Swoole corresponding to the service system in the connection pool is normal;
and the sending module is used for sending alarm information to the target terminal when the service process of the deployed asynchronous network communication engine Swoole corresponding to the service system is abnormal.
In the invention, an internet protocol address and a port of a connection pool are acquired, the internet protocol address and the port of the connection pool are allocated to a service system, when a service request sent by the service system according to the internet protocol address and the port of the connection pool is received, idle connection is acquired from the connection pool, the idle connection is allocated to the service system, and management linkage is carried out by using the internet protocol address and the port, so that management confusion of a production environment is avoided; and monitoring whether the operation of the deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal or not, sending alarm information to a target terminal when the deployed asynchronous network communication engine Swoole service process corresponding to the service system is abnormal, monitoring the connection pool based on the operation and maintenance of the base frame, timely discovering the abnormal process, improving the timeliness of abnormal data and reducing service risks.
Drawings
Fig. 1 is a schematic structural diagram of a management device of a connection pool of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for managing a connection pool according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for managing a connection pool according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a method for managing a connection pool according to the present invention;
fig. 5 is a block diagram of a first embodiment of the management apparatus for connection pools according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a management device for a connection pool of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the management device of the connection pool may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may further include a standard wired interface and a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a Non-volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
It will be appreciated by those skilled in the art that the configuration shown in fig. 1 does not constitute a limitation of the management device of the connection pool and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a management program of a connection pool.
In the management device of the connection pool shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the management device of the connection pool calls a management program of the connection pool stored in the memory 1005 through the processor 1001, and executes the management method of the connection pool provided by the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the management method of the connection pool of the present invention is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a method for managing a connection pool according to the present invention.
In a first embodiment, the method for managing the connection pool includes the following steps:
step S10: the method comprises the steps of obtaining an internet protocol address and a port of a connection pool, and distributing the internet protocol address and the port of the connection pool to a service system.
It should be understood that the execution subject of the embodiment is the management device of the connection pool, wherein the management device of the connection pool may be an electronic device such as a smart phone, a personal computer, or a server, and the embodiment is not limited thereto. The management device of the connection pool is used for realizing background management of the connection pool, increasing monitoring service of the connection pool, providing connection use to each service system based on a cluster, acquiring an Internet Protocol Address (IP Address) and a port of the connection pool, and allocating the Internet Protocol Address of the connection pool and the port to the service system, wherein the service system can be one or more.
Step S20: and when receiving a service request sent by the service system according to the Internet protocol address of the connection pool and the port, acquiring idle connection from the connection pool, and distributing the idle connection to the service system.
It is understood that the database connection pool is a method for maintaining a certain number of database connections in the internal object pool and exposing the database connection acquisition and return to the outside. And when receiving a service request sent by the service system according to the Internet protocol address of the connection pool and the port, acquiring idle connection from the connection pool, distributing the idle connection to the service system, returning the connection after the service system is used, and noticing that the connection is not closed at the moment but is recovered by the connection pool manager and is ready for the next use. Because the database connection is reused, a large amount of performance overhead caused by frequently creating and releasing the connection is avoided. On the basis of reducing system consumption, on the other hand, the stability of the system operation environment is improved, and the quantity of memory fragments and temporary database processes is reduced. In the initialization process of the database connection pool, a plurality of database connections are often created and placed in the pool for standby, and the initialization work of the connections is completed at this time. For the service request sent by the service system, the existing available connection is directly utilized, so that the time overhead of the database connection initialization and release process is avoided, and the overall response time of the system is shortened. In the implementation of a relatively complete database connection pool, the occupied connection can be forcibly withdrawn according to a preset connection occupation timeout setting. Thereby avoiding resource leaks that may occur in conventional database join operations. And on the connection address, an IP address and a port are used for management linkage, so that management confusion of a production environment is avoided.
Step S30: and monitoring whether the operation of the deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal.
It should be noted that, a service request of the service system usually has multiple processes to implement a service corresponding to the service request, and the deployed asynchronous network communication engine Swoole service process corresponding to the service system is monitored, so that in terms of a management function, functions of stopping, starting, restarting, reloading and the like of a background management and control service are implemented, running conditions of each service can be dynamically managed, timely control over service running is ensured, and service risks are reduced.
Step S40: and when the service process of the asynchronous network communication engine Swoole deployed corresponding to the service system is abnormal, sending alarm information to a target terminal.
In a specific implementation, the background management further adds a mail and short message alarm function, and when the asynchronous network communication engine Swoole service process deployed corresponding to the service system is abnormal, alarm information is sent to a target terminal, where the alarm information may include information such as the abnormal process and the error reporting reason, and the target terminal may be a smart phone of a related technician or a personal computer, so as to timely handle the abnormality of the asynchronous network communication engine Swoole service process deployed.
In the embodiment, an internet protocol address and a port of a connection pool are acquired, the internet protocol address and the port of the connection pool are allocated to a service system, when a service request sent by the service system according to the internet protocol address and the port of the connection pool is received, an idle connection is acquired from the connection pool, the idle connection is allocated to the service system, and management linkage is performed by using the internet protocol address and the port, so that management confusion of a production environment is avoided; and monitoring whether the operation of the deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal or not, sending alarm information to a target terminal when the deployed asynchronous network communication engine Swoole service process corresponding to the service system is abnormal, monitoring the connection pool based on the operation and maintenance of the base frame, timely discovering the abnormal process, improving the timeliness of abnormal data and reducing service risks.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of a method for managing a connection pool according to the present invention, and based on the first embodiment illustrated in fig. 2, a second embodiment of the method for managing a connection pool according to the present invention is provided.
In the second embodiment, after the step S40, the method further includes:
step S50: and acquiring a service running log corresponding to the service request.
It should be understood that, by performing a timing reading on the running logs on the three servers, for example, reading new contents every 5 minutes, it is determined whether a service exception exists in a Hypertext Preprocessor (PHP) application server at a server, an Oracle database, and the deployed asynchronous network communication engine swool service.
Step S60: and identifying whether the operation log is abnormal or not according to the operation log to obtain an identification result.
It can be understood that the running log comprises an error (error) log, the error log comprises information such as server IP addresses, timestamps and error reporting reasons, and the identification result can be obtained according to which server the error log can accurately locate the server has the abnormality and what abnormality occurs.
Step S70: and sending the identification result to the target terminal.
It should be noted that the identification result includes which server is abnormal and what is abnormal, and the identification result is sent to the target terminal, where the target terminal may be a smart phone of a related technician or a device such as a personal computer, so as to timely process the server and the abnormal service in which the abnormality occurs.
Further, in this embodiment, the step S60 includes:
extracting a server internet protocol address and an error reporting reason from the running log;
and identifying whether the target service is abnormal or not according to the server Internet protocol address and the error reporting reason to obtain an identification result.
It should be understood that the operation log contains information such as a server internet protocol address, a timestamp, and an error reporting reason, the server internet protocol address and the error reporting reason are extracted from the operation log, which server is abnormal is identified according to the server internet protocol address, which service is abnormal is identified according to the error reporting reason, and thus whether the target service is abnormal is identified, and the identification result is obtained.
Further, in this embodiment, after the step S50, the method further includes:
and extracting the running state of each service from the running log, and displaying the running state on a display interface.
It can be understood that the operation log includes the operation states of the services corresponding to the service system, and after the background management is performed, the operation states of the services are extracted from the operation log, so that the operation states of the services are displayed on a simple and clear interface, and management of different services by related management personnel is facilitated.
Further, in this embodiment, the extracting the running state of each service from the running log and displaying the running state on a display interface includes:
extracting the running state of each service from the running log, and searching a corresponding grade color according to the running state;
and displaying the running state on a display interface in the grade color.
It should be noted that the grade colors include green, yellow, red and the like, the green color can be used for identifying services with good running states, the yellow color can be used for identifying services with running states to be improved, the red color can be used for identifying services with abnormal running states, and the obvious green, yellow and red grade marks can enable developers to visually observe abnormal services and make judgment in time, so that the management of related managers on different services is facilitated.
Further, in this embodiment, after the extracting the running state of each service from the running log and displaying the running state on a display interface, the method further includes:
when an access request of a user is received, extracting a user identification of the user from the access request;
judging whether the user identification meets the access authority corresponding to the access request according to an authority authentication management rule;
and when the user identification meets the access right corresponding to the access request, acquiring access data corresponding to the access request, and displaying the access data.
In specific implementation, an authority authentication management function of an Access Control List (ACL) is developed for the background management system, limited developers are entitled, and maximum granularity control is performed, so that management and control of services are facilitated, and the stability of the system is guaranteed. When an access request of a user is received, the access request comprises user identification of the user, the user identification is used for distinguishing different users, each user has a unique user identification, user permissions of different users are set in the permission authentication management rule, whether the user corresponding to the user identification has the access permission corresponding to the access request or not is judged according to the permission authentication management rule, when the user identification meets the access permission corresponding to the access request, access data corresponding to the access request is obtained and displayed, the access data can be displayed on a display interface in a display mode for the user to check, and the access data corresponding to the access request can also be sent to terminal equipment of the user to display for the user to check.
In the embodiment, which server is abnormal and what is abnormal can be accurately positioned according to the operation log, so that related technicians can make a judgment in time, the abnormality can be timely processed, and the timeliness of abnormal data is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of a method for managing a connection pool according to the present invention, and the third embodiment of the method for managing a connection pool according to the present invention is provided based on the first embodiment or the second embodiment. This embodiment is explained based on the first embodiment.
In the third embodiment, after the step S20, the method further includes:
step S201: and acquiring service data corresponding to the service request.
It should be understood that, the service system may send the service request, when receiving the service request sent by the service system according to the internet protocol address of the connection pool and the port, the management device of the connection pool obtains an idle connection from the connection pool, and allocates the idle connection to the service system, where the service system in the connection pool is correspondingly configured with an asynchronous network communication engine zooole service process to process and generate the service data.
Step S202: and encrypting the service data according to a preset asymmetric encryption algorithm and a random character string to obtain encrypted data.
It is understood that, in order to ensure the security of data transmission, the service data may be encrypted, and the preset asymmetric encryption algorithm may be an RSA 128-bit encryption algorithm, or may be another asymmetric encryption algorithm. And if the random character string is generated randomly, an encryption key can be formed according to a preset asymmetric encryption algorithm and the random character string, and the service data is encrypted according to the encryption key to obtain encrypted data.
Step S203: and sending the encrypted data to the corresponding service system.
It should be noted that, the encrypted data is sent to the corresponding service system, and the service system can decrypt the encrypted data according to the corresponding decryption key, and then use the decrypted data to perform corresponding service processing.
Further, in this embodiment, the step S20 includes:
when a service request sent by the service system according to the internet protocol address of the connection pool and the port is received, judging whether the service request is safe according to a target check token;
and when the service request is safe, acquiring idle connection from the connection pool, and distributing the idle connection to the service system.
In a specific implementation, the service request includes a service check token, the service check token is extracted from the service request, the service check token is compared with the target check token, and if the service check token is consistent with the target check token, the service request is determined to be safe or not. In order to further improve the link security, the service check token is usually encrypted, and the service check token may be encrypted according to the preset asymmetric encryption algorithm and the random character string, and then the encrypted service check token is extracted from the service request, and the encrypted service check token is decrypted according to a corresponding decryption key, so as to obtain the service check token. And when the service request is safe, acquiring idle connection from the connection pool, and distributing the idle connection to the service system, thereby ensuring the link safety.
In practical application, in a background management system, more detailed rules are provided, such as operation log record monitoring, login time duration prompting, connection pool restart time notification, connection pool operation time monitoring and the like, distributed cluster services are perfected through various detailed rules, nodes can be added into a cluster in a user-defined mode, a user management function is added, and a log recording function is operated, so that the system can be used flexibly.
In this embodiment, in a secure manner, an encryption algorithm and a random character string are used for encryption, so as to ensure the security of data transmission.
In addition, an embodiment of the present invention further provides a storage medium, where a management program of a connection pool is stored on the storage medium, and the management program of the connection pool, when executed by a processor, implements the steps of the management method of the connection pool as described above.
In addition, referring to fig. 5, an embodiment of the present invention further provides a management apparatus for a connection pool, where the management apparatus for a connection pool includes:
an obtaining module 10, configured to obtain an internet protocol address and a port of a connection pool, and allocate the internet protocol address and the port of the connection pool to a service system.
It should be understood that, the management device of the connection pool implements background management of the connection pool, and also increases the monitoring service of the connection pool, and provides connection use to each service system based on a cluster, obtains an Internet Protocol Address (IP Address) and a port of the connection pool, and allocates the Internet Protocol Address of the connection pool and the port to the service system, where the service systems may be one or more.
And an allocating module 20, configured to, when receiving a service request sent by the service system according to the internet protocol address of the connection pool and the port, obtain an idle connection from the connection pool, and allocate the idle connection to the service system.
It is understood that the database connection pool is a method for maintaining a certain number of database connections in the internal object pool and exposing the database connection acquisition and return to the outside. And when receiving a service request sent by the service system according to the Internet protocol address of the connection pool and the port, acquiring idle connection from the connection pool, distributing the idle connection to the service system, returning the connection after the service system is used, and noticing that the connection is not closed at the moment but is recovered by the connection pool manager and is ready for the next use. Because the database connection is reused, a large amount of performance overhead caused by frequently creating and releasing the connection is avoided. On the basis of reducing system consumption, on the other hand, the stability of the system operation environment is improved, and the quantity of memory fragments and temporary database processes is reduced. In the initialization process of the database connection pool, a plurality of database connections are often created and placed in the pool for standby, and the initialization work of the connections is completed at this time. For the service request sent by the service system, the existing available connection is directly utilized, so that the time overhead of the database connection initialization and release process is avoided, and the overall response time of the system is shortened. In the implementation of a relatively complete database connection pool, the occupied connection can be forcibly withdrawn according to a preset connection occupation timeout setting. Thereby avoiding resource leaks that may occur in conventional database join operations. And on the connection address, an IP address and a port are used for management linkage, so that management confusion of a production environment is avoided.
And a monitoring module 30, configured to monitor whether a deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool runs normally.
It should be noted that, a service request of the service system usually has a plurality of processes to implement a service corresponding to the service request, and the deployed asynchronous network communication engine Swoole service process corresponding to the service system is monitored, so that in terms of a management function, functions of stopping, starting, restarting, reloading and the like of a background management and control service are implemented, running conditions of each service can be dynamically managed, timely control over service running is ensured, and service risks are reduced.
And the sending module 40 is configured to send alarm information to the target terminal when the dispatch asynchronous network communication engine Swoole service process corresponding to the service system is abnormal.
In a specific implementation, the background management further adds a mail and short message alarm function, and when the asynchronous network communication engine Swoole service process deployed corresponding to the service system is abnormal, alarm information is sent to a target terminal, where the alarm information may include information such as the abnormal process and the error reporting reason, and the target terminal may be a smart phone of a related technician or a personal computer, so as to timely handle the abnormality of the asynchronous network communication engine Swoole service process deployed.
In the embodiment, an internet protocol address and a port of a connection pool are acquired, the internet protocol address and the port of the connection pool are allocated to a service system, when a service request sent by the service system according to the internet protocol address and the port of the connection pool is received, an idle connection is acquired from the connection pool, the idle connection is allocated to the service system, and management linkage is performed by using the internet protocol address and the port, so that management confusion of a production environment is avoided; and monitoring whether the operation of the deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal or not, sending alarm information to a target terminal when the deployed asynchronous network communication engine Swoole service process corresponding to the service system is abnormal, monitoring the connection pool based on the operation and maintenance of the base frame, timely discovering the abnormal process, improving the timeliness of abnormal data and reducing service risks.
In an embodiment, the management apparatus of the connection pool further includes:
the obtaining module 10 is further configured to obtain an operation log of a service corresponding to the service request;
the identification module is used for identifying whether the operation log is abnormal or not according to the operation log to obtain an identification result;
the sending module 40 is further configured to send the identification result to the target terminal.
In an embodiment, the identification module is further configured to extract a server internet protocol address and a cause of error report from the operation log; and identifying whether the target service is abnormal or not according to the server Internet protocol address and the error reporting reason to obtain an identification result.
In an embodiment, the management apparatus of the connection pool further includes:
and the display module is used for extracting the running state of each service from the running log and displaying the running state on a display interface.
In an embodiment, the display module is further configured to extract an operation state of each service from the operation log, and search for a corresponding grade color according to the operation state;
and displaying the running state on a display interface in the grade color.
In an embodiment, the management apparatus of the connection pool further includes:
the device comprises an extraction module, a storage module and a processing module, wherein the extraction module is used for extracting a user identifier of a user from an access request when the access request of the user is received;
the judging module is used for judging whether the user identification meets the access authority corresponding to the access request according to an authority authentication management rule;
and the display module is used for acquiring the access data corresponding to the access request and displaying the access data when the user identifier meets the access right corresponding to the access request.
In an embodiment, the management apparatus of the connection pool further includes:
the obtaining module 10 is further configured to obtain service data corresponding to the service request;
the encryption module is used for encrypting the service data according to a preset asymmetric encryption algorithm and a random character string to obtain encrypted data;
the sending module 40 is configured to send the encrypted data to the corresponding service system.
Other embodiments or specific implementation manners of the management apparatus for a connection pool according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third and the like do not denote any order, but rather the words first, second and the like may be interpreted as indicating any order.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a Read Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, an optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A management method of a connection pool is characterized by comprising the following steps:
acquiring an internet protocol address and a port of a connection pool, and distributing the internet protocol address and the port of the connection pool to a service system;
when a service request sent by the service system according to the Internet protocol address of the connection pool and the port is received, acquiring idle connection from the connection pool, and distributing the idle connection to the service system;
monitoring whether the operation of a deployed asynchronous network communication engine Swoole service process corresponding to the service system in the connection pool is normal;
when the service process of the deployed asynchronous network communication engine Swoole corresponding to the service system is abnormal, sending alarm information to a target terminal;
wherein, after acquiring the idle connection from the connection pool and allocating the idle connection to the service system, the method further includes:
acquiring service data corresponding to the service request;
encrypting the service data according to a preset asymmetric encryption algorithm and a random character string to obtain encrypted data;
and sending the encrypted data to the corresponding service system.
2. The method for managing a connection pool as claimed in claim 1, wherein after sending the alarm information to the target terminal when the dispatch asynchronous network communication engine Swoole service process corresponding to the service system is abnormal, the method for managing a connection pool further comprises:
acquiring a service running log corresponding to the service request;
identifying whether the operation log is abnormal or not according to the operation log to obtain an identification result;
and sending the identification result to the target terminal.
3. The method for managing the connection pool according to claim 2, wherein the identifying whether the abnormality exists according to the operation log and obtaining the identification result comprises:
extracting a server internet protocol address and an error reporting reason from the running log;
and identifying whether the target service is abnormal or not according to the server Internet protocol address and the error reporting reason to obtain an identification result.
4. The method for managing the connection pool according to claim 2, wherein after the obtaining of the log of the service corresponding to the service request, the method for managing the connection pool further comprises:
and extracting the running state of each service from the running log, and displaying the running state on a display interface.
5. The method for managing the connection pool according to claim 4, wherein the extracting the running status of each service from the running log and displaying the running status on a display interface comprises:
extracting the running state of each service from the running log, and searching a corresponding grade color according to the running state;
and displaying the running state on a display interface in the grade color.
6. The method for managing the connection pool according to claim 4, wherein the method for managing the connection pool further comprises, after extracting the operation status of each service from the operation log and displaying the operation status on a display interface:
when an access request of a user is received, extracting a user identification of the user from the access request;
judging whether the user identification meets the access authority corresponding to the access request according to an authority authentication management rule;
and when the user identification meets the access right corresponding to the access request, acquiring access data corresponding to the access request, and displaying the access data.
7. A pool management apparatus, characterized in that the pool management apparatus comprises: memory, a processor and a hypervisor of a connection pool stored on the memory and executable on the processor, the hypervisor of a connection pool implementing the steps of the method of managing a connection pool according to any of claims 1 to 6 when executed by the processor.
8. A storage medium, characterized in that the storage medium has stored thereon a connection pool management program, which when executed by a processor implements the steps of the connection pool management method according to any one of claims 1 to 6.
9. A management apparatus for a connection pool, characterized in that the management apparatus for a connection pool comprises:
the system comprises an acquisition module, a service system and a management module, wherein the acquisition module is used for acquiring an internet protocol address and a port of a connection pool and distributing the internet protocol address and the port of the connection pool to the service system;
the allocation module is used for acquiring idle connection from the connection pool and allocating the idle connection to the service system when receiving a service request sent by the service system according to the internet protocol address of the connection pool and the port;
the monitoring module is used for monitoring whether the operation of the service process of the deployed asynchronous network communication engine Swoole corresponding to the service system in the connection pool is normal;
the sending module is used for sending alarm information to a target terminal when the Swoole service process of the deployed asynchronous network communication engine corresponding to the service system is abnormal;
the distribution module is further configured to obtain service data corresponding to the service request; encrypting the service data according to a preset asymmetric encryption algorithm and a random character string to obtain encrypted data; and sending the encrypted data to the corresponding service system.
CN202010123968.9A 2020-02-28 2020-02-28 Method, device and apparatus for managing connection pool and storage medium Active CN111431735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010123968.9A CN111431735B (en) 2020-02-28 2020-02-28 Method, device and apparatus for managing connection pool and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010123968.9A CN111431735B (en) 2020-02-28 2020-02-28 Method, device and apparatus for managing connection pool and storage medium

Publications (2)

Publication Number Publication Date
CN111431735A CN111431735A (en) 2020-07-17
CN111431735B true CN111431735B (en) 2023-04-07

Family

ID=71547211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010123968.9A Active CN111431735B (en) 2020-02-28 2020-02-28 Method, device and apparatus for managing connection pool and storage medium

Country Status (1)

Country Link
CN (1) CN111431735B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069237B (en) * 2020-07-22 2023-12-05 北京思特奇信息技术股份有限公司 Management system of cluster database connection pool
CN113760656A (en) * 2021-08-30 2021-12-07 深圳壹账通智能科技有限公司 Connection thread monitoring method, device, medium and equipment for connection pool
CN115878711B (en) * 2023-02-28 2023-07-21 新云网科技集团股份有限公司 Redis connection pool realization method, device, equipment and medium
CN117195204B (en) * 2023-11-01 2024-02-13 建信金融科技有限责任公司 Abnormal data detection method, device, electronic equipment and computer readable medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237059A (en) * 2013-04-02 2013-08-07 西安翔迅科技有限责任公司 Method for interacting traffic information data and commands

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898733B2 (en) * 2001-10-31 2005-05-24 Hewlett-Packard Development Company, L.P. Process activity and error monitoring system and method
CN101990256A (en) * 2010-08-27 2011-03-23 中兴通讯股份有限公司 Long-connection management device and method for managing link resources of long-connection communication
CN105357273B (en) * 2015-09-30 2018-06-19 山东乾云启创信息科技股份有限公司 SOCKET communications and management of process general-purpose platform and method under asynchronous communication model
CN107919987B (en) * 2017-11-16 2021-06-22 国云科技股份有限公司 Method for realizing micro-service cloud deployment
CN108924162A (en) * 2018-08-14 2018-11-30 安徽云才信息技术有限公司 A kind of long connection micro services communication means based on Transmission Control Protocol
CN110442493A (en) * 2019-07-23 2019-11-12 贵阳朗玛通信科技有限公司 A kind of automation services management system and method
CN110704483A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 User routing process positioning method, device, storage medium and device
CN110784527A (en) * 2019-10-18 2020-02-11 三体云智能科技有限公司 Information management system and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237059A (en) * 2013-04-02 2013-08-07 西安翔迅科技有限责任公司 Method for interacting traffic information data and commands

Also Published As

Publication number Publication date
CN111431735A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN111431735B (en) Method, device and apparatus for managing connection pool and storage medium
CN109831420B (en) Method and device for determining kernel process permission
CN109076063B (en) Protecting dynamic and short-term virtual machine instances in a cloud environment
US8499331B1 (en) Policy based network compliance
JP5522307B2 (en) System and method for remote maintenance of client systems in electronic networks using software testing with virtual machines
CN108521347B (en) Industrial control operation and maintenance behavior auditing method, device and system
CN104573494B (en) A kind of mobile security office procedure based on WMI software white list mechanism
CN104360878B (en) A kind of method and device of application software deployment
CN111131221B (en) Interface checking device, method and storage medium
KR100926075B1 (en) Database access through web application server monitoring apparatus and method thereof
CN110049028B (en) Method and device for monitoring domain control administrator, computer equipment and storage medium
CN111460404A (en) Double-recording data processing method and device, computer equipment and storage medium
CN115189896A (en) Virtual cloud password service system and method
CN115454636A (en) Container cloud platform GPU resource scheduling method, device and application
CN107231245B (en) Method and device for reporting monitoring log, and method and device for processing monitoring log
CN108494749B (en) Method, device and equipment for disabling IP address and computer readable storage medium
US20130073729A1 (en) User terminal, and method and apparatus for controlling the software management thereof
CN116260595B (en) Cloud password detection method and system
CN111212077B (en) Host access system and method
CN111737747A (en) Database security method, device, equipment and computer storage medium
CN111935195A (en) Distributed system management method, device, storage medium and distributed management system
CN113922975A (en) Security control method, server, terminal, system and storage medium
JP7180073B2 (en) Judgment program, judgment method, and judgment device
CN111259383A (en) Safety management center system
CN114598500B (en) Security service providing method, platform, electronic device, medium and program

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