CN115396379A - Flow control method, device, equipment and medium for service server - Google Patents

Flow control method, device, equipment and medium for service server Download PDF

Info

Publication number
CN115396379A
CN115396379A CN202211016071.1A CN202211016071A CN115396379A CN 115396379 A CN115396379 A CN 115396379A CN 202211016071 A CN202211016071 A CN 202211016071A CN 115396379 A CN115396379 A CN 115396379A
Authority
CN
China
Prior art keywords
flow control
upstream
service
current flow
data request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211016071.1A
Other languages
Chinese (zh)
Inventor
钱嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202211016071.1A priority Critical patent/CN115396379A/en
Publication of CN115396379A publication Critical patent/CN115396379A/en
Pending legal-status Critical Current

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
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the disclosure discloses a flow control method, a flow control device, flow control equipment and a flow control medium for a service end. One embodiment of the method comprises: responding to a service data request sent by a receiving terminal, inquiring a current flow control threshold value from an upstream processing module, wherein the current flow control threshold value is obtained by the upstream processing module from an upstream service analysis component, and the current flow control threshold value is obtained by analyzing the upstream service analysis component according to a call log reported by a service server; determining whether the service data request triggers a current flow control condition, wherein the current flow control condition comprises a flow control threshold value obtained from an upstream service analysis end; and responding to the current flow control condition triggered by the service data request, and performing flow control processing on the service data request according to the configured flow control processing mode. The embodiment is related to flow control, realizes active flow control of a downstream server and improves the self-adaptability of the flow control.

Description

