CN111404824A - Method, apparatus, electronic device and computer readable medium for forwarding a request - Google Patents

Method, apparatus, electronic device and computer readable medium for forwarding a request Download PDF

Info

Publication number
CN111404824A
CN111404824A CN202010153628.0A CN202010153628A CN111404824A CN 111404824 A CN111404824 A CN 111404824A CN 202010153628 A CN202010153628 A CN 202010153628A CN 111404824 A CN111404824 A CN 111404824A
Authority
CN
China
Prior art keywords
request
determining
end system
value
failure rate
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
CN202010153628.0A
Other languages
Chinese (zh)
Other versions
CN111404824B (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010153628.0A priority Critical patent/CN111404824B/en
Publication of CN111404824A publication Critical patent/CN111404824A/en
Application granted granted Critical
Publication of CN111404824B publication Critical patent/CN111404824B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Embodiments of the present disclosure disclose methods, apparatuses, electronic devices and computer readable media for forwarding requests. One embodiment of the method comprises: acquiring the actual rate of the request; determining a current throttling value of a back-end system, wherein the back-end system is used for responding to the request; determining a first current limiting value according to the requested actual speed and the current limiting value; and forwarding the request according to the first flow limiting value. The embodiment realizes shortening of the time for determining the first flow limiting value and simultaneously improves the accuracy of the first flow limiting value.

Description

Method, apparatus, electronic device and computer readable medium for forwarding a request
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a computer-readable medium for forwarding a request.
Background
After the load capacity of the back-end system changes, the current limiting value of the back-end system needs to be determined again through a pressure measurement or evaluation calculation mode. However, the existing method for determining the flow limit value may have a problem of consuming too long time, and may also have a business risk caused by inaccurate evaluation.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a method, an apparatus, an electronic device and a computer-readable medium for forwarding a request to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method for forwarding a request, the method comprising: acquiring the actual rate of the request; determining a current throttling value of a back-end system, wherein the back-end system is used for responding to the request; determining a first current limiting value according to the requested actual speed and the current limiting value; and forwarding the request according to the first flow limiting value.
In a second aspect, some embodiments of the present disclosure provide an apparatus for forwarding a request, the apparatus comprising: an acquisition unit configured to acquire an actual rate of the request; a first determining unit configured to determine a current restriction value of a back-end system, wherein the back-end system is used for responding to a request; a second determining unit configured to determine a first current limit value according to the requested actual rate and the current limit value; and the forwarding unit is configured to forward the request according to the first flow limiting value.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, where the program when executed by a processor implements a method as described in any of the implementations of the first aspect.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: the actual speed of the request and the current flow limiting value of the back-end system are obtained to determine the first flow limiting value, and then the request is forwarded according to the first flow limiting value, so that the time for determining the first flow limiting value is shortened, and the accuracy of the first flow limiting value is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a method for forwarding a request, in accordance with some embodiments of the present disclosure;
fig. 2 is a flow diagram of some embodiments of a method of forwarding a request according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a method of forwarding a request according to the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of an apparatus to forward requests according to the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a schematic diagram of one application scenario of a method for forwarding a request according to some embodiments of the present application.
As shown in fig. 1, in the application scenario of fig. 1, the server 101 may obtain the requested actual rate 106 from the first request 102, the second request 103 and the third request 104. The server 101 may then determine the current choke value 105 for the backend system. The server 101 may then determine a first restriction value 107 based on the actual rate 106 and the current restriction value 105. Finally, the server 101 may forward the request first request 102, second request 103, and third request 104 to the backend system 108 according to the first throttling value 107.
It will be appreciated that the method for forwarding a request may be performed by a terminal device, or may also be performed by a server (such as the server 101 shown in fig. 1), or may also be performed by various software programs. The terminal device may be various electronic devices with information processing capability, including but not limited to a smart phone, a tablet computer, an e-book reader, a laptop portable computer, a desktop computer, and the like. In addition, when the execution subject is software, it can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of servers in fig. 1 is merely illustrative. There may be any number of servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a method for forwarding a request according to the present disclosure is shown. The method for forwarding the request comprises the following steps:
step 201, obtaining the actual rate of the request.
In some embodiments, an executing entity of the method of forwarding requests (e.g., the server shown in fig. 1) may obtain the requests and determine the actual rate of the requests by way of a wired connection or a wireless connection. The request is generally referred to as a user request. The actual rate generally refers to the number of requests received in a cycle.
At step 202, a current choke value of the backend system is determined.
In some embodiments, the execution agent may determine the current choke value of the backend system in various ways. By way of example, the execution agent may determine the current choke value of the back-end system through a connection with the back-end system. Wherein the back-end system is configured to respond to requests. The above-mentioned current limit value generally refers to the number of requests that the backend system can respond to, which is set according to the load capacity of the backend system. The above-mentioned back-end system generally refers to a server, a super server, a cluster system, a midrange system, a mainframe, etc. that processes requests and provides search and sort data, files, and other various services.
Step 203, determining a first current limit value according to the requested actual rate and the current limit value.
In some embodiments, the executing entity may determine the first current throttling value based on the actual rate obtained in step 201 and the current throttling value determined in step 202. As an example, when the actual rate is 5 and the current throttling value is 6, the failure rate of the back-end system responding to the request is high, and it may be determined that the first throttling value is 4.
In some embodiments, the execution agent may set a desired value of a response request failure rate of the backend system and perform observation. Specifically, the expected value of the failure rate is usually set to 5%. Thereafter, determining an actual failure rate of the back-end system to respond to the request, and setting the first current throttling value to a predetermined multiple of the current throttling value when: 1. when the actual failure rate is equal to 0, the first restriction value is set to twice the current restriction value. 2. And when the actual failure rate is equal to 100%, setting the first current limiting value to be one half of the current limiting value. 3. And when the actual failure rate is greater than the expected value of the failure rate, setting the first restriction value as the product of the current restriction value and the ratio of 1 minus the actual failure rate and 1 minus the expected value of the failure rate. 4. And when 0 is smaller than the actual failure rate and smaller than the expected value of the failure rate, setting the first current restriction value as the current restriction value.
As an example, when the actual rate is 1300 and the current throttling value is 900, the expected failure rate of the back-end system to respond to the request is set to 5% and observed: determining that the actual failure rate of the back-end system responding to the request is 31 percent, the actual failure rate is greater than the expected failure rate, and setting the first current limiting value as the product of the current limiting value and the expected value ratio of 1 minus the actual failure rate and 1 minus the failure rate: 1300 x (1-31%)/(1-5%) ═ 944.
As another example, when the actual rate is 2000 and the current throttling value is 944, the expected failure rate of the backend system to respond to the request is set to 5% and observed: determining that the actual failure rate of the back-end system responding to the request is 0%, the actual failure rate is 0, and setting the first current limiting value to be twice of the current limiting value: 944 x 2 ═ 1888.
In some optional implementations of some embodiments, the execution agent may set a desired failure rate of the backend system to respond to the request. And then determining the failure rate of the back-end system to respond to the request. The execution agent may set the current throttling value to a first throttling value when it is determined that the failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests satisfy a first predetermined condition. Here, the first predetermined condition may be that a failure rate of the backend system to respond to the request is less than a desired failure rate of the backend system to respond to the request.
In some optional implementations of some embodiments, the execution agent may set a desired failure rate of the backend system to respond to the request. And then determining the failure rate of the back-end system to respond to the request. And then, when the difference between the failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request is determined to meet a second preset condition, determining a first flow limiting value according to the expected failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request. Here, the second predetermined condition may be that a failure rate of the back-end system responding to the request is greater than the expected failure rate of the back-end system responding to the request. As an example, the first current throttling value may be determined as a product of the current throttling value and a ratio of a rate of failure of the back-end system to respond to requests and a desired rate of failure of the back-end system to respond to requests.
In some optional implementations of some embodiments, the executing entity may determine a failure rate of the backend system to respond to the request. And then, when the failure rate of the back-end system responding to the request is determined to meet a third preset condition, determining the first current limiting value as a preset multiple of the current limiting value. Here, the third predetermined condition may be that the failure rate of the back-end system responding to the request is 100%, or that the failure rate of the back-end system responding to the request is 0. As an example, when the failure rate of the backend system to respond to the request is 0, the first current throttling value may be determined to be twice the current throttling value.
And step 204, forwarding the request according to the first flow limiting value.
In some embodiments, the execution agent may forward the request according to the first current limit value. As an example, when the actual rate of the requests is 8 and the first throttling value of the backend system is 5, 4 of the requests may be forwarded to the backend system.
According to the method provided by some embodiments of the disclosure, the first current limiting value is determined by obtaining the actual rate of the request and the current limiting value of the back-end system, and then the request is forwarded according to the first current limiting value, so that the time for determining the first current limiting value is shortened, and the accuracy of the first current limiting value is improved.
With further reference to fig. 3, a flow 300 of further embodiments of a method for forwarding a request is illustrated. The process 300 of the method for forwarding a request includes the following steps:
step 301, obtain the actual rate of the request.
Step 302, determining a current throttling value of the back-end system.
Step 303, determining a first current limit value according to the requested actual rate and the current limit value.
In some embodiments, the specific implementation and technical effects of steps 301 and 303 can refer to steps 201 and 203 in the embodiments corresponding to fig. 2, which are not described herein again.
In response to determining that the actual rate of the request does not reach the first current limit value, the request is forwarded to the back-end system, step 304.
In some embodiments, the execution agent may forward the request to the backend system when it is determined that the actual rate of the request does not reach the first throttling value.
Step 305, in response to determining that the actual rate of the request exceeds the first current limit value, forwarding a portion of the request to the backend system according to the first current limit value.
In some embodiments, the execution agent may forward some of the requests to a backend system upon determining that the actual rate of the requests exceeds the first throttling value. As an example, when the first throttling value is 50 and the actual rate of the requests is 100, the executing entity may forward 50 of the requests to the backend system.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the flow 300 of the method for forwarding a request in some embodiments corresponding to fig. 3 embodies the step of forwarding the request. Thus, the solutions described in the embodiments can make greater use of the load capacity of the backend system by forwarding requests to the backend system.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an apparatus for forwarding a request, which correspond to those shown in fig. 2, and which may be specifically applied in various electronic devices.
As shown in fig. 4, the apparatus 400 for forwarding a request of some embodiments includes: an obtaining unit 401, a first determining unit 402, a second determining unit 403 and a forwarding unit 404. Wherein, the obtaining unit 401 is configured to obtain an actual rate of the request; the first determining unit 402 is configured to determine a current restriction value of a back-end system, wherein the back-end system is configured to respond to the request; the second determining unit 403 is configured to determine a first current limit value according to the requested actual rate and the current limit value; and the forwarding unit 404 is configured to forward the request according to the first current limit value.
In an optional implementation of some embodiments, the second determining unit 403 of the apparatus 400 for forwarding the request is further configured to: setting a desired failure rate of the back-end system to respond to the request; determining the failure rate of the back-end system to respond to the request; in response to determining that the failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests satisfy a first predetermined condition, setting the current throttling value to a first throttling value.
In an optional implementation of some embodiments, the second determining unit 403 of the apparatus 400 for forwarding the request is further configured to: setting a desired failure rate of the back-end system to respond to the request; determining the failure rate of the back-end system to respond to the request; and in response to determining that the failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request meet a second predetermined condition, determining a first flow limiting value according to the expected failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request.
In an optional implementation of some embodiments, the second determining unit 403 of the apparatus 400 for forwarding the request is further configured to: determining the failure rate of the back-end system to respond to the request; and in response to determining that the failure rate of the back-end system to respond to the request meets a third predetermined condition, determining the first current throttling value as a predetermined multiple of the current throttling value.
In an optional implementation of some embodiments, the forwarding unit 404 of the apparatus 400 for forwarding the request is further configured to: in response to determining that the actual rate of the request does not reach the first current limit value, forwarding the request to a backend system; in response to determining that the actual rate of the requests exceeds the first current limit value, forwarding a portion of the requests to the backend system according to the first current limit value.
It will be understood that the elements described in the apparatus 400 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and will not be described herein again.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., the server of fig. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 507 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 508 including, for example, magnetic tape, hard disk, etc., and communication devices 509. the communication devices 509 may allow the electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). examples of communications networks include local area networks ("L AN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring the actual rate of the request; determining a current flow limit value of a back-end system, wherein the back-end system is used for responding to the request; determining a first current limit value according to the requested actual rate and the current limit value; and forwarding the request according to the first flow limiting value.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language, or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a first determination unit, a second determination unit, and a forwarding unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, the retrieving unit may also be described as a "unit that retrieves the actual rate of requests".
For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CP L D), and so forth.
According to one or more embodiments of the present disclosure, there is provided a method of forwarding a request, including: acquiring the actual rate of the request; determining a current flow limit value of a back-end system, wherein the back-end system is used for responding to the request; determining a first current limit value according to the requested actual rate and the current limit value; and forwarding the request according to the first flow limiting value.
According to one or more embodiments of the present disclosure, the determining the first restriction value includes: setting a desired failure rate of the back-end system to respond to the request; determining the failure rate of the back-end system to respond to the request; in response to determining that the failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests satisfy a first predetermined condition, setting the current throttling value to a first throttling value.
According to one or more embodiments of the present disclosure, the determining the first restriction value includes: setting a desired failure rate of the back-end system to respond to the request; determining the failure rate of the back-end system to respond to the request; and in response to determining that the failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request meet a second predetermined condition, determining a first flow limiting value according to the expected failure rate of the back-end system responding to the request and the expected failure rate of the back-end system responding to the request.
According to one or more embodiments of the present disclosure, the determining the first restriction value includes: determining the failure rate of the back-end system to respond to the request; and in response to determining that the failure rate of the back-end system to respond to the request meets a third predetermined condition, determining the first current throttling value as a predetermined multiple of the current throttling value.
According to one or more embodiments of the present disclosure, the forwarding the request includes: in response to determining that the actual rate of the request does not reach the first current limit value, forwarding the request to a backend system; in response to determining that the actual rate of the requests exceeds the first current limit value, forwarding a portion of the requests to the backend system according to the first current limit value.
According to one or more embodiments of the present disclosure, the apparatus includes: an acquisition unit configured to acquire an actual rate of the request; a first determining unit configured to determine a current restriction value of a back-end system, wherein the back-end system is used for responding to a request; a second determining unit configured to determine a first current limit value according to the requested actual rate and the current limit value; and the forwarding unit is configured to forward the request according to the first flow limiting value.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as described in any of the embodiments above.
According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any of the embodiments above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (8)

