CN111478857B - Interface current limiting control method and device and electronic equipment - Google Patents

Interface current limiting control method and device and electronic equipment Download PDF

Info

Publication number
CN111478857B
CN111478857B CN201910071672.4A CN201910071672A CN111478857B CN 111478857 B CN111478857 B CN 111478857B CN 201910071672 A CN201910071672 A CN 201910071672A CN 111478857 B CN111478857 B CN 111478857B
Authority
CN
China
Prior art keywords
interface
current limiting
server
flow
limiting threshold
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
CN201910071672.4A
Other languages
Chinese (zh)
Other versions
CN111478857A (en
Inventor
李奕峦
余岸轩
章磊
李帅
隆宗益
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN201910071672.4A priority Critical patent/CN111478857B/en
Publication of CN111478857A publication Critical patent/CN111478857A/en
Application granted granted Critical
Publication of CN111478857B publication Critical patent/CN111478857B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • 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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • 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/29Flow control; Congestion control using a combination of thresholds
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application provides an interface current limiting control method, an interface current limiting control device and electronic equipment, wherein the method comprises the following steps: acquiring interface data of a server in a system to be managed; configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface data; pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.

Description

Interface current limiting control method and device and electronic equipment
Technical Field
The present application relates to the field of network technologies, and in particular, to an interface current limiting control method and device, and an electronic device.
Background
Currently, there are three ways in which a high concurrency system can be used to protect the system: caching, demoting, and throttling. The purpose of the cache is to improve the system access speed and increase the capacity which can be processed by the system; degradation is when a problem is serviced or the performance of the core flow is affected, then the problem needs to be temporarily shielded, and the problem is opened after the peak or problem is solved. Some scenarios cannot be solved by caching and degradation, such as scarce resources (second kill, robbery), write services (comments, orders), frequent complex queries (last few pages of comments), and therefore a means is needed to limit the concurrency/request amount of these scenarios, i.e. current limit. However, since there are many interfaces in one system, the current limiting configuration for each interface is relatively complex, resulting in troublesome current limiting operation.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide an interface current limiting control method, an apparatus, and an electronic device, which can solve the problem that the interface current limiting threshold is hard-coded in the prior art, and the system takes longer time when emergency needs to be adjusted, so as to achieve the effect of improving the update efficiency of the current limiting threshold.
In a first aspect, an embodiment of the present application provides an interface current limiting control method, including:
acquiring interface data of a server in a system to be managed;
configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface data;
pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of configuring a current limit threshold for an interface of a server in the system to be managed according to the interface data includes:
calculating according to the interface data to obtain interface indexes of each interface;
And configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface index.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of calculating the interface index of each interface according to the interface data comprises the following steps:
and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of configuring a current limit threshold for an interface of a server in the system to be managed according to the interface data includes:
obtaining the flow of an interface of a server in the system to be managed in a set time period according to the interface data;
calculating according to the flow of the set time period to obtain flow expression values of each interface in the set time period, wherein the flow expression values represent flow trends of the set time period;
comparing the flow expression value of any interface with the current limiting threshold of each interface of the server in the system to be managed, and judging whether the flow expression value is in a limiting range corresponding to the current limiting threshold;
If not, a new current limiting threshold is configured for the corresponding interface.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of comparing the flow expression value of any interface with the current limiting threshold of each interface of the server in the system to be managed to determine whether the flow expression value is within a limited range corresponding to the current limiting threshold, includes:
and judging whether the flow expression value is in a proportion smaller than the current limiting threshold value.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of configuring a new current limit threshold for the corresponding interface includes:
a new current limit threshold greater than the current limit threshold is configured for the corresponding interface.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of obtaining interface data of a server in a system to be managed includes: acquiring interface data of a server in the system to be managed according to a set time rule;
after the interface data of the server in the system to be managed is acquired, the method further comprises:
Selecting a target interface meeting a set rule according to the interface data;
judging whether the target interface is configured with a current limiting threshold value or not;
if not, configuring a current limiting threshold for the target interface.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of selecting the target interface meeting the set rule according to the interface data comprises the following steps:
and selecting a target interface with the query rate per second larger than a set value according to the interface data.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of selecting the target interface meeting the set rule according to the interface data comprises the following steps:
and selecting a target interface corresponding to the specified identifier according to the interface data.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the step of selecting the target interface meeting the set rule according to the interface data comprises the following steps:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the method further comprises the steps of:
Receiving a current limit threshold configured for a specified interface;
pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
With reference to the first aspect, the present embodiments provide a possible implementation manner of the first aspect, wherein: the interface of the server in the system to be managed is configured with priority, and the method further comprises:
and if the interfaces reach the current limiting threshold, starting the current limiting switch step by step according to the priority of each interface in the interfaces, wherein the interface with low priority starts the current limiting switch earlier than the interface with high priority.
In a second aspect, an embodiment of the present application further provides an interface current limiting control device, including:
the acquisition module is used for acquiring interface data of a server in the system to be managed;
the configuration module is used for configuring a current limiting threshold value for an interface of a server in the system to be managed according to the interface data;
and the pushing module is used for pushing the current limiting threshold value to the corresponding server so that the server can read the current limiting threshold value and control the interface flow according to the current limiting threshold value.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the configuration module comprises:
The first calculation unit is used for calculating and obtaining interface indexes of all interfaces according to the interface data;
and the first configuration unit is used for configuring a current limiting threshold value for the interface of the server in the system to be managed according to the interface index.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the first computing unit is further configured to:
and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the configuration module comprises:
the obtaining unit is used for obtaining the flow of the interface of the server in the system to be managed in a set time period according to the interface data;
the second calculation unit is used for calculating and obtaining flow expression values of each interface in the set time period according to the flow of the set time period, wherein the flow expression values represent flow trends of the set time period;
the judging unit is used for comparing the flow expression value of any interface with the current limiting threshold value of each interface of the server in the system to be managed and judging whether the flow expression value is in a limiting range corresponding to the current limiting threshold value;
And the second configuration unit is used for configuring a new current limiting threshold value for the corresponding interface if the judgment unit judges that the current limiting threshold value is not the same.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the judging unit is further configured to:
and judging whether the flow expression value is in a proportion smaller than the current limiting threshold value.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the second configuration unit is further configured to:
a new current limit threshold greater than the current limit threshold is configured for the corresponding interface.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the acquisition module is further configured to: acquiring interface data of a server in the system to be managed according to a set time rule;
the apparatus further comprises:
the selection module is used for selecting a target interface meeting a set rule according to the interface data;
the judging module is used for judging whether the target interface is configured with a current limiting threshold value or not;
the configuration module is further configured to configure a current limiting threshold for the target interface if the judgment module judges that the current limiting threshold is not available.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the selection module is further configured to:
and selecting a target interface with the query rate per second larger than a set value according to the interface data.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the selection module is further configured to:
and selecting a target interface corresponding to the specified identifier according to the interface data.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the selection module is further configured to:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the apparatus further comprises:
the receiving module is used for receiving the current limiting threshold configured for the appointed interface;
the pushing module is further configured to: pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
With reference to the second aspect, embodiments of the present application provide a possible implementation manner of the second aspect, wherein: the interface of the server in the system to be managed is configured with priority, and the device further comprises:
And the starting module is used for starting the current limiting switch step by step according to the priority of each interface in the interfaces if the interfaces reach the current limiting threshold value, wherein the interface with the lower priority starts the current limiting switch earlier than the interface with the higher priority.
In a third aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the first aspect described above, or any of the possible implementation manners of the first aspect, of the interface current limit control method.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the interface current limit control method of the first aspect, or any possible implementation manner of the first aspect.
According to the interface current limiting control method, the device and the electronic equipment, the interface data of the server in the system to be managed are acquired, the corresponding current limiting threshold values can be configured for the interfaces according to the interface data, the interface is not required to be configured one by one in a hard-coded mode, and the configuration efficiency of the interface current limiting threshold values is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an operating environment of an interface current limit control system according to an embodiment of the present disclosure;
fig. 2 shows a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of an interface current limit control method according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a specific method of step S302 in the interface current limiting control method provided in the embodiment of the present application;
fig. 5 shows a schematic structural diagram of an interface current limiting control device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
When the access or request amount of a system is large, a current limiting manner may be required to limit the service traffic of the system. The throttling protects the system by throttling concurrent accesses/requests or requests within a time window, and once a limiting rate is reached, service may be denied. There must be a limited number of concurrency/request for an application system, i.e. there is always a TPS/QPS threshold, and if the threshold is exceeded, the system may not respond to user requests or respond relatively slowly, so the application system may be overload protected from large numbers of requests flooding the system. Also, the interface may have burst access, and if the access amount is too large, the crash may have serious impact on the system service. Thus, there is a need to limit the total number of concurrent/requested interfaces, and a corresponding threshold may be set for each interface.
Interface current limiting, granularity is finer, and when the flow overload leads to the system to break down, resources such as system CPU can be replaced with minimum cost through isolated current limiting work, and current limiting is cancelled again until the fault is recovered, so that the system is not thoroughly broken down, and overall stability is ensured.
However, the inventor researches find that the current interface current limiting has some defects:
interface current limiting is different from the whole current limiting of a system, reasonable thresholds are required to be set for different interfaces according to the actual flow and the system load bearing capacity of the interfaces, and in general, the number of the interfaces of the system is relatively large, so that a large number of current limiting configurations and strategies are required to be manually maintained, great maintenance cost is caused, and omission is easy to occur;
when the current limiting interface reaches a certain level, the maintenance and the management are difficult;
the newly added core interface of the system can be forgotten to be accessed for current limiting;
the flow of the non-primary interface of part of the core modules is large, potential stability hidden danger exists, but the non-primary interface of part of the core modules may not be carded;
the interface current limiting threshold is in a hard coding form, the emergency situation occurs in the system, and the operation time is long when the current limiting threshold needs to be adjusted urgently;
the current limiting threshold cannot be dynamically adjusted, and as the flow of the system increases, the previously set threshold may be unreasonable, so that the system has high risk;
The current limiting is lossy, and the core interface may be greatly affected by the current limiting.
Based on the description of the problems, the interface current limiting control method, the device and the electronic equipment can effectively solve the technical problems.
For the sake of understanding the present embodiment, first, an operation environment for executing an interface current limiting control method disclosed in the embodiments of the present application will be described in detail.
Example 1
Fig. 1 is a block diagram of an interface current limit control system 100 according to some embodiments of the present application. For example, the interface restrictor control system 100 may be a management for an online transportation service platform for transportation services such as taxis, ride-on services, express, carpools, bus services, driver leases, or airliner services, or any combination thereof. The interface flow limit control system 100 may include one or more of a management device 110, a network 120, a server 130, and a database 140, and the management device 110 may include a processor executing instruction operations.
In some embodiments, the management device 110 may be a single server or a group of servers. The server farm may be centralized or distributed (e.g., management device 110 may be a distributed system). In some embodiments, the management device 110 may be local or remote to the server. For example, management device 110 may access information and/or data stored in server 130, or database 140, or any combination thereof, via network 120. As another example, the management device 110 may be directly connected to at least one of the server 130 and the database 140 to access stored information and/or data. In some embodiments, the management device 110 may be implemented on a cloud platform; for example only, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud (community cloud), distributed cloud, inter-cloud (inter-cloud), multi-cloud (multi-cloud), and the like, or any combination thereof. In some embodiments, the management device 110 may be implemented on an electronic device 200 having one or more of the components shown in fig. 2 herein.
In some embodiments, the management device 110 may include a processor. The processor may process information and/or data related to the service request to perform one or more functions described herein. For example, the processor may be based on interface data obtained from the server 130. In some embodiments, a processor may include one or more processing cores (e.g., a single core processor (S) or a multi-core processor (S)). By way of example only, the Processor may include a central processing unit (Central Processing Unit, CPU), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), special instruction set Processor (Application Specific Instruction-set Processor, ASIP), graphics processing unit (Graphics Processing Unit, GPU), physical processing unit (Physics Processing Unit, PPU), digital signal Processor (Digital Signal Processor, DSP), field programmable gate array (Field Programmable Gate Array, FPGA), programmable logic device (Programmable Logic Device, PLD), controller, microcontroller unit, reduced instruction set computer (Reduced Instruction Set Computing, RISC), microprocessor, or the like, or any combination thereof.
Network 120 may be used for the exchange of information and/or data. In some embodiments, one or more components in the interface current limit control system 100 (e.g., the management device 110, the server 130, and the database 140) may send information and/or data to other components. For example, management device 110 may obtain a data source from server 130 via network 120. In some embodiments, network 120 may be any type of wired or wireless network, or a combination thereof. By way of example only, the network 120 may include a wired network, a wireless network, a fiber optic network, a telecommunications network, an intranet, the internet, a local area network (Local Area Network, LAN), a wide area network (Wide Area Network, WAN), a wireless local area network (Wireless Local Area Networks, WLAN), a metropolitan area network (Metropolitan Area Network, MAN), a wide area network (Wide Area Network, WAN), a public switched telephone network (Public Switched Telephone Network, PSTN), a bluetooth network, a ZigBee network, a near field communication (Near Field Communication, NFC) network, or the like, or any combination thereof. In some embodiments, network 120 may include one or more network access points. For example, network 120 may include wired or wireless network access points, such as base stations and/or network switching nodes, through which one or more components of interface current limit control system 100 may connect to network 120 to exchange data and/or information.
In some embodiments, the server 130 may be configured to respond to requests sent by service requester terminals. The user of the service requester terminal may be a person other than the actual desirer of the service. For example, user a of the service requester terminal may use the service requester terminal to initiate a service request for the service actual requester B (e.g., user a may call his own friend B), or receive service information or instructions from the server 130, etc. In some embodiments, the user of the service provider terminal may be the actual service provider or may be a person other than the actual service provider. For example, user C of the service provider terminal may use the service provider terminal to receive a service request for providing a service by service actual provider D (e.g., user C may pick up for driver D employed by himself), and/or information or instructions from server 130. In some embodiments, "service requester" and "service requester terminal" may be used interchangeably and "service provider" and "service provider terminal" may be used interchangeably.
In some embodiments, the service requester terminal may include a mobile device, a tablet computer, a laptop computer, or a built-in device in a motor vehicle, or the like, or any combination thereof. In some embodiments, the mobile device may include a smart home device, a wearable device, a smart mobile device, a virtual reality device, or an augmented reality device, or the like, or any combination thereof. In some embodiments, the smart home device may include a smart lighting device, a control device for a smart appliance device, a smart monitoring device, a smart television, a smart video camera, or an intercom, or the like, or any combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart lace, a smart glass, a smart helmet, a smart watch, a smart garment, a smart backpack, a smart accessory, etc., or any combination thereof. In some embodiments, the smart mobile device may include a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), a gaming device, a navigation device, or a point of sale (POS) device, or the like, or any combination thereof. In some embodiments, the virtual reality device and/or the augmented reality device may include a virtual reality helmet, a virtual reality glass, a virtual reality patch, an augmented reality helmet, an augmented reality glass, an augmented reality patch, or the like, or any combination thereof. For example, the virtual reality device and/or the augmented reality device may include various virtual reality products, and the like. In some embodiments, the built-in devices in the motor vehicle may include an on-board computer, an on-board television, and the like. In some embodiments, the service requester terminal may be a device with positioning technology for positioning the location of the service requester and/or the service requester terminal.
Database 140 may store data and/or instructions. In some embodiments, database 140 may store data obtained from service requester terminals and/or service provider terminals. In some embodiments, database 140 may store data and/or instructions for the exemplary methods described in this application. In some embodiments, database 140 may include mass storage, removable storage, volatile Read-write Memory, or Read-Only Memory (ROM), or the like, or any combination thereof. By way of example, mass storage may include magnetic disks, optical disks, solid state drives, and the like; removable memory may include flash drives, floppy disks, optical disks, memory cards, zip disks, magnetic tape, and the like; the volatile read-write memory may include random access memory (Random Access Memory, RAM); the RAM may include dynamic RAM (Dynamic Random Access Memory, DRAM), double data Rate Synchronous dynamic RAM (DDR SDRAM); static Random-Access Memory (SRAM), thyristor RAM (T-RAM) and Zero-capacitor RAM (Zero-RAM), etc. By way of example, ROM may include Mask Read-Only Memory (MROM), programmable ROM (Programmable Read-Only Memory, PROM), erasable programmable ROM (Programmable Erasable Read-Only Memory, PEROM), electrically erasable programmable ROM (Electrically Erasable Programmable Read Only Memory, EEPROM), compact disk ROM (CD-ROM), digital versatile disk ROM, and the like. In some embodiments, database 140 may be implemented on a cloud platform. For example only, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, cross-cloud, multi-cloud, or other similar, or the like, or any combination thereof.
In some embodiments, database 140 may be connected to network 120 to communicate with one or more components in interface flow-limit control system 100 (e.g., management device 110, server 130, service requester terminal, service provider terminal, etc.). One or more components in the interface current limit control system 100 may access data or instructions stored in the database 140 via the network 120. In some embodiments, database 140 may be directly connected to one or more components in interface current limit control system 100 (e.g., management device 110, server 130, service requester terminal, service provider terminal, etc.); alternatively, in some embodiments, database 140 may also be part of server 130.
In some embodiments, one or more components in the interface current limit control system 100 (e.g., the management device 110, the server 130, etc.) may have access to the database 140. In some embodiments, one or more components in the interface current limit control system 100 may read and/or modify information related to a service requester, a service provider, or the public, or any combination thereof, when certain conditions are met. For example, server 130 may read and/or modify information of one or more users after receiving the service request. As another example, the service provider terminal may access information related to the service requester upon receiving a service request from the service requester terminal, but the service provider terminal may not modify the related information of the service requester.
Fig. 2 shows a schematic diagram of exemplary hardware and software components of an electronic device 200 of a server 130, a management device 110, which may implement the concepts of the present application, according to some embodiments of the present application. For example, a processor may be used on the electronic device 200 and to perform the functions herein.
The electronic device 200 may be a general purpose computer or a special purpose computer, both of which may be used to implement the interface current limit control methods of the present application. Although only one computer is shown, the functionality described herein may be implemented in a distributed fashion across multiple similar platforms for convenience to balance processing loads.
For example, the electronic device 200 may include a network port 210 connected to a network, one or more processors 220 for executing program instructions, a communication bus 230, and various forms of storage media 240, such as magnetic disk, ROM, or RAM, or any combination thereof. By way of example, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The methods of the present application may be implemented in accordance with these program instructions. The electronic device 200 also includes an Input/Output (I/O) interface 250 between the computer and other Input/Output devices (e.g., keyboard, display screen).
For ease of illustration, only one processor is depicted in the electronic device 200. It should be noted, however, that the electronic device 200 in the present application may also include multiple processors, and thus steps performed by one processor described in the present application may also be performed jointly by multiple processors or separately. For example, if the processor of the electronic device 200 performs steps a and B, it should be understood that steps a and B may also be performed by two different processors together or performed separately in one processor. For example, the first processor performs step a, the second processor performs step B, or the first processor and the second processor together perform steps a and B.
Example two
For the sake of understanding the present embodiment, first, a detailed description is given of an interface current limiting control method disclosed in the embodiments of the present application.
Referring to fig. 3, fig. 3 shows a flowchart of an interface current limiting control method according to an embodiment of the present application. The method in the embodiment can be applied to an application system management device for controlling and managing the flow of each interface in an application system. Specifically, the method in the embodiment of the application may include the following steps.
Step S301, obtaining interface data of a server in a system to be managed.
The interface current limiting control method in this embodiment is used for managing the traffic of an application system, and the interface usage data in the server in the application system can be acquired before the interface threshold is set. That is, the system to be managed may be an application system.
The interface data may include an access record received by the server, a type of access received, a throughput for each time period, a transaction speed, a capability to process a transaction, and the like.
Specifically, the access record, the received access type and the processing amount of each time period in the interface data may be stored in the log in the server, and then part of the interface data may be obtained by obtaining the log of each server. In addition, other contents in the interface data can also be obtained by obtaining the parameters of the server itself.
After the interface data is acquired, the data may be preprocessed. Because there are cases where different domain names actually correspond to the same interface at the back end, it is necessary to combine the related data of the same interface at the back end corresponding to different domain names. The consolidated content may include access amounts corresponding to the respective domain names.
Step S302, a current limiting threshold is configured for the interface of the server in the system to be managed according to the interface data.
Step S302 may be used to perform initial current limit threshold setting on the application system, or perform current limit threshold updating on the interface to which the current limit threshold has been set.
Step S302 may include: calculating according to the interface data to obtain interface indexes of each interface; and configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface index.
In this embodiment, the value of the interface index is relatively large, and a relatively large current limiting threshold value may be set; if the value of the interface indicator is relatively small, a relatively smaller current limit threshold may be set.
The step of calculating the interface index of each interface according to the interface data comprises the following steps: and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
The set period may be a period of one day, one week, one month, or the like. Of course, the set period of time may also refer to a period of time when the application system begins to apply to the current time, or other period of time, that is better able to represent the operational state of the interface.
Further, the index of each interface can be calculated. The metrics may include data that can represent the transaction capabilities of the interface, such as the number of requests processed Per Second (QPS) Per Second, the number of transactions processed Per Second (Transaction Per Second, TPS), etc. QPS is a measure of how much traffic a particular query server handles in a given time, and the performance of a machine as a domain name system server can be measured in terms of query rate per second.
The method of calculating the number of requests per second for a server is described below by way of one example.
For example, 70% of the day's visits are focused on 20% of the time, which 20% of the time is called the peak time. Peak time per second request (QPS) = (total PV number 70%)/(number of seconds per day 20%); required machine = peak time QPS per second/QPS of single machine. Wherein, PV number represents (page view, chinese name: page view amount). In one example, if 300w PV per day is on a single machine, the QPS required by this machine is calculated as: (3000000 x 0.7)/(86400 x 0.2) =139 (QPS). If the QPS for a machine is 58, the number of machines needed is calculated as: 139/58=3.
In this embodiment, the calculated indexes may be stored, and the indexes may be acquired for use when each index is needed.
By setting the current limiting threshold according to the index of the interface, the application system can be prevented from crashing, the processing function of the interface can be better utilized, and the interface resource can be used maximally.
Considering that the amount of requests received by the server may be different in different time periods, only the processing situation of the server can be represented in different time periods. Therefore, with the wide use of application systems, the current limiting threshold value which may be set before cannot be well adapted to the current requirement, and then the current limiting threshold value can be adaptively adjusted.
Based on the above considerations, as shown in fig. 4, step S302 may also include the following steps.
And step S3021, obtaining the flow of the interfaces of the server in the system to be managed in a set time period according to the interface data.
The set period of time may be a recent period of time, for example, a period of time of the last day, the last three days, the last week, the last month, etc. The flow condition of the application system can be represented through a short period of time, so that whether the current flow limiting threshold meets the requirement can be represented. For example, the current limit threshold may be lower than the average access amount for the set period of time or lower than a certain proportion of the average access amount for the set period of time, for example, the certain proportion may be 70%, 80% equivalent, indicating that the current limit threshold may be lower and unreasonable to set.
Step S3022, calculating a flow expression value in the set time period of each interface according to the flow of the set time period.
Wherein the flow amount representation value represents a flow amount trend of the set time period. The flow rate expression value may be an average value of the flow rates for the set period of time; the average flow rate of the peak time period in the set time period can also be; it may also be the maximum flow value for a set period of time.
Step S3023, comparing the flow expression value of any interface with the current limit threshold of each interface of the server in the system to be managed, and determining whether the flow expression value is within the limited range corresponding to the current limit threshold.
Specifically, step S3023 may include determining whether the flow amount representation value is within a proportion less than the current flow limit threshold setting proportion.
If it is determined that the flow expression value is not within the limited range corresponding to the current limit threshold, step S3024 is executed; if the flow expression value is judged to be in the limit range corresponding to the current limiting threshold value, the current limiting threshold value can also meet the requirements in the application system, and the current limiting threshold value can be not adjusted.
The defined range corresponding to the current limit threshold may be a set proportion of the current limit threshold, for example, 90%, 80% of the current limit threshold.
In one embodiment, the flow expression value is an average value of the flow rate of the set period, and the limited range corresponding to the current flow limit threshold may be relatively small, for example, 30% of the current flow limit threshold, 40% of the current flow limit threshold, and so on.
In another embodiment, the flow expression value is the average flow in the peak time period in the set time period, and the limited range corresponding to the current flow limit threshold may be relatively large, for example, 75% of the current flow limit threshold, 85% of the current flow limit threshold, and so on.
In another embodiment, if the flow expression value is the maximum flow value of the set period, the limit range corresponding to the current flow limit threshold may be relatively large, for example, 85% of the current flow limit threshold, 90% of the current flow limit threshold, etc.
Step S3024, configuring a new current limit threshold for the corresponding interface.
The configured new current limit threshold may be a current limit threshold for which the flow amount value may match. Specifically, if the current limit threshold is smaller, step S3024 may include configuring a new current limit threshold for the corresponding interface that is greater than the current limit threshold.
In one embodiment, the flow rate representation value is an average of the flow rate for the set period of time, and the new flow limit threshold may be configured to be twice, three times, four times, etc. the flow rate representation value.
In another embodiment, the flow rate representation value is the average flow rate during the peak time period in the set time period, and the new flow limit threshold may be configured to be 1.5-2 times the flow rate representation value, etc.
In another embodiment, the new flow limit threshold may be configured to be 1.2-1.4 times the flow expression value, etc., if the flow expression value is the flow maximum for the set period of time.
Of course, the specific current limit threshold may be adjusted according to the actual usage trend of the application system. For example, the user growth rate of the application system is relatively fast, and the current limit threshold can be adapted to be increased.
The maximum flow value of the interface in the last day and week is screened out by inquiring the domain names, url, threshold values and access layer and 911 configuration of all interfaces of the system, and whether the current limiting threshold value of the previous interface is reasonable or whether the interface flow is abnormal or not is judged by analyzing the maximum flow value, so that the method can help to find and locate problems in time. For example, if the interface QPS is found to be rising, exceeding or approaching a set threshold, and the source of traffic growth is not abnormal, the threshold configuration of the interface can be appropriately enlarged. Therefore, the emergency situation of the system is realized, the operation is faster when the current limiting threshold needs to be urgently adjusted, the emergency situation of the application system can be adapted, and the adaptability of the application system is improved.
Step S303, pushing the current limiting threshold to a corresponding server so that the server reads the current limiting threshold and controls the interface flow according to the current limiting threshold.
As users of application systems increase, some original data interfaces may not be able to meet the requirements of users for accessing the application systems, and thus may access some new interfaces, which may not be assigned a current limit threshold, and may result in relatively large traffic for the new interfaces. Based on the above description, the interface data in the application system can be monitored and acquired according to a set rule.
Based on the above considerations, step S301 may be implemented as: and acquiring interface data of the server in the system to be managed according to a set time rule.
The set time law acquisition can be acquired once a week, acquired once a day, acquired once every ten days, and the like. The user growth condition can be specifically based on the update condition of the application system.
Specifically, the set time rule may be a user-defined time rule, for example, a user operation interface may be provided on the management device, and an input box for receiving data may be provided in the operation interface.
Of course, the set time law may be a default time law.
The flow state of each interface of each server in the application system can be monitored by acquiring the interface data of the server in the application system according to the set time rule.
After the interface data of the server in the system to be managed is acquired, the method further comprises: selecting a target interface meeting a set rule according to the interface data; judging whether the target interface is configured with a current limiting threshold value or not; if not, configuring a current limiting threshold for the target interface.
In one embodiment, the step of selecting the target interface that meets the setting rule according to the interface data includes: and selecting a target interface with the query rate per second larger than a set value according to the interface data.
In another embodiment, the step of selecting the target interface that meets the setting rule according to the interface data includes: and selecting a target interface corresponding to the specified identifier according to the interface data.
The specified identifier may be an identifier capable of identifying an interface, such as a specified machine code, a target interface of the specified identifier, or the like.
In still another embodiment, the step of selecting the target interface that satisfies the setting rule according to the interface data includes: and selecting a target interface corresponding to the appointed access layer according to the interface data.
The steps are used for discovering the interface, and discovering a new core interface which is not accessed to the current limitation or an interface with higher flow rate through the self-defined interface discovery rule so as to ensure the continuous effectiveness of the current limitation function and prevent the sudden flow rate of the interface from threatening the service stability.
In order to facilitate some user operations, an operation interface can be provided, so that the user can conveniently adjust the current limiting threshold according to the needs of the user.
The interface current limiting control method of the embodiment further comprises the following steps: receiving a current limit threshold configured for a specified interface; pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
The staged flow restriction is essentially lossy as long as the flow restriction operation occurs. Therefore, in order to reduce the loss, priorities may be set for the interfaces in the application system, for example, the interfaces may be classified according to the importance degree of the interfaces, and the interfaces are divided into two-level and two-level, and when a specific fault occurs, the current limiting switch will be as follows: the sequence of the three-level interface- > the second-level interface- > part of the first-level interfaces is sequentially opened, so that the influence on the main flow is reduced as much as possible, and the overall stability of the system is maintained. The primary interface is an interface which is more important than the secondary interface, and the secondary interface is an interface which is more important than the tertiary interface.
Specifically, the interface current limiting control method in this embodiment further includes: and if the interfaces reach the current limiting threshold, starting the current limiting switch step by step according to the priority of each interface in the interfaces, wherein the interface with low priority starts the current limiting switch earlier than the interface with high priority.
In this embodiment, the current limiting algorithm of the interfaces may be started to implement current limiting of the interfaces.
Specifically, the current limiting algorithm in the present embodiment may include a token bucket algorithm, a leaky bucket algorithm, a calculator, and the like. Any of the above-described current limiting algorithms may be selected by those skilled in the art to perform current limiting operations on the interface in light of the present disclosure. The present embodiment is not limited to the current limiting algorithm used.
The principle of the token bucket algorithm is that the system will put tokens into the bucket at a constant speed, and if the request needs to be processed, it needs to first acquire a token from the bucket, and when no token is desirable in the bucket, it refuses service. In the interface flow limiting method applied to the application, when tokens in a token bucket algorithm of an interface in an application system are taken out, the interface can not be accessed again.
The method in the embodiment can uniformly manage interface current limiting configuration by establishing a current limiting platform; the new interface discovers itself, and discovers the high-flow interface according to the monitoring data; the rationality self-discovery of the current limiting threshold value, screening out an interface with unreasonable threshold value through a system general strategy or a custom strategy, and timely adjusting; accessing a third party platform, flexibly managing the current limiting configuration, and enabling the current limiting configuration to be changed, used and effective in real time; interface grading, and sequentially limiting current according to the importance degree;
In the current limiting configuration control in this embodiment, the current limiting rule is not configured directly on the http server (such as nginx), but is controlled by a management platform provided in this embodiment, where the management platform in this embodiment can support a more flexible configuration rule, and can push the configuration to a corresponding machine, and then the http server on the machine reads the current limiting rule. When an emergency needs to modify the interface current limit, the interface current limit is directly operated and issued on the management platform in the embodiment, and the interface current limit takes effect in real time, so that the method is more rapid and convenient than the method of directly modifying the current limit configuration on a machine.
Example III
Based on the same application conception, the embodiment of the application also provides an interface current limiting control device corresponding to the interface current limiting control method, and because the principle of solving the problem by the device in the embodiment of the application is similar to that of the interface current limiting control method in the embodiment of the application, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 5, a schematic structural diagram of an interface current limiting control device according to a fifth embodiment of the present application is provided, where each module and unit of the interface current limiting control device in the present embodiment are configured to execute each step in the foregoing method embodiment. The device comprises: an acquisition module 401, a configuration module 402, and a push module 403; wherein, the liquid crystal display device comprises a liquid crystal display device,
An obtaining module 401, configured to obtain interface data of a server in a system to be managed;
a configuration module 402, configured to configure a current limit threshold for an interface of a server in the system to be managed according to the interface data;
and the pushing module 403 is configured to push the current limit threshold to a corresponding server, so that the server reads the current limit threshold, and control the interface flow according to the current limit threshold.
In one possible embodiment: the configuration module 402 includes:
the first calculation unit is used for calculating and obtaining interface indexes of all interfaces according to the interface data;
and the first configuration unit is used for configuring a current limiting threshold value for the interface of the server in the system to be managed according to the interface index.
In one possible embodiment: the first computing unit is further configured to:
and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
In one possible embodiment: the configuration module 402 includes:
the obtaining unit is used for obtaining the flow of the interface of the server in the system to be managed in a set time period according to the interface data;
The second calculation unit is used for calculating and obtaining flow expression values of each interface in the set time period according to the flow of the set time period, wherein the flow expression values represent flow trends of the set time period;
the judging unit is used for comparing the flow expression value of any interface with the current limiting threshold value of each interface of the server in the system to be managed and judging whether the flow expression value is in a limiting range corresponding to the current limiting threshold value;
and the second configuration unit is used for configuring a new current limiting threshold value for the corresponding interface if the judgment unit judges that the current limiting threshold value is not the same.
In one possible embodiment: the judging unit is further configured to:
and judging whether the flow expression value is in a proportion smaller than the current limiting threshold value.
In one possible embodiment: the second configuration unit is further configured to:
a new current limit threshold greater than the current limit threshold is configured for the corresponding interface.
In one possible embodiment: the obtaining module 401 is further configured to: acquiring interface data of a server in the system to be managed according to a set time rule;
the apparatus further comprises:
A selecting module 404, configured to select a target interface that meets a setting rule according to the interface data;
a determining module 405, configured to determine whether the target interface is configured with a current limiting threshold;
the configuration module 402 is further configured to configure a current limit threshold for the target interface if the determination module determines that the determination is negative.
In one possible embodiment: the selecting module 404 is further configured to:
and selecting a target interface with the query rate per second larger than a set value according to the interface data.
In one possible embodiment: the selecting module 404 is further configured to:
and selecting a target interface corresponding to the specified identifier according to the interface data.
In one possible embodiment: the selecting module 404 is further configured to:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
In one possible embodiment: the apparatus further comprises:
a receiving module 406, configured to receive a current limit threshold configured for a specified interface;
the pushing module 403 is further configured to: pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
In one possible embodiment: the interface of the server in the system to be managed is configured with priority, and the device further comprises:
The starting module 407 is configured to start the current limiting switch step by step according to the priority of each interface in the plurality of interfaces if the plurality of interfaces reach the current limiting threshold, where an interface with a low priority starts the current limiting switch earlier than an interface with a high priority.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
In addition, the embodiment of the application further provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the interface current limiting control method described in the embodiment of the method are executed.
The computer program product of the interface current limiting control method provided in the embodiments of the present application includes a computer readable storage medium storing program codes, where the instructions included in the program codes may be used to execute the steps of the interface current limiting control method described in the method embodiments, and the specific reference may be made to the method embodiments, which are not repeated herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