Flow control method, device, equipment and medium for service server
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a flow control method, a flow control device, flow control equipment and a flow control medium for a service end.
Background
For traffic scenarios where upstream and downstream call scenarios exist, a fixed traffic threshold is typically used for traffic control. And when the flow received by the upstream service end is larger than the flow threshold value, starting the flow limitation to avoid exceeding the maximum load capacity.
However, when the flow control is performed in the above manner, there are often technical problems as follows:
firstly, a downstream server (including a business server) cannot sense the abnormality of an upstream server and needs to manually perform current limiting on the downstream server;
secondly, if the load capacity of the upstream server is reduced due to an abnormality, the flow threshold value is not automatically adjusted, and the flow exceeds the actual load capacity of the upstream server.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art.
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 flow control method, apparatus, device and computer readable medium for a downstream server to solve one or more of the technical problems mentioned in the above background section.
In a first aspect, some embodiments of the present disclosure provide a flow control method for a downstream server, including: responding to a service data request sent by a receiving terminal, inquiring a current flow control threshold value from an upstream processing module, wherein the current flow control threshold value is obtained by the upstream processing module from an upstream service analysis end, and the current flow control threshold value is obtained by analyzing an upstream service analysis end according to a call log reported by the service end; determining whether the service data request triggers a current flow control condition, wherein the current flow control condition comprises a current flow control threshold; and responding to the current flow control condition triggered by the service data request, and performing flow control processing on the service data request according to the configured flow control processing mode.
In a second aspect, some embodiments of the present disclosure provide a traffic control method and apparatus for a service end, where the apparatus includes: the query unit is configured to query a current flow control threshold from an upstream processing module in response to receiving a service data request sent by a terminal, wherein the current flow control threshold is obtained by the upstream processing module from an upstream service analysis end, and the current flow control threshold is obtained by analyzing a call log reported by the service analysis end by the upstream service analysis end; a determining unit configured to determine whether the service data request triggers a current flow control condition, where the current flow control condition includes a flow control threshold obtained from an upstream service analysis end; and the flow control processing unit is configured to respond to the condition that the service data request triggers the current flow control, and perform flow control processing on the service data request according to the configured flow control processing mode.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, which when executed by one or more processors cause the one or more processors to implement the method described in any implementation of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: when the flow control condition is triggered, the downstream server can actively perform flow control, so that the load of the upstream server is reduced. In the process, the flow control threshold value automatically obtained from the upstream service analysis end is used for avoiding manual flow limitation on the downstream service end, so that the active flow control of the downstream service end is realized, and the adaptability of the flow control 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 elements are not necessarily drawn to scale.
FIG. 1 is an exemplary timing diagram for implementing a call;
fig. 2 is a flow diagram of some embodiments of a flow control method for a business server according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a flow control method for a business server according to the present disclosure;
FIG. 4 is a block diagram of some embodiments of a flow control device for a service end in accordance with 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 so that this disclosure will be thorough and complete. It should be understood that the drawings and the 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 disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is an exemplary timing diagram for implementing a call.
As shown in fig. 1, the terminal application 101, the downstream server 102, the upstream service analyzer 103, and the upstream server 104 are involved in one call. Wherein the downstream service end 102 can be used for providing downstream services. The upstream service end 104 may be used to provide an upstream service, and the downstream service and the upstream service may be different services having a dependency relationship. For example, the downstream service may be a goods information query service and the upstream service may be a goods inventory query service. When the commodity information inquiry service provides commodity information to the outside, the commodity information without inventory needs to be filtered, so that the commodity inventory inquiry service needs to be called to obtain the commodity inventory information, and the commodity information without inventory is further filtered. As another example, the downstream service may be a logging service and the upstream service may be a database service.
The downstream server 102 and the upstream server 104 may be different servers, and data transmission between the downstream server 102 and the upstream server 104 may be performed through a protocol (e.g., http, webservice, rpc framework protocol) agreed in advance. The upstream service analysis end 103 may be deployed independently, and may be configured to perform analysis periodically according to the call log reported by the downstream service end 102, so as to obtain the flow control threshold. On this basis, the generated flow control threshold may also be sent to the downstream server 102, so as to dynamically update the flow control threshold. In general, the downstream server 102 may include a service server (service processing module) 1021 and an upstream processing module 1022.
As shown in fig. 1, the terminal application 101 may send a service data request to the service server 1021 according to the service requirement. On this basis, the service end 1021 can query the routing policy (i.e. flow control threshold) from the upstream processing module 1022 in response to receiving the service data request. On this basis, a routing policy may be executed, i.e., it may be determined whether the service data request triggers the current flow control condition. On the basis, the current flow control condition is triggered in response to the determined service data request, and flow control processing is carried out on the service data request according to the configured flow control processing mode.
Optionally, in response to determining that the current flow control condition is not triggered by the service data request, a data request may be sent to the upstream server 104 corresponding to the downstream server to obtain upstream data; and returning the service data corresponding to the service data request to the terminal application 101 based on the upstream data.
Optionally, the service end 1021 may also report an upstream call condition, for example, report a call log, to the upstream service analysis end 103. On the basis, the upstream service analysis end 103 can perform the state analysis of the upstream service (i.e. the upstream interface). On this basis, if the routing policy obtained by the analysis changes, the local routing policy of the service server 1021 can be updated.
With continued reference to fig. 2, a flow 200 of some embodiments of a flow control method for a traffic server in accordance with the present disclosure is shown. The flow control method for the service end comprises the following steps:
step 201, in response to receiving a service data request sent by a terminal, querying a current flow control threshold from an upstream processing module.
In some embodiments, an executing entity (e.g., the service end 1021 shown in fig. 1) of the flow control method for the service end may query a current flow control threshold from an upstream processing module in response to receiving a service data request sent by the terminal. The current flow control threshold is obtained by the upstream processing module from the upstream service analysis end, and the current flow control threshold is obtained by analyzing the call log reported by the upstream service analysis end according to the service end. Therefore, it can be seen that the current flow control threshold value is dynamically changed according to the service condition, the change of the service condition (i.e. the change of the calling condition) is reflected in the call log, and the flow control threshold value is changed accordingly. For example, traffic flows vary in different time periods during a day, and the flow control threshold may vary from time point to time point. For example, in units of days, traffic changes cause traffic changes, which cause changes in the flow control threshold, and thus flow control conditions.
Step 202, determining whether the service data request triggers a current flow control condition, where the current flow control condition includes a current flow control threshold.
In some embodiments, the executing agent may determine whether the traffic data request triggers a current flow control condition. The service data may be various data according to different application scenarios or service requirements. For example, the business data may be commodity information.
In some embodiments, the current flow control condition comprises a flow control threshold obtained from an upstream service analysis end. In practice, the flow control threshold may be a call volume threshold and/or a response time threshold. Thus, the executing entity may determine whether the service data request triggers the current flow control condition by: for example, determining whether the current call volume is greater than a call volume threshold; as another example, it is determined whether the response time of the current upstream server is greater than a response time threshold. In addition to this, the flow control threshold may also be an anomaly (availability) threshold. In practice, any one or any two or more of the above flow control thresholds may be selected. For example, the flow control threshold may include a call volume threshold, a response time threshold, and an exception (availability) threshold, and at this time, it may be set that the current flow control condition is triggered only if all three thresholds are satisfied.
In practice, the annotation function provided in the SDK (Software Development Kit) may be used to configure what kind of thresholds and initial values the flow control thresholds specifically include, and the flow control processing manner.
In some embodiments, the current flow control condition includes at least one flow control indicator and a sequence of sub-flow control thresholds. For example, the at least one flow control metric may include a number of calls (QPS), interface performance (TP), EXCEPTION (EXCEPTION). The sub-flow control threshold sequence may be "95", "2000", "default". At this time, determining whether the service data request triggers a current flow control condition includes: sequentially determining each flow control index in at least one flow control index as a target flow control index according to a preset sequence; and determining an index value of the service data request corresponding to the target flow control index for the target flow control index, and determining whether the service data request triggers the current flow control condition according to the index value and a sub-flow control threshold value corresponding to the target flow control index. The sub-flow control threshold corresponding to the target flow control index may be a sub-flow control threshold at a corresponding position in the sub-flow control threshold sequence. For example, the number of calls in the preconfigured sequence is ranked first, and the sub-flow control threshold corresponding to the number of calls is the sub-flow control threshold ranked first in the sub-flow control threshold sequence. For example, the preconfigured order may be QPS- > TP- > EXCEPTION. At this time, the number of calls may be first determined as a target flow control indicator, and it is determined whether the number of calls corresponding to the service data request is greater than 95. Similarly, the determination of the remaining flow control indicators can be completed. And finally, the judgment results corresponding to all flow control indexes can be integrated to determine whether the service data request triggers the current flow control condition. For example, if all three flow control indexes are greater than the corresponding sub-flow control threshold, the current flow control condition is determined to be triggered. In practice, the setting can be performed according to actual needs.
Step 203, in response to determining that the service data request triggers the current flow control condition, performing flow control processing on the service data request according to the configured flow control processing mode.
In some embodiments, on the basis of step 201, in response to determining that the current call volume is greater than the call volume threshold, or determining that the response time of the current upstream server is greater than the response time threshold, that is, in response to determining that the current flow control condition is triggered by the service data request, flow control processing may be performed on the service data request according to the configured flow control processing manner. In practice, the flow control processing means may include, but is not limited to: exceptions are thrown outward, handled by the downstream server itself, returned null, no type return (VOID), etc.
In some embodiments, when the flow control condition is triggered, the downstream server may actively perform flow control, thereby reducing the load of the upstream server. In the process, the flow control threshold value automatically obtained from the upstream service analysis end is used for avoiding manual flow limitation on the downstream service end, so that the active flow control of the downstream service end is realized, and the adaptability of the flow control is improved. In general, upstream processing modules
With further reference to fig. 3, a flow 300 of further embodiments of a flow control method for a service server is shown. The flow 300 of the flow control method for the service end includes the following steps:
step 301, in response to receiving a service data request sent by a terminal, querying a current flow control threshold from an upstream processing module.
Step 302, determining whether the service data request triggers a current flow control condition, where the current flow control condition includes a current flow control threshold.
Step 303, in response to determining that the service data request triggers the current flow control condition, performing flow control processing on the service data request according to the configured flow control processing manner.
In some embodiments, the specific implementation of steps 301 to 303 and the technical effect thereof may refer to steps 201 to 203 in those embodiments corresponding to fig. 2, and are not described herein again.
Step 304, in response to determining that the current flow control condition is not triggered by the service data request, sending a data request to an upstream server corresponding to the downstream server to obtain upstream data.
In some embodiments, in response to determining that the service data request does not trigger the current flow control condition, an execution subject of the flow control method for the downstream server may send a data request to an upstream server corresponding to the downstream server to obtain upstream data.
And 305, returning the service data corresponding to the service data request to the terminal based on the upstream data.
In some embodiments, the execution body may generate the service data based on the upstream data and return the service data to the terminal. In practice, as an example, the downstream service may be a commodity information query service, the upstream service may be a scenario of a commodity inventory query service, and the upstream data is commodity inventory information. On the basis, the execution main body can filter the full amount of commodity information according to the commodity inventory information, filter out the commodity information without inventory and obtain the commodity information of the commodities with inventory, namely the business data. On this basis, the service data can be returned to the terminal.
And step 306, collecting and storing a call log in a call process aiming at the upstream server, wherein the call log comprises an upstream server identifier, response time and abnormity of the upstream server, call times and call time.
In some embodiments, the execution agent may collect a call log. By way of example, the execution subject may collect a call log, where the call log includes an identifier of the upstream server, response time and exception of the upstream server, the number of calls, call time, and other indicators. These metrics may be used to characterize the service performance of upstream services as well as abnormal situations. In practice, the collected call log may be stored locally.
Optionally, the collected call logs may be merged according to the identifier of the upstream server, so as to reduce the number of reports and control the size of a single reported message.
And 307, periodically reporting the stored call logs to an upstream service analysis end, wherein the upstream service analysis end is used for analyzing the received call logs to obtain a flow control threshold value.
In some embodiments, the call log may be reported to the upstream service analyzer periodically (e.g., every second) on the basis of step 305. On the basis, the call quantity threshold value is determined based on the average value of the quantity of simultaneous calls in the historical time period, and the response time threshold value is determined based on the average response time in the historical time period.
For example, the upstream service analysis end may determine the flow control threshold according to the following manner. For example, the average value of the simultaneous flow rate is multiplied by the percentage of buoyancy for thirty days to obtain the flow control threshold. As another example, flow control threshold = unit time (fixed value)/thirty days average response time (1-percent float down).
In practice, the same downstream server often corresponds to a plurality of upstream servers, and in this case, the method further includes: allocating a corresponding identifier for each upstream server in a plurality of upstream servers; and collecting and storing a call log in a call process aiming at the upstream server, wherein the call log comprises the following steps: and for each upstream server, acquiring a call log in a call process aiming at the upstream server, and storing the call log in association with the identifier corresponding to the upstream server. Therefore, the call logs corresponding to different upstream servers can be stored in a distinguishing way.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the flow 300 of the flow control method for the downstream service end in some embodiments corresponding to fig. 3 embodies a log reporting process, so that the upstream service analysis end can periodically adjust the flow control threshold, and automatically adjust the flow control threshold, so as to adapt to the reduction of the load capacity of the upstream service end due to the abnormality.
With further reference to fig. 4, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a flow control apparatus for a downstream server, which correspond to those method embodiments illustrated in fig. 2, and which may be particularly applicable in various electronic devices.
As shown in fig. 4, the flow control device 400 for the downstream server according to some embodiments includes: a query unit 401, configured to, in response to receiving a service data request sent by a terminal, query, from an upstream processing module, a current flow control threshold, where the current flow control threshold is obtained by the upstream processing module from an upstream service analysis end, and the current flow control threshold is obtained by analyzing, by the upstream service analysis end, a call log reported by a service end; the determining unit 402 is configured to determine whether the service data request triggers a current flow control condition, where the current flow control condition includes a current flow control threshold; the flow control processing unit 403 is configured to, in response to determining that the service data request triggers the current flow control condition, perform flow control processing on the service data request according to the configured flow control processing manner.
In some optional implementations of some embodiments, the apparatus 400 further comprises: the sending unit is configured to respond to the fact that the service data request does not trigger the current flow control condition, and send the data request to an upstream server corresponding to the service server to obtain upstream data; and the return unit is configured to return the service data corresponding to the service data request to the terminal based on the upstream data.
In some optional implementations of some embodiments, the apparatus 400 further comprises: the acquisition unit is configured to acquire and store a call log in a call process aiming at the upstream server, wherein the call log comprises an upstream server identifier, response time and abnormity of the upstream server, call times and call time; and the reporting unit is configured to periodically report the stored call logs to the upstream service analysis end.
In some optional implementations of some embodiments, the flow control threshold comprises a call volume threshold or a response time threshold.
In some optional implementations of some embodiments, the service end corresponds to a plurality of upstream service ends; the apparatus 400 further comprises: an allocation unit configured to allocate a corresponding identifier to each of the plurality of upstream servers; the acquisition unit is further configured to acquire, for each upstream server, a call log in a call process for the upstream server, and store the call log in association with an identifier corresponding to the upstream server.
In some optional implementations of some embodiments, the current flow control condition includes at least one flow control indicator and a sub-flow control threshold sequence; the determining unit 402 is further configured to sequentially determine each of the at least one flow control index as a target flow control index in a preconfigured order; and determining an index value of the service data request corresponding to the target flow control index for the target flow control index, and determining whether the service data request triggers the current flow control condition according to the index value and a sub-flow control threshold value corresponding to the target flow control index.
In some alternative implementations of some embodiments, the call volume threshold is determined based on an average of the number of simultaneous calls over the historical time period, and the response time threshold is determined based on an average response time over the historical time period.
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 downstream server in 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 ROM 502, 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.
Generally, the following devices may be connected to the I/O interface 505: 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 (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
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 device 509, or installed from the storage device 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 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 communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("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 network.
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: responding to a service data request sent by a receiving terminal, inquiring a current flow control threshold value from an upstream processing module, wherein the current flow control threshold value is obtained by the upstream processing module from an upstream service analysis end, and the current flow control threshold value is obtained by analyzing an upstream service analysis end according to a call log reported by the service end; determining whether the service data request triggers a current flow control condition, wherein the current flow control condition comprises a current flow control threshold; and responding to the current flow control condition triggered by the service data request, and performing flow control processing on the service data request according to the configured flow control processing mode.
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 program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 a determination unit and a flow control processing unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, the determining unit may also be described as a "unit determining whether a service data request triggers a current flow control condition".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components 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 (CPLDs), and the like.
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 combinations of the above-mentioned features, and other embodiments in which the above-mentioned features or their equivalents are combined arbitrarily without departing from the spirit of the invention are also encompassed. 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 (10)

1. A flow control method for a service end comprises the following steps:
responding to a service data request sent by a receiving terminal, inquiring a current flow control threshold value from an upstream processing module, wherein the current flow control threshold value is obtained by the upstream processing module from an upstream service analysis terminal, and the current flow control threshold value is obtained by analyzing a call log reported by the service analysis terminal according to the upstream service analysis terminal;
determining whether the service data request triggers a current flow control condition, wherein the current flow control condition comprises a current flow control threshold;
and responding to the current flow control condition triggered by the service data request, and performing flow control processing on the service data request according to the configured flow control processing mode.
2. The method of claim 1, wherein the method further comprises:
in response to determining that the current flow control condition is not triggered by the service data request, sending a data request to an upstream server corresponding to the service server to obtain upstream data;
and returning the service data corresponding to the service data request to the terminal based on the upstream data.
3. The method of claim 2, wherein the method further comprises:
acquiring and storing a call log in a call process aiming at the upstream server, wherein the call log comprises an upstream server identifier, response time and abnormity of the upstream server, call times and call time;
and periodically reporting the stored call logs to the upstream service analysis end.
4. The method of claim 1, wherein the current flow control threshold comprises a call volume threshold or a response time threshold.
5. The method of claim 3, wherein the traffic service corresponds to a plurality of upstream services; and the method further comprises:
allocating a corresponding identifier to each upstream server in the plurality of upstream servers; and
the collecting and storing call logs in the call process aiming at the upstream server comprises the following steps:
and for each upstream server, acquiring a call log in a call process aiming at the upstream server, and storing the call log in association with an identifier corresponding to the upstream server.
6. The method of claim 3, wherein the current flow control condition comprises at least one flow control indicator and a sequence of sub-flow control thresholds; and
the determining whether the service data request triggers a current flow control condition includes:
sequentially determining each flow control index in the at least one flow control index as a target flow control index according to a preset sequence;
and determining an index value of the service data request corresponding to the target flow control index for the target flow control index, and determining whether the service data request triggers a current flow control condition according to the index value and a sub-flow control threshold value corresponding to the target flow control index.
7. The method of claim 4, wherein the call volume threshold is determined based on an average of the volume of simultaneous calls over a historical period of time and the response time threshold is determined based on an average response time over the historical period of time.
8. A flow control device for a service end of a service, comprising:
the query unit is configured to query a current flow control threshold value from an upstream processing module in response to receiving a service data request sent by a terminal, wherein the current flow control threshold value is obtained by the upstream processing module from an upstream service analysis end, and the current flow control threshold value is obtained by the upstream service analysis end according to the analysis of a call log reported by the service end;
a determining unit configured to determine whether the service data request triggers a current flow control condition, where the current flow control condition includes the current flow control threshold;
and the flow control processing unit is configured to respond to the condition that the service data request triggers the current flow control, and carry out flow control processing on the service data request according to the configured flow control processing mode.
9. 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-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202211016071.1A 2022-08-24 2022-08-24 Flow control method, device, equipment and medium for service server Pending CN115396379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211016071.1A CN115396379A (en) 2022-08-24 2022-08-24 Flow control method, device, equipment and medium for service server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211016071.1A CN115396379A (en) 2022-08-24 2022-08-24 Flow control method, device, equipment and medium for service server

Publications (1)

Publication Number Publication Date
CN115396379A true CN115396379A (en) 2022-11-25

Family

ID=84120488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211016071.1A Pending CN115396379A (en) 2022-08-24 2022-08-24 Flow control method, device, equipment and medium for service server

Country Status (1)

Country Link
CN (1) CN115396379A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222426A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 The method of flow control, apparatus and system
CN107454004A (en) * 2016-05-30 2017-12-08 阿里巴巴集团控股有限公司 A kind of flow control methods and device
KR20190017351A (en) * 2017-08-11 2019-02-20 (주)엔텔스 TRAFFIC CONTROL METHOD AND TRAFFIC CONTROL SERVER FOR IoT SERVICE
CN111598425A (en) * 2020-05-08 2020-08-28 拉扎斯网络科技(上海)有限公司 Order flow control method and device
CN111741016A (en) * 2020-07-23 2020-10-02 南京梦饷网络科技有限公司 Method, computing device, and computer storage medium for managing application interfaces
CN113206797A (en) * 2021-05-07 2021-08-03 上海微盟企业发展有限公司 Flow control method and device, electronic equipment and storage medium
CN113986391A (en) * 2021-10-29 2022-01-28 杭州网易云音乐科技有限公司 Request processing method, device, medium and computing equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222426A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 The method of flow control, apparatus and system
CN107454004A (en) * 2016-05-30 2017-12-08 阿里巴巴集团控股有限公司 A kind of flow control methods and device
KR20190017351A (en) * 2017-08-11 2019-02-20 (주)엔텔스 TRAFFIC CONTROL METHOD AND TRAFFIC CONTROL SERVER FOR IoT SERVICE
CN111598425A (en) * 2020-05-08 2020-08-28 拉扎斯网络科技(上海)有限公司 Order flow control method and device
CN111741016A (en) * 2020-07-23 2020-10-02 南京梦饷网络科技有限公司 Method, computing device, and computer storage medium for managing application interfaces
CN113206797A (en) * 2021-05-07 2021-08-03 上海微盟企业发展有限公司 Flow control method and device, electronic equipment and storage medium
CN113986391A (en) * 2021-10-29 2022-01-28 杭州网易云音乐科技有限公司 Request processing method, device, medium and computing equipment

Similar Documents

Publication Publication Date Title
CN111950988B (en) Distributed workflow scheduling method and device, storage medium and electronic equipment
CN111124819A (en) Method and device for monitoring full link
CN109933508B (en) Method and apparatus for transmitting information
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN113988720B (en) Shunting path generation method and device, electronic equipment and computer readable medium
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN113094002B (en) Message processing method, device, electronic equipment and computer medium
CN115396379A (en) Flow control method, device, equipment and medium for service server
CN113630327B (en) Flow control method and device, electronic equipment and computer readable medium
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
KR102687532B1 (en) System performance parameter transmission methods, devices, management facilities and storage media
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN114564249A (en) Recommendation scheduling engine, recommendation scheduling method, and computer-readable storage medium
CN114035861A (en) Cluster configuration method and device, electronic equipment and computer readable medium
CN114049065A (en) Data processing method, device and system
CN112543228A (en) Data transmission method and device, electronic equipment and computer readable medium
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN112507676A (en) Energy report generation method and device, electronic equipment and computer readable medium
CN113743807B (en) Scheduling information generation method, device, electronic equipment and computer readable medium
CN113537028B (en) Control method, apparatus, device and medium for face recognition system
CN113037597B (en) Flow monitoring method and device, electronic equipment and computer readable medium
CN112965827B (en) Information scheduling method and device, electronic equipment and computer medium
CN112307032A (en) Application index determination method and device, electronic equipment and computer readable medium
CN113722313A (en) Data write request processing method, device, equipment and computer readable medium
CN116192929A (en) Micro-service adjustment method, micro-service adjustment device, electronic equipment and computer readable medium

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