1. A method for forwarding a request, comprising:
acquiring the actual rate of the request;
determining a current throttling value of a back-end system, wherein the back-end system is used for responding to a request;
determining a first current limiting value according to the requested actual rate and the current limiting value;
and forwarding the request according to the first flow limiting value.
2. The method of claim 1, wherein the determining a first restriction value comprises:
setting a desired failure rate of the back-end system to respond to the request;
determining a failure rate of the back-end system to respond to the request;
setting the current throttling value to a first throttling value in response to determining that the failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests satisfy a first predetermined condition.
3. The method of claim 1, wherein the determining a first restriction value comprises:
setting a desired failure rate of the back-end system to respond to the request;
determining a failure rate of the back-end system to respond to the request;
in response to determining that the failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests satisfy a second predetermined condition, determining a first throttling value according to the expected failure rate of the back-end system to respond to requests and the expected failure rate of the back-end system to respond to requests.
4. The method of claim 1, wherein the determining a first restriction value comprises:
determining a failure rate of the back-end system to respond to the request;
in response to determining that the failure rate of the back-end system to respond to requests satisfies a third predetermined condition, determining the first restriction value as a predetermined multiple of the current restriction value.
5. The method of claim 1, wherein the forwarding the request comprises:
in response to determining that the actual rate of the request does not reach the first throttling value, forwarding the request to a backend system;
in response to determining that the actual rate of requests exceeds the first current limit value, forwarding portions of the requests to a backend system according to the first current limit value.
6. An apparatus for forwarding a request, comprising:
an acquisition unit configured to acquire an actual rate of the request;
a first determining unit configured to determine a current choke value of a back-end system, wherein the back-end system is used for responding to a request;
a second determining unit configured to determine a first current limit value according to the requested actual rate and the current limit value;
a forwarding unit configured to forward the request according to the first throttling value.
7. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
8. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202010153628.0A 2020-03-06 2020-03-06 Method, apparatus, electronic device, and computer-readable medium for forwarding request Active CN111404824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010153628.0A CN111404824B (en) 2020-03-06 2020-03-06 Method, apparatus, electronic device, and computer-readable medium for forwarding request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010153628.0A CN111404824B (en) 2020-03-06 2020-03-06 Method, apparatus, electronic device, and computer-readable medium for forwarding request

