CN111478857A - 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
CN111478857A
CN111478857A CN201910071672.4A CN201910071672A CN111478857A CN 111478857 A CN111478857 A CN 111478857A CN 201910071672 A CN201910071672 A CN 201910071672A CN 111478857 A CN111478857 A CN 111478857A
Authority
CN
China
Prior art keywords
interface
current limiting
threshold value
limiting threshold
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910071672.4A
Other languages
Chinese (zh)
Other versions
CN111478857B (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 value for an interface of a server in the system to be managed according to the interface data; and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.

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 a method and an apparatus for controlling interface current limiting, and an electronic device.
Background
Currently, there are three ways a high concurrency system can be used to protect the system: caching, destaging, and throttling. The purpose of caching is to improve the access speed of the system and increase the capacity which can be processed by the system; the degradation is that when a service is out of order or the performance of the core flow is affected, the service needs to be temporarily shielded, and the service is opened after a peak or the problem is solved. Some scenarios cannot be solved by caching and demotion, such as scarce resources (second kill, robbery), write services (e.g. comment, order placement), frequent complex queries (last few pages of comment), and therefore a means is needed to limit the amount of concurrency/requests of these scenarios, i.e. to limit the flow. However, because there are many interfaces in a system, the current limiting configuration for each interface is relatively complex, which causes the current limiting operation to be troublesome.
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 and apparatus, and an electronic device, which can solve the problem that the interface current limiting threshold in the prior art is in a hard coding form, and the operation time is long when the system has an emergency and needs to adjust the current limiting threshold urgently in a unified management manner, 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 value for an interface of a server in the system to be managed according to the interface data;
and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface data includes:
calculating to obtain an interface index of each interface according to the interface data;
and 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 first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of calculating the interface indexes 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, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of configuring a current limiting threshold for an interface of a server in the system to be managed according to the interface data includes:
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;
calculating 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 the flow trend of the set time period;
comparing the flow representation 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 representation value is in the limiting range corresponding to the current limiting threshold value;
if not, configuring a new current limiting threshold value for the corresponding interface.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of comparing the flow representation 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 representation value is in the limited range corresponding to the current limiting threshold value comprises the following steps:
and judging whether the flow representation value is smaller than the current flow limiting threshold value set proportion.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of configuring a new current limit threshold for the corresponding interface includes:
and configuring a new current limiting threshold value larger than the current limiting threshold value for the corresponding interface.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of obtaining the interface data of the server in the system to be managed comprises the following steps: 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 obtained, the method further includes:
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;
and if not, configuring a current limiting threshold value for the target interface.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of selecting a target interface satisfying a set 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.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of selecting a target interface satisfying a set rule according to the interface data includes:
and selecting a target interface corresponding to the designated identifier according to the interface data.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the step of selecting a target interface satisfying a set rule according to the interface data includes:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the method further comprises the following steps:
receiving a current limiting threshold configured for a designated interface;
and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
With reference to the first aspect, an embodiment of the present application provides a possible implementation manner of the first aspect, where: the interface of the server in the system to be managed is configured with a priority, and the method further comprises:
and if the plurality of interfaces reach the current limiting threshold value, gradually starting the current limiting switch according to the priority of each interface in the plurality of interfaces, wherein the interface with the lower priority starts the current limiting switch before the interface with the higher 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 a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the configuration module includes:
the first calculation unit is used for calculating interface indexes of all the 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 combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: 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 combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the configuration module 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, and the flow expression values represent the flow trend of the set time period;
a judging unit, configured to compare the flow representation value of any interface with a current flow limiting threshold of each interface of a server in the system to be managed, and judge whether the flow representation value is within a limit range corresponding to the current flow limiting threshold;
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 as the current limiting threshold value.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the judging unit is further configured to:
and judging whether the flow representation value is smaller than the current flow limiting threshold value set proportion.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the second configuration unit is further configured to:
and configuring a new current limiting threshold value larger than the current limiting threshold value for the corresponding interface.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the obtaining module is further configured to: acquiring interface data of a server in the system to be managed according to a set time rule;
the device 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;
and the configuration module is also used for configuring a current limiting threshold value for the target interface if the judgment module judges that the current limiting threshold value is not the target interface.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: 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.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the selection module is further configured to:
and selecting a target interface corresponding to the designated identifier according to the interface data.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the selection module is further configured to:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the device further comprises:
the receiving module is used for receiving a current limiting threshold configured for a specified interface;
the pushing module is further configured to: and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
In combination with the second aspect, the present application provides a possible implementation manner of the second aspect, where: the interface of the server in the system to be managed is configured with a priority, and the apparatus 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 plurality of interfaces if the plurality of interfaces reach the current limiting threshold, wherein the interface with the lower priority starts the current limiting switch before the interface with the higher priority.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate via the bus when the electronic device is running, and the machine-readable instructions, when executed by the processor, perform the steps of the interface current limiting control method according to the first aspect or any one of the possible embodiments of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the interface current limiting control method in the first aspect or any one of the possible implementation manners of the first aspect.
According to the interface current-limiting control method and device and the electronic equipment, the interface data of the server in the system to be managed are obtained, the corresponding current-limiting threshold value can be configured for each interface according to the interface data, the interface current-limiting threshold values do not need to be configured in a hard coding mode one by one, and configuration efficiency of the interface current-limiting threshold values is improved.
In order to make the aforementioned 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 required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic diagram illustrating an operating environment of an interface current limiting control system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating an interface current limiting control method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a specific method in step S302 in an interface current limiting control method provided in an 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
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
When the access amount or the request amount of a system is large, a current limiting manner may be needed to limit the service traffic of the system. Current limiting protects the system by rate limiting concurrent access/requests or by rate limiting requests within a time window, and can deny service once the limiting rate is reached. For an application system, there must be a limit number of concurrency/requests, that is, there is always one TPS/QPS threshold, and if the threshold is exceeded, the system may not respond to the user request or respond relatively slowly, so the application system can perform overload protection to prevent a large number of requests from flooding the system. Similarly, the interface may have burst access, and if the access amount is too large, the system traffic may be seriously affected by the crash. Therefore, it is necessary to limit the total concurrent/requested total number of interfaces, and a corresponding threshold value can be set for each interface.
The interface current limiting, the granularity is thinner, when the flow transships and leads to the system to break down, can exchange resources such as system CPU with minimum cost through the current limiting work of isolated, cancel the current limiting again until the fault recovery, make the system be unlikely to thoroughly collapse, guarantee holistic stability.
However, the inventor researches and discovers that the existing interface current limiting has some defects:
interface current limiting is different from overall current limiting of a system, reasonable threshold values are required to be set for different interfaces according to actual flow of the interfaces and load bearing capacity of the system, generally, the number of the interfaces of the system is relatively large, a large number of current limiting configurations and strategies need to be manually maintained, great maintenance cost is caused, and omission easily occurs;
when the current limiting interface reaches a certain magnitude, the maintenance and management are difficult to carry out;
the situation that the current limit is forgotten to be accessed may occur in a core interface newly added to the system;
the non-primary interfaces of part of the core modules have large flow, potential stability hidden danger exists, but the potential stability hidden danger is not combed;
the interface current limiting threshold is in a hard coding form, and the time consumption of operation is long when the system has an emergency and needs to adjust the current limiting threshold in an emergency;
the current limit threshold value cannot be dynamically adjusted, and as the flow of the system increases, the previously set threshold value may be unreasonable, so that the system has high risk;
the current limiting is lossy, and the system may be affected much by limiting the current of the core interface.
Based on the description of the above problems, the present application provides an interface current limiting control method, an interface current limiting control apparatus, and an electronic device, which can effectively solve the above technical problems.
To facilitate understanding of the present embodiment, a detailed description is first given of an operating environment for executing the interface current limiting control method disclosed in the embodiments of the present application.
Example one
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 current limit control system 100 may be the management of an online transportation service platform for transportation services such as taxi, designated drive service, express, carpool, bus service, driver rental, or regular service, or any combination thereof. The interface current 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 that performs instruction operations.
In some embodiments, the management device 110 may be a single server or a group of servers. The server group may be centralized or distributed (e.g., the management device 110 may be a distributed system). In some embodiments, the management device 110 may be local or remote with respect to the server. For example, the management device 110 may access information and/or data stored in the server 130, or the database 140, or any combination thereof, via the 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; by way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud (community cloud), a distributed cloud, an inter-cloud, a 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 in the present application.
In some embodiments, the 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 (CPU), an Application Specific Integrated Circuit (ASIC), an Application Specific Instruction Set Processor (ASIP), a Graphics Processing Unit (GPU), a physical Processing Unit (Physics Processing Unit, PPU), a Digital Signal Processor (Digital Signal Processor, DSP), a field Programmable Gate Array (FPGA, L), a field Programmable Gate Array (FPGA ), a field Programmable Gate Array (FPGA, L), or any combination thereof.
In some embodiments, Network 120 may include any type of wired or Wireless Network, or any combination thereof, for example, 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 (L Area Network, L AN), a Wide Area Network (WAN), a Wireless local Area Network (Wireless L Area Networks, W L), a Metropolitan Area Network (Metrolitan Area Network, MAN), a Wide Area Network (Wide Area Network, WAN), a Public Switched Telephone Network (PSTN), a Bluetooth Network, a Near Field switching Network (NFC) or any combination thereof, including wired/Wireless access point, Near Field Communication Network, or any combination thereof, and may include one or more of wired or Wireless Network access points 100, NFC, or any combination thereof.
In some embodiments, the server 130 may be used to respond to requests sent by service requester terminals. The user of the service requester terminal may be someone other than the actual demander of the service. For example, the user a of the service requester terminal may use the service requester terminal to initiate a service request for the service actual demander B (for example, the user a may call a car for his friend B), or receive service information or instructions from the server 130, and so on. In some embodiments, the user of the service provider terminal may be the actual provider of the service or may be another person than the actual provider of the service. For example, user C of the service provider terminal may use the service provider terminal to receive a service request serviced by the service provider actual D (e.g., user C may take an order for driver D employed by user C), 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 comprise a mobile device, a tablet computer, a laptop computer, or a built-in device in a motor vehicle, etc., 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, an augmented reality device, or the like, or any combination thereof. In some embodiments, the smart home devices may include smart lighting devices, control devices for smart electrical devices, smart monitoring devices, smart televisions, smart cameras, or walkie-talkies, or the like, or any combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart lace, smart glass, a smart helmet, a smart watch, a smart garment, a smart backpack, a smart accessory, and the like, or any combination thereof. In some embodiments, the smart mobile device may include a smartphone, a 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, virtual reality glass, a virtual reality patch, an augmented reality helmet, augmented reality glass, an augmented reality patch, or the like, or any combination thereof. For example, the virtual reality device and/or 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 having a positioning technology for locating the position of the service requester and/or the service requester terminal.
Database 140 may store data and/or instructions. In some embodiments, the 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 herein. In some embodiments, the database 140 may include mass storage, removable storage, volatile Read-write Memory, or Read-Only Memory (ROM), among others, 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, tapes, and the like; volatile read-write Memory may include Random Access Memory (RAM); the RAM may include Dynamic RAM (DRAM), Double Data Rate Synchronous Dynamic RAM (DDRSDRAM); static RAM (SRAM), Thyristor-based Random Access Memory (T-RAM), Zero-capacitor RAM (Zero-RAM), and the like. By way of example, ROMs may include Mask Read-Only memories (MROMs), Programmable ROMs (PROMs), Erasable Programmable ROMs (PERROMs), Electrically Erasable Programmable ROMs (EEPROMs), compact disk ROMs (CD-ROMs), digital versatile disks (ROMs), and the like. In some embodiments, database 140 may be implemented on a cloud platform. By way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, across clouds, multiple clouds, or the like, or any combination thereof.
In some embodiments, a database 140 may be connected to network 120 to communicate with 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.). One or more components in interface current limit control system 100 may access data or instructions stored in database 140 via network 120. In some embodiments, the database 140 may be directly connected to one or more components in the interface current limit control system 100 (e.g., the management device 110, the server 130, the service requester terminal, the service provider terminal, etc.); alternatively, in some embodiments, database 140 may also be part of server 130.
In some embodiments, one or more components (e.g., management device 110, server 130, etc.) in the interface current limit control system 100 may have access to a 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 requestor, 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 for one or more users after receiving a service request. As another example, the service provider terminal may access information related to the service requester when 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 illustrates a schematic diagram of exemplary hardware and software components of an electronic device 200 that may implement the management device 110, server 130 of the present concepts 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 method of the present application. Although only a single computer is shown, for convenience, the functions described herein may be implemented in a distributed fashion across multiple similar platforms 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 a different form of storage medium 240, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, 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 method 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. However, it should be noted that the electronic device 200 in the present application may also comprise a plurality of processors, and thus the steps performed by one processor described in the present application may also be performed by a plurality of processors in combination or individually. For example, if the processor of the electronic device 200 executes steps a and B, it should be understood that steps a and B may also be executed by two different processors together or separately in one processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
Example two
To facilitate understanding of the present embodiment, a detailed description is first provided for an interface current limiting control method disclosed in the embodiments of the present application.
Referring to fig. 3, fig. 3 is a flowchart illustrating an interface current limiting control method according to an embodiment of the present disclosure. The method in this embodiment may be applied to an application system management device, and is used to control and manage the traffic of each interface in the application system. Specifically, the method in the embodiment of the present application may include the following steps.
Step S301, interface data of a server in the system to be managed is acquired.
The interface current-limiting control method in this embodiment is used to manage the flow of an application system, and before setting the interface threshold, the interface usage data in the server in the application system may be obtained first. That is, the system to be managed may be an application system.
The interface data may include access records received by the server, types of accesses received, processing amounts for various time periods, transaction processing speeds, transaction processing capabilities, 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 a log in the server, so that 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 parameters of the server itself.
After the interface data is acquired, the data may be pre-processed. Because different domain names actually correspond to the same interface at the back end, the related data of the same interface at the back end corresponding to the different domain names needs to be merged. The merged content may include the access amount corresponding to each domain name.
Step S302, configuring a current limiting threshold value for an interface of a server in the system to be managed according to the interface data.
Step S302 may be used to perform initial current limiting threshold setting on the application system, or perform current limiting threshold updating on the interface having the current limiting threshold already set.
Step S302 may include: calculating to obtain an interface index of each interface according to the interface data; and configuring a current limiting threshold value for the interface of the 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 can be set; if the value of the interface index is small, a relatively small current limit threshold may be set.
Calculating interface indexes of each interface according to the interface data, wherein the step 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 time period may be a time period of one day, one week, one month, or the like. Of course, the set time period may also refer to a time period from the application system starting to be applied to the current time, or other time periods that can better represent the operating state of the interface.
Further, the index of each interface can be calculated. The index may include data that can indicate the Transaction capability of the interface, such as the number of times Per Second requests have been processed (QPS), the number of transactions processed Per Second (TPS), and the like. QPS is a measure of how much traffic a particular query server processes within a specified time, and the performance of a machine as a domain name system server can be measured in terms of query rate per second.
The calculation of the number of requests per second for a server is described below by way of an example.
For example, 70% of the day's visits are concentrated in 20% of the time, which 20% of the time is called the peak time. Peak time per second request (QPS) — (total PV > 70%)/(seconds per day > 20%); the required machine is the peak time per second QPS/QPS of a single machine. Wherein, PV number represents (page view, Chinese called: page view amount). In one example, if 300w PV is on a single machine per day, the QPS required for that machine is calculated as: (3000000 × 0.7)/(86400 × 0.2) ═ 139 (QPS). If the QPS of 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 may be acquired and used when each index needs to be used.
The current limiting threshold is correspondingly set according to the index of the interface, so that the application system can be prevented from being crashed, the processing function of the interface can be better utilized, and the interface resource can be used to the maximum extent.
Considering that the amount of requests received by the server may be different in different time periods, only the processing situation of the server at one time can be reflected in different time periods. Therefore, with the wide use of the application system, the current limiting threshold may not be well adapted to the current requirement, and the current limiting threshold may be adaptively adjusted.
In view of the above, as shown in fig. 4, step S302 may also include the following steps.
Step S3021, obtaining a flow rate of an interface 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, such as the last day, last three days, last week, last month, etc. The flow condition of the application system can be shown through a recent period of time, so that whether the current flow limiting threshold value meets the requirement or not can be reflected. For example, if the current threshold is lower than the average access amount of the set time period, or lower than a certain proportion of the average access amount of the set time period, for example, the certain proportion may be 70%, 80%, etc., it indicates that the current threshold may be too low to be set reasonably.
And step S3022, calculating the flow representation value of each interface in the set time period according to the flow of the set time period.
Wherein the flow rate performance value represents a flow rate trend of the set time period. The flow rate representative value may be an average value of the flow rate for a set period of time; or the average flow of the peak time period in the set time period; it may also be a maximum flow for a set period of time.
Step S3023, comparing the flow representation value of any interface with the current limiting threshold of each interface of the server in the system to be managed, and determining whether the flow representation value is within a limited range corresponding to the current limiting threshold.
Specifically, that is, step S3023 may include determining whether the flow rate representative value is within a set proportion smaller than the current flow limiting threshold.
If the flow representation value is not within the limited range corresponding to the current flow limiting threshold value, executing step S3024; if the flow representation value is judged to be in the limited range corresponding to the current flow limiting threshold value, the current flow limiting threshold value can also meet the requirements in an application system, and the flow limiting threshold value does not need to be adjusted.
The limited 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, if the flow rate performance value is an average value of the flow rate in the set time period, 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 the like.
In another embodiment, if the flow expression value is an average flow of the peak time period in the set time period, the limited range corresponding to the current limiting threshold may be relatively large, for example, 75% of the current limiting threshold, 85% of the current limiting threshold, and the like.
In another embodiment, if the flow rate performance value is the maximum flow rate value of the set time period, the limited 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, and the like.
Step S3024, configuring a new current limit threshold for the corresponding interface.
The configured new flow limit threshold may be a flow limit threshold to which the flow representation value may match. Specifically, if the current limiting threshold is smaller, step S3024 may include configuring a new current limiting threshold larger than the current limiting threshold for the corresponding interface.
In one embodiment, the new flow restriction threshold may be configured to be twice, three times, four times, etc. the flow representation value if an average of the flow for a set period of time.
In another embodiment, the new flow limiting threshold may be configured to be 1.5-2 times the flow representation value, etc., if the flow representation value is the average flow of the peak time period in the set time period.
In another embodiment, the new flow limiting threshold may be configured to be 1.2-1.4 times the flow representation value, etc., if the flow representation value is the maximum flow value for the set time period.
Of course, the specific current limiting threshold value can be adjusted according to the actual use trend of the application system. For example, the user growth rate of the application system is relatively fast, and the current limiting threshold can be adjusted to be large.
The maximum flow values of the interfaces in the last day and week are screened out by inquiring the domain names, urls, threshold values, the access layers and 911 configurations of all the 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 flow values, so that problems can be found and positioned in time. Such as finding the QPS of the interface rises, exceeding or approaching the set threshold, and the source of the traffic growth is not abnormal, the threshold configuration of the interface can be adjusted appropriately. Therefore, the system can operate quickly when the current limiting threshold value needs to be adjusted urgently in case of emergency, some emergency conditions of the application system can be adapted, and the adaptability of the application system is improved.
Step S303, the current limiting threshold is pushed to a corresponding server, so that the server reads the current limiting threshold, and the interface flow is controlled according to the current limiting threshold.
As users of the application system increase, some original data interfaces may not be able to meet the requirements of the users for accessing the application system, and therefore some new interfaces may be accessed, and the new interfaces may not be allocated with the current limiting threshold, which may cause the traffic of the new interfaces to be relatively large. 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 may be weekly, daily, every ten days, etc. The user growth condition can be specifically determined according to the update condition of the application system.
Specifically, the set time law may be a user-defined time law, 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 obtained, the method further includes: 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; and if not, configuring a current limiting threshold value for the target interface.
In an embodiment, the step of selecting a target interface satisfying a set 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 a target interface satisfying a set rule according to the interface data includes: and selecting a target interface corresponding to the designated identifier according to the interface data.
The specified identifier may be an identifier that identifies an interface, such as a specified machine code, a target interface for the specified identifier, or the like.
In another embodiment, the step of selecting a target interface satisfying a set 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 interface discovery, and a new core interface which is not accessed with the current limiting function or an interface with higher flow rate is discovered through self-defining an interface discovery rule so as to ensure the continuous effectiveness of the current limiting function and prevent the sudden flow rate of the interface from threatening the service stability.
In order to facilitate operation of some users, an operation interface can be provided, so that the users can adjust the current limiting threshold value according to the requirements of the users.
The interface current limiting control method of the embodiment further includes: receiving a current limiting threshold configured for a designated interface; and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
The staged current limiting is substantially lossy as long as the current limiting operation occurs. Therefore, to reduce the loss, the priority can be set for each interface in the application system, for example, the interfaces can be classified according to the importance degree of the interfaces, and divided into two or three stages, and when a specific fault occurs, the current limit switch will be according to: the three-level interface- > the two-level interface- > part of the one-level interface are sequentially opened, so that the influence on the main process is reduced as much as possible, and the integral stability of the system is kept. Wherein, the first level interface is more important than the second level interface, and the second level interface is more important than the third level interface.
Specifically, the interface current limiting control method in this embodiment further includes: and if the plurality of interfaces reach the current limiting threshold value, gradually starting the current limiting switch according to the priority of each interface in the plurality of interfaces, wherein the interface with the lower priority starts the current limiting switch before the interface with the higher priority.
In this embodiment, the current limiting of each interface may be implemented by starting an interface current limiting algorithm.
Specifically, the current limiting algorithm in the present embodiment may include a token bucket algorithm, a leaky bucket algorithm, a calculator, and the like. One skilled in the art can select any one of the above current limiting algorithms to perform current limiting operations on the interface in light of the present disclosure. The current limiting algorithm used is not limited in this embodiment.
The principle of token bucket algorithm is that the system will put tokens into the bucket at a constant rate, and if the request needs to be processed, it will need to first get a token from the bucket, and if no token is available in the bucket, it will refuse service. In the interface current limiting method applied to the application, when a token in a token bucket algorithm of an interface in an application system is used up, the interface cannot be accessed any more.
The method in the embodiment can uniformly manage interface current limiting configuration by establishing a current limiting platform; the new interface is automatically found, and a large-flow interface is found according to the monitoring data; the rationality of the current limiting threshold is self-discovered, and an interface with unreasonable threshold is screened out through a system general strategy or a user-defined strategy and is adjusted in time; accessing a third-party platform, flexibly managing the current-limiting configuration, namely using the current-limiting configuration after changing, and taking effect in real time; grading interfaces and sequentially limiting current according to importance degree;
the current limiting rule in the control current limiting configuration in this embodiment is not directly configured on an http server (such as nginx), but is controlled by a management platform provided in this embodiment. When the interface current limiting needs to be modified in an emergency, the interface current limiting can be directly operated and issued on the management platform in the embodiment, the interface current limiting takes effect in real time, and the method is quicker and more convenient than the method of directly modifying the current limiting configuration on a machine.
EXAMPLE III
Based on the same application concept, an interface current-limiting control device corresponding to the interface current-limiting control method is further provided in the embodiment of the present application, and as the principle of solving the problem of the device in the embodiment of the present application is similar to that of the interface current-limiting control method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 5, a schematic structural diagram of an interface current-limiting control device according to a fifth embodiment of the present disclosure is shown, where each module and unit of the interface current-limiting control device in the present embodiment are used 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 content of the first and second substances,
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 limiting threshold for an interface of a server in the system to be managed according to the interface data;
the pushing module 403 is configured to push the current limiting threshold to a corresponding server, so that the server reads the current limiting threshold, and controls interface traffic according to the current limiting threshold.
In one possible embodiment: the configuration module 402 includes:
the first calculation unit is used for calculating interface indexes of all the 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, and the flow expression values represent the flow trend of the set time period;
a judging unit, configured to compare the flow representation value of any interface with a current flow limiting threshold of each interface of a server in the system to be managed, and judge whether the flow representation value is within a limit range corresponding to the current flow limiting threshold;
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 as the current limiting threshold value.
In one possible embodiment: the judging unit is further configured to:
and judging whether the flow representation value is smaller than the current flow limiting threshold value set proportion.
In one possible embodiment: the second configuration unit is further configured to:
and configuring a new current limiting threshold value larger than the current limiting threshold value 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 device further comprises:
a selecting module 404, configured to select a target interface meeting a set 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 configuring module 402 is further configured to configure a current limiting threshold for the target interface if the determining module determines that the current is not the target interface.
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 designated 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 device further comprises:
a receiving module 406, configured to receive a configured current limit threshold for a specified interface;
the pushing module 403 is further configured to: and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
In one possible embodiment: the interface of the server in the system to be managed is configured with a priority, and the apparatus 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 the interface with the lower priority starts the current limiting switch before the interface with the higher priority.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the interface current limiting control method in the foregoing method embodiment.
The computer program product of the interface current limiting control method provided in the embodiment of the present application includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the steps of the interface current limiting control method in the above method embodiment, which may be referred to in the above method embodiment specifically, and are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The 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 or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (26)

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 value for an interface of a server in the system to be managed according to the interface data;
and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
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 according to the interface data comprises:
calculating to obtain an interface index of each interface according to the interface data;
and configuring a current limiting threshold value for the interface of the 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 metrics for each interface from 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 configuring a current limit threshold for an interface of a server in the system to be managed according to the interface data comprises:
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;
calculating 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 the flow trend of the set time period;
comparing the flow representation 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 representation value is in the limiting range corresponding to the current limiting threshold value;
and if not, configuring a new current limiting threshold value for the corresponding interface.
5. The method of claim 4, wherein the step of comparing the flow representation value of any interface with a current flow limiting threshold value of each interface of a server in the system to be managed to determine whether the flow representation value is within a defined range corresponding to the current flow limiting threshold value comprises:
and judging whether the flow representation value is smaller than the current flow limiting threshold value set proportion.
6. The method of claim 5, wherein the step of configuring a new current limit threshold for the corresponding interface comprises:
and configuring a new current limiting threshold value larger than the current limiting threshold value for the corresponding interface.
7. The method of claim 1, wherein the step of obtaining interface data of the 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 obtained, the method further includes:
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;
and if not, configuring a current limiting threshold value for the target interface.
8. The method of claim 7, 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.
9. The method of claim 7, 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 designated identifier according to the interface data.
10. The method of claim 7, 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.
11. The method of claim 1, wherein the method further comprises:
receiving a current limiting threshold configured for a designated interface;
and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
12. The method of any one of claims 1-11, wherein an interface of a server in the system to be managed is configured with a priority, the method further comprising:
and if the plurality of interfaces reach the current limiting threshold value, gradually starting the current limiting switch according to the priority of each interface in the plurality of interfaces, wherein the interface with the lower priority starts the current limiting switch before the interface with the higher priority.
13. An interface current limiting control apparatus, 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;
and the pushing module is used for pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
14. The apparatus of claim 13, wherein the configuration module comprises:
the first calculation unit is used for calculating interface indexes of all the 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.
15. The apparatus of claim 14, 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.
16. The apparatus of claim 13, 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, and the flow expression values represent the flow trend of the set time period;
a judging unit, configured to compare the flow representation value of any interface with a current flow limiting threshold of each interface of a server in the system to be managed, and judge whether the flow representation value is within a limit range corresponding to the current flow limiting threshold;
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 as the current limiting threshold value.
17. The apparatus of claim 16, wherein the determining unit is further configured to:
and judging whether the flow representation value is smaller than the current flow limiting threshold value set proportion.
18. The apparatus of claim 17, wherein the second configuration unit is further configured to:
and configuring a new current limiting threshold value larger than the current limiting threshold value for the corresponding interface.
19. The apparatus of claim 13, wherein the obtaining module is further configured to: acquiring interface data of a server in the system to be managed according to a set time rule;
the device 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;
and the configuration module is also used for configuring a current limiting threshold value for the target interface if the judgment module judges that the current limiting threshold value is not the target interface.
20. The apparatus of claim 19, 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.
21. The apparatus of claim 19, wherein the selection module is further configured to:
and selecting a target interface corresponding to the designated identifier according to the interface data.
22. The apparatus of claim 19, wherein the selection module is further configured to:
and selecting a target interface corresponding to the appointed access layer according to the interface data.
23. The apparatus of claim 13, wherein the apparatus further comprises:
the receiving module is used for receiving a current limiting threshold configured for a specified interface;
the pushing module is further configured to: and pushing the current limiting threshold value to a corresponding server so that the server reads the current limiting threshold value and controls the interface flow according to the current limiting threshold value.
24. The apparatus of any one of claims 13-23, 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 plurality of interfaces if the plurality of interfaces reach the current limiting threshold, wherein the interface with the lower priority starts the current limiting switch before the interface with the higher priority.
25. 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 communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 12.
26. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 12.
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 true CN111478857A (en) 2020-07-31
CN111478857B 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)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468557A (en) * 2020-11-16 2021-03-09 北京百度网讯科技有限公司 Method, device, gateway and storage medium for providing network service
CN112612618A (en) * 2020-12-30 2021-04-06 深圳我家云网络科技有限公司 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
CN113794650A (en) * 2021-09-16 2021-12-14 平安国际智慧城市科技股份有限公司 Concurrent request processing method, computer device and computer-readable storage medium
CN113872830A (en) * 2021-09-27 2021-12-31 重庆紫光华山智安科技有限公司 Traffic management method and related device
CN113992596A (en) * 2021-10-18 2022-01-28 北京沃东天骏信息技术有限公司 Interface current limiting method, device, equipment, system and storage medium
CN114844835A (en) * 2022-07-04 2022-08-02 眉山环天智慧科技有限公司 Self-adaptive dynamic current limiting method and device
CN115242722A (en) * 2022-06-14 2022-10-25 中盈优创资讯科技有限公司 Advanced flow control implementation method based on API gateway
CN116112441A (en) * 2023-02-01 2023-05-12 北京百度网讯科技有限公司 Service request current limiting method, device, electronic equipment and storage medium
CN113794650B (en) * 2021-09-16 2024-06-21 深圳平安智慧医健科技有限公司 Concurrent request processing method, computer device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040228277A1 (en) * 2003-05-16 2004-11-18 Williams Christopher Pierce Data transfer application monitor and controller
CN107770088A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of flow control methods and device
US20180212892A1 (en) * 2015-09-24 2018-07-26 Alibaba Group Holding Limited Method, apparatus and system for controlling service transmission rate
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040228277A1 (en) * 2003-05-16 2004-11-18 Williams Christopher Pierce Data transfer application monitor and controller
US20180212892A1 (en) * 2015-09-24 2018-07-26 Alibaba Group Holding Limited Method, apparatus and system for controlling service transmission rate
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

