CN114185681A - Automatic current-limiting processing method and device - Google Patents

Automatic current-limiting processing method and device Download PDF

Info

Publication number
CN114185681A
CN114185681A CN202111541141.0A CN202111541141A CN114185681A CN 114185681 A CN114185681 A CN 114185681A CN 202111541141 A CN202111541141 A CN 202111541141A CN 114185681 A CN114185681 A CN 114185681A
Authority
CN
China
Prior art keywords
service
utilization rate
maximum
hardware
current
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
CN202111541141.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111541141.0A priority Critical patent/CN114185681A/en
Publication of CN114185681A publication Critical patent/CN114185681A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2408Traffic characterised by specific attributes, e.g. priority or QoS for supporting different services, e.g. a differentiated services [DiffServ] type of service

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automatic current-limiting processing method and device, relates to the technical field of servers, and can be used in the financial field or other technical fields. The method comprises the following steps: determining an integral performance index value reflecting the service entirety according to the maximum utilization rate of the service integral hardware, the current performance capacity of the service, the maximum performance capacity capable of being carried by the service, the current performance capacity of the downstream service and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the service entirety according to a comparison result of the integral performance index value and a preset integral service current limiting threshold value. The device performs the above method. The automatic current-limiting processing method and the device provided by the embodiment of the invention can reasonably perform automatic current-limiting processing on the whole service from the whole service level, thereby improving the service performance quality.

Description

Automatic current-limiting processing method and device
Technical Field
The invention relates to the technical field of servers, in particular to an automatic current limiting processing method and device.
Background
In order to ensure good service performance, it is important to perform automatic current limiting on services.
The existing automatic current-limiting processing method is to set a current-limiting threshold value for a single device or a single service respectively, and execute a current-limiting action of the single device or the single service when the single device or the single service reaches the current-limiting threshold value. However, the above methods are all to perform current limiting from a local level of the whole service, and cannot perform overall planning from the whole service level, and it is very likely that a current limiting mechanism is triggered only when a certain service reaches the maximum performance capacity, but a downstream service of the service may already be overloaded.
Disclosure of Invention
In view of the problems in the prior art, embodiments of the present invention provide an automatic current limiting method and apparatus, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides an automatic current limiting processing method, including:
acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service;
and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
Wherein, the hardware of the single server comprises at least two items of a cpu, a memory, a disk and a network; correspondingly, the obtaining of the maximum utilization rate of hardware of the single server includes:
comparing the utilization rate values of at least two of the CPU overall utilization rate, the memory overall utilization rate, the disk overall utilization rate and the network overall utilization rate to obtain the maximum utilization rate of the hardware of the single server; the overall utilization rate of the disk is the ratio of the current read-write rate of the disk to the maximum read-write rate of the disk, and the overall utilization rate of the network is the ratio of the current network read-write rate to the current network bandwidth of the server.
Wherein, according to the number of all the single servers in the service and the maximum utilization rate of the hardware of the single server, the maximum utilization rate of the hardware of the whole service is determined, and the method comprises the following steps:
and taking the ratio of the addition calculation result obtained by adding the maximum utilization rate of the hardware of each single server to the number of all the single servers as the maximum utilization rate of the hardware of the whole service.
Wherein, according to the comparison result of the overall performance index value and the preset overall service current limiting threshold, determining whether to perform automatic current limiting processing on the overall service, including:
if the integral performance index value is larger than the preset integral service current limiting threshold value, determining to perform automatic current limiting processing on the integral service;
and if the integral performance index value is less than or equal to the preset integral service current limiting threshold value, determining that the integral service is not subjected to automatic current limiting treatment.
Wherein, the determining, according to the maximum utilization rate of the hardware of the whole service, the current performance capacity of the service, the maximum performance capacity that can be carried by the service, the current performance capacity of the downstream service, and the maximum performance capacity that can be carried by the downstream service, a whole performance index value reflecting the whole service includes:
calculating the service busy degree of the service according to the current performance capacity of the service and the maximum performance capacity which can be borne by the service; calculating the service busy degree of the downstream service according to the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service;
and determining an integral performance index value reflecting the whole service according to the maximum utilization rate of the whole service hardware, the service busy degree of the service, the service busy degree of the downstream service and respective corresponding weights.
Wherein, the automatic current limiting processing method further comprises the following steps:
and if the service does not have the downstream service, replacing the service busy degree of the downstream service with the preset integral service current limiting threshold, and determining an integral performance index value reflecting the integral service.
In one aspect, the present invention provides an automatic current limiting processing apparatus, including:
the determining module is used for acquiring the maximum utilization rate of hardware of a single server and determining the maximum utilization rate of the whole hardware of the service according to the number of all the single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
an obtaining module, configured to obtain a current service performance capacity of the service and a maximum performance capacity that can be carried by the service, and obtain a current downstream service performance capacity of a downstream service of the service and a maximum performance capacity that can be carried by the downstream service;
and the current limiting processing module is used for determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current performance capacity of the service, the maximum performance capacity which can be borne by the service, the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service, and determining whether to perform automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising:
acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service;
and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform a method comprising:
acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service;
and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
According to the automatic current-limiting processing method and device provided by the embodiment of the invention, the overall performance index value of the whole service is determined and reflected according to the maximum utilization rate of the hardware of the whole service, the current performance capacity of the service, the maximum performance capacity which can be borne by the service, the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service, whether the automatic current-limiting processing is carried out on the whole service is determined according to the comparison result of the overall performance index value and the preset overall service current-limiting threshold value, the automatic current-limiting processing can be reasonably carried out on the whole service from the whole service level, and the service performance quality is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic flow chart illustrating an automated current limiting processing method according to an embodiment of the present invention.
Fig. 2 is a schematic view of the internal structure of the mounting device.
Fig. 3 is a schematic diagram of the internal structure of the system information collection device.
Fig. 4 is a schematic diagram of the internal structure of the request intercepting apparatus.
Fig. 5 is a schematic diagram of the internal structure of the data aggregation apparatus.
Fig. 6 is a schematic diagram of the internal structure of the information receiving apparatus.
Fig. 7 is a schematic view of the internal structure of the statistical analysis device.
FIG. 8 is a flow chart illustrating an implementation of an automated throttling method for system resource usage.
Fig. 9 is a schematic structural diagram of an automated current limiting processing apparatus according to an embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a schematic flow diagram of an automated current limiting processing method according to an embodiment of the present invention, and as shown in fig. 1, the automated current limiting processing method according to the embodiment of the present invention includes:
step S1: acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; and the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server.
Step S2: and acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity and the maximum performance capacity which can be borne by the downstream service of the service.
Step S3: and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
In the step S1, the device obtains the maximum utilization rate of hardware of a single server, and determines the maximum utilization rate of the hardware of the whole service according to the number of all the single servers in the service and the maximum utilization rate of hardware of the single server; and the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server. The apparatus may be a computer device that performs the method. The hardware of the single server may include at least two items of cpu, memory, disk and network, and the at least two items may enable comparison of the usage rate values in the single server, so as to obtain the usage rate corresponding to the hardware with the highest usage rate value in the single server.
The service overall hardware maximum utilization rate can be understood as the average of the hardware maximum utilization rates of all single servers of the service.
Further, the obtaining the maximum utilization rate of hardware of a single server includes:
comparing the utilization rate values of at least two of the CPU overall utilization rate, the memory overall utilization rate, the disk overall utilization rate and the network overall utilization rate to obtain the maximum utilization rate of the hardware of the single server; the overall utilization rate of the disk is the ratio of the current read-write rate of the disk to the maximum read-write rate of the disk, and the overall utilization rate of the network is the ratio of the current network read-write rate to the current network bandwidth of the server. The overall CPU utilization rate and the overall memory utilization rate can be directly obtained from the server.
The following is an example of obtaining the maximum utilization rate of hardware of a single server:
if the hardware of the single server comprises two items of a cpu and a memory, carrying out numerical value comparison on the overall utilization rate of the cpu and the overall utilization rate of the memory, and if the overall utilization rate of the cpu is greater than the overall utilization rate of the memory, determining that the overall utilization rate of the cpu is the maximum utilization rate of the hardware of the single server.
If the hardware of the single server comprises three items of the CPU, the memory and the overall utilization rate of the disk, carrying out numerical value comparison on the overall utilization rate of the CPU, the overall utilization rate of the memory and the overall utilization rate of the disk, and if the numerical value of the overall utilization rate of the CPU is the highest, determining that the overall utilization rate of the CPU is the maximum utilization rate of the hardware of the single server.
The explanation of the hardware of a single server, including the cpu overall utilization rate, the memory overall utilization rate, the disk overall utilization rate and the network overall utilization rate, is not repeated.
Further, the determining the maximum utilization rate of the hardware of the service as a whole according to the number of all the single servers in the service and the maximum utilization rate of the hardware of the single server includes:
and taking the ratio of the addition calculation result obtained by adding the maximum utilization rate of the hardware of each single server to the number of all the single servers as the maximum utilization rate of the hardware of the whole service. This step enables the calculation of the mean of the maximum utilization of all the individual server hardware for the service.
In the above step S2, the device obtains the service current performance capacity of the service and the maximum performance capacity that can be carried by the service, and obtains the downstream service current performance capacity of the downstream service of the service and the maximum performance capacity that can be carried by the downstream service. When the service is called, the calling functions and the like can be intercepted, the number of calling functions of the current server accessing the service concurrently is recorded, the current performance capacity of the service is further calculated, and the maximum performance capacity which can be borne by the service can be obtained through the service attribute information.
Similarly, when the downstream service is called, the calling functions and the like can be intercepted, and the number of calling functions of the current server accessing the downstream service concurrently is recorded, so that the current performance capacity of the downstream service is calculated, and the maximum performance capacity which can be borne by the downstream service can be obtained through the attribute information of the downstream service.
In the step S3, the device determines an overall performance index value reflecting the entire service according to the maximum utilization rate of the hardware of the entire service, the current performance capacity of the service, the maximum performance capacity that can be carried by the service, the current performance capacity of the downstream service, and the maximum performance capacity that can be carried by the downstream service, and determines whether to perform automatic current limiting processing on the entire service according to a comparison result between the overall performance index value and a preset overall service current limiting threshold.
Further, the determining whether to perform automatic current limiting processing on the service entirety according to the comparison result of the overall performance index value and a preset service entirety current limiting threshold value includes:
if the integral performance index value is larger than the preset integral service current limiting threshold value, determining to perform automatic current limiting processing on the integral service; the preset service overall current limiting threshold value can be set independently according to actual conditions and can be selected to be 0.9.
And if the integral performance index value is less than or equal to the preset integral service current limiting threshold value, determining that the integral service is not subjected to automatic current limiting treatment.
Further, the determining, according to the maximum utilization rate of the hardware of the whole service, the current performance capacity of the service, the maximum performance capacity that can be carried by the service, the current performance capacity of the downstream service, and the maximum performance capacity that can be carried by the downstream service, a whole performance index value reflecting the whole service includes:
calculating the service busy degree of the service according to the current performance capacity of the service and the maximum performance capacity which can be borne by the service; calculating the service busy degree of the downstream service according to the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service; the ratio of the current performance capacity of the service to the maximum performance capacity which can be carried by the service can be used as the service busy degree of the service; the ratio of the current performance capacity of the downstream service to the maximum performance capacity that can be carried by the downstream service can be used as the service busyness of the downstream service.
And determining an integral performance index value reflecting the whole service according to the maximum utilization rate of the whole service hardware, the service busy degree of the service, the service busy degree of the downstream service and respective corresponding weights. The weight corresponding to the maximum utilization rate of the overall hardware of the service is recorded as a1, the weight corresponding to the service busy degree of the service is recorded as a2, the weight corresponding to the service busy degree of the downstream service is recorded as a3, and the specific numerical values of a1, a2 and a3 can be set independently according to actual conditions, for example, 0.6, 0.2 and 0.2 respectively.
The overall performance index value reflecting the service as a whole can be calculated according to the following formula:
the overall performance index value is the maximum usage rate of the hardware in the service × a1+ the service busy level of the service × a2+ the service busy level of the downstream service × a 3.
Namely, the conditions for triggering the automatic current limiting process are as follows:
service overall hardware maximum usage × a1+ service busy level of service × a2+ service busy level of downstream service × a3> K.
And K is a preset integral service current limiting threshold value.
Further, the automatic current limiting processing method further comprises the following steps:
and if the service does not have the downstream service, replacing the service busy degree of the downstream service with the preset integral service current limiting threshold, and determining an integral performance index value reflecting the integral service.
Referring to the condition for triggering the automatic current limiting processing, namely replacing the service busy degree of the downstream service in the formula with K, the current limiting processing condition for the maximum service utilization rate of the whole service hardware and the service busy degree of the service is more severe independently, and the service performance quality is further ensured.
According to the automatic current-limiting processing method provided by the embodiment of the invention, the integral performance index value of the whole service is determined and reflected according to the maximum utilization rate of the hardware of the whole service, the current performance capacity of the service, the maximum performance capacity which can be borne by the service, the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service, and whether the automatic current-limiting processing is carried out on the whole service is determined according to the comparison result of the integral performance index value and the preset integral service current-limiting threshold value, so that the automatic current-limiting processing can be reasonably carried out on the whole service from the whole service level, and the service performance quality is further improved.
It should be noted that the automatic current limiting processing method provided by the embodiment of the present invention may be used in the financial field, and may also be used in any technical field other than the financial field.
The embodiment of the invention mainly realizes the current limiting strategy through the service current limiting tool, and the service current limiting tool can be divided into a data acquisition sub-module and a statistical analysis sub-module on the whole.
And the data acquisition submodule is dynamically mounted with a target application program, such as a dubbo service, so that communication with the target application program is realized. When the target application program is called, the data acquisition submodule intercepts the call, records how many calls of the current server access the service concurrently, and simultaneously calculates the utilization rates of the cpu, the memory, the disk and the network of the current server in real time and sends the data to the statistical analysis submodule for statistical analysis.
And the statistical analysis submodule is dynamically mounted with the gateway and is communicated with the gateway. The statistical analysis submodule acquires the current busy degree of each service node and the utilization rate information of system levels such as a cpu, a memory, a disk and a network in real time, which are sent by the data acquisition submodule, and also receives the downstream service busy degree information sent by the downstream service in real time. Then, whether current limitation is needed or not is measured according to the following formula.
Service overall hardware maximum usage × a1+ service busy level of service × a2+ service busy level of downstream service × a3> K.
The service current limiting tool comprises the following devices:
service current limiting tool activation device 1: for enabling operation of the service restriction tool.
Mounting device 2: and the data acquisition submodule and the statistical analysis submodule of the service flow limiting tool are mounted in the gateway and the target application program, and real-time communication is kept.
The system information collection device 3: the method is used for acquiring the utilization rate of system resources such as a cpu, a memory, a disk, a network and the like of the current server in real time.
The request intercepting apparatus 4: when the service is called, the call is intercepted, and the number of calls of the current server for accessing the service concurrently is recorded.
The data aggregation device 5: the system resource usage rate information acquired by the system information collection device 3 and the service invocation information acquired by the request interception device 4 are aggregated, and the aggregation result is sent to the information reception device 6.
Information receiving apparatus 6: and receiving the system resource utilization rate information and the service calling information sent by the data aggregation device 5, and simultaneously receiving downstream service busy degree information sent by a downstream service, and analyzing the content.
The statistical analysis device 7: the method is used for statistically analyzing whether current limiting measures need to be triggered or not under the current condition according to the following formula:
service overall hardware maximum usage × a1+ service busy level of service × a2+ service busy level of downstream service × a3> K.
The current limiting device 8: the service is throttled.
As shown in fig. 2, the mounting apparatus 2 includes a gateway mounting unit 21, a service mounting unit 22:
gateway mounting unit 21: and the statistical analysis submodule is used for mounting into the gateway program.
Service mount unit 22: for mounting the data acquisition sub-module to a target application, such as a dubbo service.
As shown in fig. 3, the system information collection apparatus 3 includes a cpu information collection unit 31, a memory information collection unit 32, a disk information collection unit 33, and a network information collection unit 34, where:
the cpu information collecting unit 31: and the CPU is used for collecting and resolving the overall utilization rate of the target server.
The memory information collection unit 32: and the method is used for collecting and analyzing the whole memory utilization rate of the target server.
The disk information collection unit 33: and the method is used for collecting and analyzing the overall utilization rate of the disk of the target server.
The network information collection unit 34: and the method is used for collecting and analyzing the network overall utilization rate of the target server.
As shown in fig. 4, the request intercepting apparatus 4 includes a request intercepting unit 41 and a request counting unit 42. Wherein:
the request intercepting unit 41: and intercepting and recording a request for calling the target service.
Request statistics unit 42: all running requests intercepted by the request intercepting unit 41 are counted, and the concurrency of the current server is calculated.
As shown in fig. 5, the data aggregation apparatus 5 includes a data aggregation unit 51 and a data transmission unit 52. Wherein:
the data aggregation unit 51: and the service processing device is used for packaging the system resource utilization rate information acquired by the system information collecting device 3 and the service calling information acquired by the request intercepting device 4 by adopting a unified format.
The data transmission unit 52: for transmitting the data obtained by encapsulating the data aggregation unit 51 to the information receiving apparatus 6.
As shown in fig. 6, the information receiving apparatus 6 includes an information receiving unit 61 and an information analyzing unit 62. Wherein:
information receiving unit 61: receiving the system resource utilization rate information and the service calling information sent by the data aggregation device 5, and the downstream service busy degree information sent by the downstream service.
The information analysis unit 62: the various types of information received by the information receiving means 61 are analyzed and classified and then sent to the statistical analysis means 7 for statistical analysis.
As shown in fig. 7, the statistical analysis device 7 includes a statistical analysis unit 71 and a result comparison unit 72. Wherein:
the statistical analysis unit 71: and performing statistical analysis on three types of data, namely the maximum hardware utilization rate of the whole service, the busy degree of the service and the busy degree of the downstream service, obtained by analyzing by the information receiving device 6, and calculating to obtain the final current score of the service.
The result comparing unit 72: and comparing the score K values calculated by the statistical analysis device 71 to determine whether to trigger a current limiting measure at the moment.
The flow of implementing the automatic current limiting method based on the above devices is shown in fig. 8. The description of the embodiments may be specifically referred to, and will not be repeated.
Fig. 9 is a schematic structural diagram of an automatic current limiting processing apparatus according to an embodiment of the present invention, and as shown in fig. 9, the automatic current limiting processing apparatus according to the embodiment of the present invention includes a determining module 901, an obtaining module 902, and a current limiting processing module 903, where:
the determining module 901 is configured to obtain the maximum utilization rate of hardware of a single server, and determine the maximum utilization rate of the entire hardware of the service according to the number of all the single servers in the service and the maximum utilization rate of hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server; the obtaining module 902 is configured to obtain a current service performance capacity of the service and a maximum performance capacity that can be carried by the service, and obtain a current downstream service performance capacity of a downstream service of the service and a maximum performance capacity that can be carried by the downstream service; the current limiting processing module 903 is configured to determine an overall performance index value reflecting the entire service according to the maximum utilization rate of the hardware of the entire service, the current performance capacity of the service, the maximum performance capacity that can be carried by the service, the current performance capacity of the downstream service, and the maximum performance capacity that can be carried by the downstream service, and determine whether to perform automatic current limiting processing on the entire service according to a comparison result between the overall performance index value and a preset overall service current limiting threshold.
Specifically, the determining module 901 is configured to obtain the maximum utilization rate of hardware of a single server, and determine the maximum utilization rate of the hardware of the whole service according to the number of all the single servers in the service and the maximum utilization rate of hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server; the obtaining module 902 is configured to obtain a current service performance capacity of the service and a maximum performance capacity that can be carried by the service, and obtain a current downstream service performance capacity of a downstream service of the service and a maximum performance capacity that can be carried by the downstream service; the current limiting processing module 903 is configured to determine an overall performance index value reflecting the entire service according to the maximum utilization rate of the hardware of the entire service, the current performance capacity of the service, the maximum performance capacity that can be carried by the service, the current performance capacity of the downstream service, and the maximum performance capacity that can be carried by the downstream service, and determine whether to perform automatic current limiting processing on the entire service according to a comparison result between the overall performance index value and a preset overall service current limiting threshold.
The automatic current-limiting processing device provided by the embodiment of the invention determines and reflects the overall performance index value of the service according to the maximum utilization rate of the overall hardware of the service, the current performance capacity of the service, the maximum performance capacity which can be borne by the service, the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service, and determines whether to perform automatic current-limiting processing on the service overall according to the comparison result of the overall performance index value and the preset overall current-limiting threshold of the service, so that the automatic current-limiting processing can be reasonably performed on the service overall from the whole service level, and the service performance quality is further improved.
The embodiment of the automatic current limiting processing apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the embodiment are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 10, the electronic device includes: a processor (processor)1001, a memory (memory)1002, and a bus 1003;
the processor 1001 and the memory 1002 complete communication with each other through a bus 1003;
the processor 1001 is configured to call the program instructions in the memory 1002 to execute the methods provided by the above-mentioned method embodiments, for example, including:
acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server; acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service; and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server; acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service; and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server; acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service; and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (9)

1. An automated current limiting processing method, comprising:
acquiring the maximum utilization rate of hardware of a single server, and determining the maximum utilization rate of the whole hardware of the service according to the number of all single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
acquiring the current service performance capacity and the maximum performance capacity which can be borne by the service of the service, and acquiring the current downstream service performance capacity of the downstream service of the service and the maximum performance capacity which can be borne by the downstream service;
and determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current service performance capacity, the maximum performance capacity capable of being carried by the service, the current downstream service performance capacity and the maximum performance capacity capable of being carried by the downstream service, and determining whether to carry out automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
2. The automated current-limiting processing method of claim 1, wherein a single server hardware comprises at least two of a cpu, a memory, a disk, and a network; correspondingly, the obtaining of the maximum utilization rate of hardware of the single server includes:
comparing the utilization rate values of at least two of the CPU overall utilization rate, the memory overall utilization rate, the disk overall utilization rate and the network overall utilization rate to obtain the maximum utilization rate of the hardware of the single server; the overall utilization rate of the disk is the ratio of the current read-write rate of the disk to the maximum read-write rate of the disk, and the overall utilization rate of the network is the ratio of the current network read-write rate to the current network bandwidth of the server.
3. The automated flow-limiting processing method according to claim 1, wherein determining the maximum utilization rate of the hardware of the entire service according to the number of all the individual servers in the service and the maximum utilization rate of the hardware of the individual servers comprises:
and taking the ratio of the addition calculation result obtained by adding the maximum utilization rate of the hardware of each single server to the number of all the single servers as the maximum utilization rate of the hardware of the whole service.
4. The method of claim 1, wherein the determining whether to perform the automatic current limiting on the service ensemble according to the comparison result between the overall performance index value and a preset service ensemble current limiting threshold includes:
if the integral performance index value is larger than the preset integral service current limiting threshold value, determining to perform automatic current limiting processing on the integral service;
and if the integral performance index value is less than or equal to the preset integral service current limiting threshold value, determining that the integral service is not subjected to automatic current limiting treatment.
5. The method according to any one of claims 1 to 4, wherein the determining a value of an overall performance index reflecting an overall service according to the overall service hardware maximum usage rate, the current service performance capacity, the maximum performance capacity that can be carried by the service, the current downstream service performance capacity, and the maximum performance capacity that can be carried by the downstream service includes:
calculating the service busy degree of the service according to the current performance capacity of the service and the maximum performance capacity which can be borne by the service; calculating the service busy degree of the downstream service according to the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service;
and determining an integral performance index value reflecting the whole service according to the maximum utilization rate of the whole service hardware, the service busy degree of the service, the service busy degree of the downstream service and respective corresponding weights.
6. The automated current limiting processing method of claim 5, further comprising:
and if the service does not have the downstream service, replacing the service busy degree of the downstream service with the preset integral service current limiting threshold, and determining an integral performance index value reflecting the integral service.
7. An automated current limiting processing apparatus, comprising:
the determining module is used for acquiring the maximum utilization rate of hardware of a single server and determining the maximum utilization rate of the whole hardware of the service according to the number of all the single servers in the service and the maximum utilization rate of the hardware of the single server; the maximum utilization rate of the hardware of the single server is the utilization rate corresponding to the hardware with the highest utilization rate value in the single server;
an obtaining module, configured to obtain a current service performance capacity of the service and a maximum performance capacity that can be carried by the service, and obtain a current downstream service performance capacity of a downstream service of the service and a maximum performance capacity that can be carried by the downstream service;
and the current limiting processing module is used for determining an overall performance index value reflecting the overall service according to the maximum utilization rate of the overall service hardware, the current performance capacity of the service, the maximum performance capacity which can be borne by the service, the current performance capacity of the downstream service and the maximum performance capacity which can be borne by the downstream service, and determining whether to perform automatic current limiting processing on the overall service according to a comparison result of the overall performance index value and a preset overall service current limiting threshold value.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the computer program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202111541141.0A 2021-12-16 2021-12-16 Automatic current-limiting processing method and device Pending CN114185681A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111541141.0A CN114185681A (en) 2021-12-16 2021-12-16 Automatic current-limiting processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111541141.0A CN114185681A (en) 2021-12-16 2021-12-16 Automatic current-limiting processing method and device

Publications (1)

Publication Number Publication Date
CN114185681A true CN114185681A (en) 2022-03-15

Family

ID=80544102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111541141.0A Pending CN114185681A (en) 2021-12-16 2021-12-16 Automatic current-limiting processing method and device

Country Status (1)

Country Link
CN (1) CN114185681A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002114A (en) * 2022-05-27 2022-09-02 北京百度网讯科技有限公司 Node processing method and device, electronic equipment, storage medium and server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002114A (en) * 2022-05-27 2022-09-02 北京百度网讯科技有限公司 Node processing method and device, electronic equipment, storage medium and server
CN115002114B (en) * 2022-05-27 2024-03-19 北京百度网讯科技有限公司 Node processing method, device, electronic equipment, storage medium and server

Similar Documents

Publication Publication Date Title
US11411825B2 (en) In intelligent autoscale of services
US10855545B2 (en) Centralized resource usage visualization service for large-scale network topologies
CN106131213B (en) Service management method and system
US9647904B2 (en) Customer-directed networking limits in distributed systems
US7890620B2 (en) Monitoring system and monitoring method
US11102286B2 (en) Bandwidth scheduling method and device for cache server
US20220141102A1 (en) Collecting samples hierarchically in a datacenter
CN111124819A (en) Method and device for monitoring full link
AU2014352692A1 (en) Customer-directed networking limits in distributed systems
US9137325B2 (en) Efficiently isolating malicious data requests
EP0990349A1 (en) A telecommunications performance management system
US10999168B1 (en) User defined custom metrics
CN113242297B (en) Service system and service state adjusting method
US20160021188A1 (en) Generic Network Trace with Distributed Parallel Processing and Smart Caching
CN106375102A (en) Service registration method, application method and correlation apparatus
US9621438B2 (en) Network traffic management
CN114185681A (en) Automatic current-limiting processing method and device
CN113849363A (en) Service monitoring method and related device
CN113079062B (en) Resource adjusting method and device, computer equipment and storage medium
US10445136B1 (en) Randomized subrequest selection using request-specific nonce
CN109245943B (en) Fault positioning method and device
CN109284257B (en) Log writing method and device, electronic equipment and storage medium
CN114443732A (en) Dynamic interface calling method and storage medium
CN113377866A (en) Load balancing method and device for virtualized database proxy service
KR20220055661A (en) Edge service processing system and control method thereof

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