Publications (2)

Publication Number Publication Date
CN111404824A true CN111404824A (en) 2020-07-10
CN111404824B CN111404824B (en) 2023-05-19

Family

ID=71430575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010153628.0A Active CN111404824B (en) 2020-03-06 2020-03-06 Method, apparatus, electronic device, and computer-readable medium for forwarding request

Country Status (1)

Country Link
CN (1) CN111404824B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070121596A1 (en) * 2005-08-09 2007-05-31 Sipera Systems, Inc. System and method for providing network level and nodal level vulnerability protection in VoIP networks
WO2015065041A1 (en) * 2013-11-01 2015-05-07 Lg Electronics Inc. Method and apparatus for transmitting paging message in wireless communication system
US20170180414A1 (en) * 2015-12-16 2017-06-22 Verizon Digital Media Services Inc. Distributed Rate Limiting
CN109150744A (en) * 2018-09-21 2019-01-04 福建南威软件有限公司 A kind of gateway service scheduling promotion and demotion method based on API state
CN109861920A (en) * 2019-01-16 2019-06-07 深圳市融汇通金科技有限公司 A kind of method and device of elasticity current limliting
CN110138756A (en) * 2019-04-30 2019-08-16 网宿科技股份有限公司 A kind of current-limiting method and system
CN110401720A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 Information processing method, device, system, application server and medium
CN110730136A (en) * 2019-10-10 2020-01-24 腾讯科技(深圳)有限公司 Method, device, server and storage medium for realizing flow control
US20200052957A1 (en) * 2018-08-07 2020-02-13 International Business Machines Corporation Centralized rate limiters for services in cloud based computing environments

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070121596A1 (en) * 2005-08-09 2007-05-31 Sipera Systems, Inc. System and method for providing network level and nodal level vulnerability protection in VoIP networks
WO2015065041A1 (en) * 2013-11-01 2015-05-07 Lg Electronics Inc. Method and apparatus for transmitting paging message in wireless communication system
US20170180414A1 (en) * 2015-12-16 2017-06-22 Verizon Digital Media Services Inc. Distributed Rate Limiting
US20200052957A1 (en) * 2018-08-07 2020-02-13 International Business Machines Corporation Centralized rate limiters for services in cloud based computing environments
CN109150744A (en) * 2018-09-21 2019-01-04 福建南威软件有限公司 A kind of gateway service scheduling promotion and demotion method based on API state
CN109861920A (en) * 2019-01-16 2019-06-07 深圳市融汇通金科技有限公司 A kind of method and device of elasticity current limliting
CN110138756A (en) * 2019-04-30 2019-08-16 网宿科技股份有限公司 A kind of current-limiting method and system
CN110401720A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 Information processing method, device, system, application server and medium
CN110730136A (en) * 2019-10-10 2020-01-24 腾讯科技(深圳)有限公司 Method, device, server and storage medium for realizing flow control