Cited By (15)

* 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
CN112468557A (en) * 2020-11-16 2021-03-09 北京百度网讯科技有限公司 Method, device, gateway and storage medium for providing network service
CN112612618A (en) * 2020-12-30 2021-04-06 深圳我家云网络科技有限公司 Interface current limiting method and device, computer equipment and storage medium
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
CN113794650A (en) * 2021-09-16 2021-12-14 平安国际智慧城市科技股份有限公司 Concurrent request processing method, computer device and computer-readable storage medium
CN113794650B (en) * 2021-09-16 2024-06-21 深圳平安智慧医健科技有限公司 Concurrent request processing method, computer device and computer readable storage medium
CN113872830A (en) * 2021-09-27 2021-12-31 重庆紫光华山智安科技有限公司 Traffic management method and related device
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
CN115242722A (en) * 2022-06-14 2022-10-25 中盈优创资讯科技有限公司 Advanced flow control implementation method based on API gateway
CN115242722B (en) * 2022-06-14 2024-04-16 中盈优创资讯科技有限公司 Advanced flow control implementation method based on API gateway
CN114844835A (en) * 2022-07-04 2022-08-02 眉山环天智慧科技有限公司 Self-adaptive dynamic current limiting method and device
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

Also Published As

Publication number Publication date
CN111478857B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN111478857A (en) Interface current limiting control method and device and electronic equipment
US10152353B2 (en) Account activity level based-system resource allocating method and device
US9413680B1 (en) Multi-tenant throttling approaches
CN109981702B (en) File storage method and system
US10419305B2 (en) Visualization of workload distribution on server resources
US11030169B1 (en) Data re-sharding
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
US20170147395A1 (en) Dynamic timeout period adjustment of service requests
CN112600761A (en) Resource allocation method, device and storage medium
US20230176918A1 (en) Automatic resource quota calculations based on tenant workloads
CN113760516A (en) Elastic expansion method, device, equipment and medium in multi-cloud environment
US10067849B2 (en) Determining dynamic statistics based on key value patterns
CN112286930A (en) Method, device, storage medium and electronic equipment for resource sharing of redis business side
CN112988062A (en) Metadata reading limiting method and device, electronic equipment and medium
CN117118698A (en) Access flow limiting method, device and equipment of metadata server
US11023266B2 (en) Detecting and counteracting a multiprocessor effect in a virtual computing environment
WO2019058265A1 (en) Implementing dynamically and automatically altering user profile for enhanced performance
US11327793B2 (en) Garbage collection work stealing mechanism
US11747978B2 (en) Data compaction in distributed storage system
US11269689B2 (en) Distribution of components of displayed data between a server and a client based on server and client load factors
US10536507B2 (en) Cognitive event based file sharing system for social software
US10754776B2 (en) Cache balance when using hardware transactional memory
US10956037B2 (en) Provisioning storage allocation using prioritized storage system capabilities
US11880762B2 (en) Choosing execution mode of a neural network based on total memory usage
US11755422B2 (en) Staged data backup

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