1. An interface current limiting control method is characterized by comprising the following steps:
acquiring interface data of a server in a system to be managed;
configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface data;
pushing the current limiting threshold to a corresponding server so that the server reads the current limiting threshold and controls interface flow according to the current limiting threshold;
the step of configuring a current limit threshold for an interface of a server in the system to be managed according to the interface data includes:
obtaining the flow of an interface of a server in the system to be managed in a set time period according to the interface data;
calculating according to the flow of the set time period to obtain flow expression values of each interface in the set time period, wherein the flow expression values represent flow trends of the set time period; the flow expression value is an average value of flow in a set time period, or an average flow in a peak time period in the set time period, or a maximum flow in the set time period;
Comparing the flow expression value of any interface with the current limiting threshold of each interface of the server in the system to be managed, and judging whether the flow expression value is in a limiting range corresponding to the current limiting threshold;
if not, a new current limiting threshold is configured for the corresponding interface.
2. The method of claim 1, wherein the step of configuring a current limit threshold for an interface of a server in the system to be managed based on the interface data comprises:
calculating according to the interface data to obtain interface indexes of each interface;
and configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface index.
3. The method of claim 2, wherein the step of calculating the interface index of each interface based on the interface data comprises:
and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
4. The method of claim 1, wherein the step of comparing the flow expression value of any interface with a current flow limit threshold of each interface of a server in the system to be managed to determine whether the flow expression value is within a defined range corresponding to the current flow limit threshold comprises:
And judging whether the flow expression value is in a proportion smaller than the current limiting threshold value.
5. The method of claim 4, wherein the step of configuring a new current limit threshold for the corresponding interface comprises:
a new current limit threshold greater than the current limit threshold is configured for the corresponding interface.
6. The method of claim 1, wherein the step of obtaining interface data of a server in the system to be managed comprises: acquiring interface data of a server in the system to be managed according to a set time rule;
after the interface data of the server in the system to be managed is acquired, the method further comprises:
selecting a target interface meeting a set rule according to the interface data;
judging whether the target interface is configured with a current limiting threshold value or not;
if not, configuring a current limiting threshold for the target interface.
7. The method of claim 6, wherein the step of selecting a target interface satisfying a set rule based on the interface data comprises:
and selecting a target interface with the query rate per second larger than a set value according to the interface data.
8. The method of claim 6, wherein the step of selecting a target interface satisfying a set rule based on the interface data comprises:
And selecting a target interface corresponding to the specified identifier according to the interface data.
9. The method of claim 6, wherein the step of selecting a target interface satisfying a set rule based on the interface data comprises:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
10. The method of claim 1, wherein the method further comprises:
receiving a current limit threshold configured for a specified interface;
pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
11. The method according to any of claims 1-10, wherein the interfaces of the servers in the system to be managed are configured with priorities, the method further comprising:
and if the interfaces reach the current limiting threshold, starting the current limiting switch step by step according to the priority of each interface in the interfaces, wherein the interface with low priority starts the current limiting switch earlier than the interface with high priority.
12. An interface current limiting control device, comprising:
the acquisition module is used for acquiring interface data of a server in the system to be managed;
The configuration module is used for configuring a current limiting threshold value for an interface of a server in the system to be managed according to the interface data;
the pushing module is used for pushing the current limiting threshold value to a corresponding server so that the server can read the current limiting threshold value and control the interface flow according to the current limiting threshold value;
the configuration module comprises:
the obtaining unit is used for obtaining the flow of the interface of the server in the system to be managed in a set time period according to the interface data;
the second calculation unit is used for calculating and obtaining flow expression values of each interface in the set time period according to the flow of the set time period, wherein the flow expression values represent flow trends of the set time period; the flow expression value is an average value of flow in a set time period, or an average flow in a peak time period in the set time period, or a maximum flow in the set time period;
the judging unit is used for comparing the flow expression value of any interface with the current limiting threshold value of each interface of the server in the system to be managed and judging whether the flow expression value is in a limiting range corresponding to the current limiting threshold value;
And the second configuration unit is used for configuring a new current limiting threshold value for the corresponding interface if the judgment unit judges that the current limiting threshold value is not the same.
13. The apparatus of claim 12, wherein the configuration module comprises:
the first calculation unit is used for calculating and obtaining interface indexes of all interfaces according to the interface data;
and the first configuration unit is used for configuring a current limiting threshold value for the interface of the server in the system to be managed according to the interface index.
14. The apparatus of claim 13, wherein the first computing unit is further to:
and calculating the query rate per second of each interface in a set time period according to the interface data, and taking the query rate per second as an interface index.
15. The apparatus of claim 12, wherein the determination unit is further configured to:
and judging whether the flow expression value is in a proportion smaller than the current limiting threshold value.
16. The apparatus of claim 15, wherein the second configuration unit is further to:
a new current limit threshold greater than the current limit threshold is configured for the corresponding interface.
17. The apparatus of claim 12, wherein the acquisition module is further to: acquiring interface data of a server in the system to be managed according to a set time rule;
The apparatus further comprises:
the selection module is used for selecting a target interface meeting a set rule according to the interface data;
the judging module is used for judging whether the target interface is configured with a current limiting threshold value or not;
the configuration module is further configured to configure a current limiting threshold for the target interface if the judgment module judges that the current limiting threshold is not available.
18. The apparatus of claim 17, wherein the selection module is further to:
and selecting a target interface with the query rate per second larger than a set value according to the interface data.
19. The apparatus of claim 17, wherein the selection module is further to:
and selecting a target interface corresponding to the specified identifier according to the interface data.
20. The apparatus of claim 17, wherein the selection module is further to:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
21. The apparatus of claim 12, wherein the apparatus further comprises:
the receiving module is used for receiving the current limiting threshold configured for the appointed interface;
the pushing module is further configured to: pushing the current limiting threshold to a corresponding server so that the server can read the current limiting threshold and control the interface flow according to the current limiting threshold.
22. The apparatus according to any of claims 12-21, wherein an interface of a server in the system to be managed is configured with a priority, the apparatus further comprising:
and the starting module is used for starting the current limiting switch step by step according to the priority of each interface in the interfaces if the interfaces reach the current limiting threshold value, wherein the interface with the lower priority starts the current limiting switch earlier than the interface with the higher priority.
23. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 11.
24. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 11.
CN201910071672.4A 2019-01-24 2019-01-24 Interface current limiting control method and device and electronic equipment Active CN111478857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910071672.4A CN111478857B (en) 2019-01-24 2019-01-24 Interface current limiting control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910071672.4A CN111478857B (en) 2019-01-24 2019-01-24 Interface current limiting control method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111478857A CN111478857A (en) 2020-07-31
CN111478857B true CN111478857B (en) 2023-06-13

Family

ID=71743653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910071672.4A Active CN111478857B (en) 2019-01-24 2019-01-24 Interface current limiting control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111478857B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468557B (en) * 2020-11-16 2022-04-22 北京百度网讯科技有限公司 Method, device, gateway and storage medium for providing network service
CN112612618B (en) * 2020-12-30 2022-07-19 深圳我家云网络科技有限公司 Interface current limiting method and device, computer equipment and storage medium
CN113572701A (en) * 2021-07-26 2021-10-29 杭州米络星科技(集团)有限公司 Service interface flow control method, device, equipment and storage medium
CN113872830B (en) * 2021-09-27 2023-09-01 重庆紫光华山智安科技有限公司 Traffic management method and related device
CN113992596A (en) * 2021-10-18 2022-01-28 北京沃东天骏信息技术有限公司 Interface current limiting method, device, equipment, system and storage medium
CN115242722B (en) * 2022-06-14 2024-04-16 中盈优创资讯科技有限公司 Advanced flow control implementation method based on API gateway
CN114844835B (en) * 2022-07-04 2022-09-20 眉山环天智慧科技有限公司 Self-adaptive dynamic current limiting method and device
CN116112441A (en) * 2023-02-01 2023-05-12 北京百度网讯科技有限公司 Service request current limiting method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770088A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN108390908A (en) * 2018-01-10 2018-08-10 努比亚技术有限公司 A kind of data request processing method, apparatus and computer readable storage medium
CN109039937A (en) * 2018-09-26 2018-12-18 深圳壹账通智能科技有限公司 Dynamic current limiting method, apparatus, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7539748B2 (en) * 2003-05-16 2009-05-26 Time Warner Cable, A Division Of Time Warner Entertainment Company, L.P. Data transfer application monitor and controller
CN106559349B (en) * 2015-09-24 2019-03-19 阿里巴巴集团控股有限公司 Control method and device, the system of service transmission rate

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770088A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN108390908A (en) * 2018-01-10 2018-08-10 努比亚技术有限公司 A kind of data request processing method, apparatus and computer readable storage medium
CN109039937A (en) * 2018-09-26 2018-12-18 深圳壹账通智能科技有限公司 Dynamic current limiting method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111478857A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN111478857B (en) Interface current limiting control method and device and electronic equipment
US20190306255A1 (en) System and method for throttling service requests having non-uniform workloads
US8676981B2 (en) Routing service requests based on lowest actual cost within a federated virtual service cloud
US20170153917A1 (en) Account activity level based-system resource allocating method and device
CN109981702B (en) File storage method and system
CN104518981A (en) Flow control method and device
CN109992473A (en) Monitoring method, device, equipment and the storage medium of application system
CN107623732A (en) A kind of date storage method based on cloud platform, device, equipment and storage medium
US20230092714A1 (en) Systems, computer-readable media and computer-implemented methods for automated, dynamic capacity planning using http response header fields
CN111159195A (en) Data storage control method and equipment in block chain system
CN110069911A (en) Access control method, device, system, electronic equipment and readable storage medium storing program for executing
CN110515728B (en) Server scheduling method and device, electronic equipment and machine-readable storage medium
CN106569917A (en) Data backup method and mobile terminal
CN114640700B (en) Calling frequency control method and device
US11228619B2 (en) Security threat management framework
CN112286930A (en) Method, device, storage medium and electronic equipment for resource sharing of redis business side
CN112416888A (en) Dynamic load balancing method and system for distributed file system
CN113765969A (en) Flow control method and device
CN108400884B (en) Method, system and device for improving stability of website service
CN115794396A (en) Resource allocation method, system and electronic equipment
CN116166181A (en) Cloud monitoring method and cloud management platform
CN111262894B (en) Method and device for controlling online consultation user quantity
US20210034434A1 (en) Distribution of components of displayed data between a server and a client based on server and client load factors
US10956037B2 (en) Provisioning storage allocation using prioritized storage system capabilities
CN106598987A (en) Information recommendation method and device

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