Also Published As

Publication number Publication date
CN111404824B (en) 2023-05-19

Similar Documents

Publication Publication Date Title
CN111800513B (en) Method and device for pushing information and computer readable medium of electronic equipment
CN113934958B (en) Page loading method and device, electronic equipment and computer readable medium
CN111966950B (en) Log sending method and device, electronic equipment and computer readable medium
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN111596992A (en) Navigation bar display method and device and electronic equipment
CN111385150A (en) Method and device for acquiring information
CN116594568A (en) Data storage method and device, electronic equipment and storage medium
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN111726476B (en) Image processing method, device, equipment and computer readable medium
CN114785770A (en) Mirror layer file sending method and device, electronic equipment and computer readable medium
CN111404824A (en) Method, apparatus, electronic device and computer readable medium for forwarding a request
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN114035861A (en) Cluster configuration method and device, electronic equipment and computer readable medium
CN112100205A (en) Data processing method, device, equipment and computer readable medium
CN113760929A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN111580890A (en) Method, apparatus, electronic device, and computer-readable medium for processing features
CN112311842A (en) Method and device for information interaction
CN110417596B (en) Capacity expansion method and device for available area
CN113342837B (en) Data transmission method, device, electronic equipment and computer readable medium
CN115269645A (en) Information query method and device, electronic equipment and computer readable medium
CN113722313A (en) Data write request processing method, device, equipment and computer readable medium
CN117520399A (en) Data storage method, apparatus, electronic device, and computer readable medium
CN115827415A (en) System process performance test method, device, equipment and computer medium
CN114444064A (en) Account processing method and device, electronic equipment and computer readable medium
CN113472565A (en) Method, device, equipment and computer readable medium for expanding server function

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant