CN107454004A - A kind of flow control methods and device - Google Patents

A kind of flow control methods and device Download PDF

Info

Publication number
CN107454004A
CN107454004A CN201610369698.3A CN201610369698A CN107454004A CN 107454004 A CN107454004 A CN 107454004A CN 201610369698 A CN201610369698 A CN 201610369698A CN 107454004 A CN107454004 A CN 107454004A
Authority
CN
China
Prior art keywords
threshold value
flow control
server end
control
response time
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
CN201610369698.3A
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610369698.3A priority Critical patent/CN107454004A/en
Publication of CN107454004A publication Critical patent/CN107454004A/en
Pending legal-status Critical Current

Links

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

Landscapes

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

Abstract

This application provides a kind of flow control methods and device, wherein, this method includes:When it is determined that needing to carry out flow control, server end obtains the average response time of current service request;Server end carries out degradation processing according to the average response time convection current control threshold value;Server end carries out flow control using the stream control threshold value after degradation processing.The technical scheme provided using the embodiment of the present application, it is bad to the fluid control effect of system caused by a fixed value that can solve to flow control threshold value in the prior art, can not automatically adaptive system load condition change technical problem, reach and dynamic stream control is realized by the adjustment of convection current control threshold value when business average response time is long, so as to effectively reduce the service response time to improve the purpose of business processing efficiency.

Description

A kind of flow control methods and device
Technical field
The application belongs to technical field of the computer network, more particularly to a kind of flow control methods and device.
Background technology
Flow control is a kind of a kind of control mode that the control to computer network flow is realized using software or hardware mode, stream Amount control can effectively prevent the impact that the mass data due to moment in network is come to Netowrk tape, thereby may be ensured that user The operation of network-efficient and stabilization.
At present, flow control technique mainly has two kinds:
1) traditional stream prosecutor formula:Pass through QoS (Quality of Service, service quality) module of router, interchanger The flow control based on source address, destination address, source port, destination interface and protocol type is realized, is properly termed as four layers Stream control;
2) intelligence flow prosecutor formula:This stream prosecutor formula is to carry out stream control in application layer, belongs to seven laminar flow controls.
It can be perceived for seven above-mentioned laminar flow prosecutor formulas in application layer, currently used mode is mainly to carry out flow threshold Monitoring and the interception to flow, interception is carried out to the flow that threshold value is controlled beyond stream and is considered as flow control completion.
However, the structure and situation of system are extremely complex, if carrying out flow only with a default fixed stream control threshold value Control, i.e. then all flows are controlled all using the stream control threshold value of the fixation as threshold value, for without departing from the stream control threshold The flow of value is without intercepting, for all being intercepted beyond all flows of the stream control threshold value.This control mode obviously compares It is more inflexible, according to the actual conditions of system and it can not need to carry out system more comprehensively and rational protection.
In view of the above-mentioned problems, not yet propose effective solution at present.
The content of the invention
The application purpose is to provide a kind of flow control methods and device, it is possible to achieve the technique effect of dynamic stream control.
The application provides what a kind of flow control methods and device were realized in:
A kind of flow control methods, methods described include:
When it is determined that needing to carry out flow control, server end obtains the average response time of current service request;
The server end carries out degradation processing according to the average response time convection current control threshold value;
The server end carries out flow control using the stream control threshold value after degradation processing.
A kind of volume control device, positioned at server end, described device includes:
Acquisition module, in the case of it is determined that needing to carry out flow control, obtaining the average response time of current service request;
Degradation module, for carrying out degradation processing according to the average response time convection current control threshold value;
Stream control module, for carrying out flow control using the stream control threshold value after degradation processing.
The flow control methods and device that the application provides, in the case of it is determined that needing to carry out flow control to system, server End determines the need for carrying out degradation processing to default stream control threshold value according to the average response time of current service request, i.e. stream Control threshold value is the numerical value of a dynamic change, rather than from start to finish all by the way of a fixed numerical value.If for example, The processing speed that average response time is long so to indicate that current business is too slow, and period of reservation of number is oversize, at this time can Stream control threshold value is reduced, so that more business are processed simultaneously, to improve the processing speed of service request, reduces the sensation of interim card, This is the existing effect for using fixed stream control threshold value not reached, and efficiently solves prior art through the above way using fixation Stream control threshold value carry out flow control caused by system fluid control effect it is bad, can not automatically adaptive system load condition change technology Problem, the technique effect of dynamic stream control is reached.
Brief description of the drawings
, below will be to embodiment or prior art in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art The required accompanying drawing used is briefly described in description, it should be apparent that, drawings in the following description are only to remember in the application Some embodiments carried, for those of ordinary skill in the art, without having to pay creative labor, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram of embodiment of flow control methods that the application provides;
Fig. 2 is the flow control methods sequential interaction schematic diagram that the application provides;
Fig. 3 is the flow control system Organization Chart that the application provides;
Fig. 4 is a kind of model structure schematic diagram for embodiment of volume control device that the application provides;
Fig. 5 is the model structure schematic diagram for the volume control device another kind embodiment that the application provides.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with the embodiment of the present application Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only It is some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the scope of the application protection.
Flow control methods described herein and device are described in detail below in conjunction with the accompanying drawings.Fig. 1 is the application proposition Flow control methods a kind of embodiment method flow diagram.Although this application provides as shown in following embodiments or accompanying drawing Method operating procedure or apparatus structure, but based on conventional or can be with methods described or device without performing creative labour Including more or less operating procedure or modular structure.Necessary causality is not present in logicality the step of or structure In, the execution sequence of these steps or the modular structure of device are not limited to execution sequence or module knot that the embodiment of the present application provides Structure., can be according to embodiment or attached when the device in practice or end product of described method or modular structure perform Method or modular structure connection carry out order execution shown in figure be either parallel to be performed (such as at parallel processor or multithreading The environment of reason).
Specifically as shown in figure 1, a kind of embodiment for the flow control methods that the application provides can include:
S1:When it is determined that needing to carry out flow control, server end obtains the average response time convection current control threshold of current service request Value carries out degradation processing;
The structure handled service request is carried in all computer networks and is construed as a system, once there is industry Business request, then will also there is the problem of flow control, because if service set makes requests on, the carrying energy of server end Power has a higher limit, therefore, if it is desired to all service requests are all handled, and rung in acceptable Seasonable interior processing, just has to limit system entry flow, to be not easy occurring excess load, or some threads Queuing is too long, can all influence systematic function, can also influence Consumer's Experience.
Therefore, during system is handled business, it is necessary to a judgement for whether carrying out flow control is carried out, with Just server end is triggered when being necessary and carries out flow control, and in this example, the system can be inquiry system, data calculating System, data handling system, data forwarding system etc., system here are the concept of a broad sense, accordingly, server End is exactly the server of inquiry system, data computing system, data handling system, data forwarding system.
Specifically, when realizing, server end can be determined the need for by obtaining the active line number of passes of system entry into Row flow controls, wherein, system entry can be understood as the input port of system, such as some application input connecing to the system Mouthful, it can be sent in system and be handled by the request of this access service.
Thread be in process perform computing least unit, and execution processing unit scheduling base unit.If process is understood Being completed for logically operating system for task, then thread represents to complete one of many possible subtasks of the task.Example Such as, it is assumed that user starts the database application in a window, and operating system just will be expressed as one to the calling of database Individual process.Assuming that user will produce a pay sheet form from database, and pass in a file, this is a subtask; During pay sheet form is produced, user can be asked with defeated personal data library inquiry again, and this is a subtask again.So, Operating system then asks each:Pay sheet form and the data query of new defeated people are expressed as the independent line in database process Journey.Thread can independently dispatch execution on a processor.So-called active threads can be understood as also in the thread not being suspended of race, Namely have been turned on and the not yet thread of fair termination or termination.
What therefore portal activity Thread Count showed is the current load of system, be can determine whether based on portal activity Thread Count Flow control is carried out to system.Specifically, in the case where determining whether to carry out flow control, server end can be according to following Mode judges:System in the active line number of passes and foregoing description scheduled duration of system entry thread pool in current scheduled duration is obtained to enter The active line number of passes of mouth;The active line number of passes of system entry enters more than system in foregoing description scheduled duration in current scheduled duration In the case of the active line number of passes preset multiple of mouth, it is determined that needing to carry out flow control.
For example, if preset duration is 5 minutes, preset multiple is 1.5 times, is detected when the active threads in first five minute Number is 80, and the active line number of passes in first five minute is 40 (or the average Thread Count of first five minute is 8 per minute), and that is just Show that the active line number of passes of current time period reaches the preset multiple of setting compared to the active line number of passes in previous cycle, this When server end just need start dynamic flow control.
Be in the above-described embodiments with the total comparison that sum is carried out with the active threads in a upper cycle of the active threads of current period, When actually realizing, an active line number of passes threshold value can also be preset, is somebody's turn to do if the active threads sum of current period is more than Active line number of passes threshold value, then it is assumed that need to start dynamic flow control.It is specifically true using which kind of mode when actually performing Fixed whether to carry out dynamic flow control, the application is not especially limited, can also being averaged using the active line number of passes of current period Compared with the average value of the active line number of passes in previous cycle, specific manner of comparison can be actually needed to be selected value with actual set Take.
S2:Server end carries out degradation processing according to the average response time convection current control threshold value;
It is after control threshold value is flowed in setting in view of existing stream prosecutor formula, this stream control threshold value just no longer changes, in flow control procedure With regard to being intercepted always according to this stream control threshold value.However, the influence of the problems such as due to network processes speed, if always according to This stream control threshold value fixed is handled, and may have inevitable congestion, so that the response time of service request Become more and more long.In order to avoid the generation of this problem, server end can be according to the average response time of current service request Convection current control threshold value carries out degradation processing, specifically, can include:Determine whether the average response time of current service request exceeds Preset time threshold;If it was exceeded, convection current control threshold value carries out degradation processing, so as to ensure that the stand-by period of business was unlikely to It is long.
That is, an acceptable response time is set, if detect the average response of the service request of current time period Between be higher by default acceptable time (being namely higher by preset time threshold), then being considered as current set stream control threshold value is It is irrational, it is necessary to carry out degradation processing to current stream control threshold value, so the response time of service request could be caused to shorten.
Can be that degradation processing is carried out to the stream control threshold value according to default degradation ratio when processing is degraded, such as: X%, X% can be 10%, 20% etc., and specific value can select according to the system requirements and system load ability of reality, The application is not construed as limiting to this.
S3:Server end carries out flow control using the stream control threshold value after degradation processing.
The processing of this degraded operation is nor the operation that can be settled at one go, it is also possible to next after first time degradation is carried out Individual time cycle average response time is still above default acceptable time, and this when can carry out degradation processing again, In follow-up degradation processing and it is non-required degrade processing identical degradation ratio fully according to first time, this ratio can be with It is identical for the first time, can also be more lower than first time, such as first time degradation ratio is 10%, can be specifically 5%, so as to So that whole demotion processes are more steady.That is, handled according to the default time cycle, until the response time can meet to want Ask.That is, after the stream control threshold value after using degradation processing carries out flow control, server end can be obtained from using at degradation Stream control threshold value after reason carries out the average response time of the service request in the preset duration after flow control;From using degradation Stream control threshold value after processing carries out the average response time of the service request in the preset duration after flow control beyond described pre- If in the case of time threshold, convection current control threshold value carries out degradation processing again, until the stream control threshold value after using degradation processing is carried out The average response time of the service request in preset duration after flow control is less than preset time threshold.
The purpose handled that degrades is in order that default acceptable time can be returned to by obtaining the response time of service request, when business The response time of request can meet after requirement, it is possible to which convection current control threshold value is upgraded automatically, until it is default to revert to stream control Value.Certainly, specifically automatic escalation process be also the need to ensure that the response time be meet require, be one meet respond when Between meet require on the premise of stream control threshold value escalation process.Upgrade proportion when upgrading can be very low, i.e., slow step by step Slow upgrading, to prevent from needing adjusting back.Escalation process is carried out according to the average response time convection current control threshold value of current service request Degradation processing is carried out afterwards, can be included:Determine the average response time of current service request whether less than or equal to described pre- If time threshold;If less than or be equal to, convection current control threshold value carry out upgrading processing, until stream control threshold value recover to stream control preset value.
After system enters flow control mode, can currently there are flow control or service application to exist with proactive notification service application Inquire about whether flowed control after getting the service request initiated using access personnel, it is specific by the way of active broadcast or passive The mode of inquiry can be selected as needed, and the application is not construed as limiting to this.If the mode of passive query, then business should After the service request in response to access personnel is inquired about, service request is handled according to stream control Query Result, if Do not controlled by stream, then just business is handled, and request result is returned to the personnel of access, if controlled by stream, then just Return to the personnel of access and controlled by stream.Specifically, can be in the average response time convection current control threshold value according to current service request After carrying out degradation processing:Service request access has been detected whether, in the case where having detected service request access, server Hold to the service application of service request and return to the current notification message for thering is flow to control, and the flow of control business application is degraded Processing.
That is, when notice service application currently has stream to control, can also degrade ratio automatically for the business application setting controlled by stream, This automatic degradation ratio can be identical or slightly larger than itself degradation ratio with the degradation ratio of system itself, It can be selected according to being actually needed.Further, if controlled device in next cycle is still to be flowed control, then just after It is continuous to degrade automatically, until after no longer being controlled by stream, then upgrading automatically, until reverting to stream control preset value.
Above-mentioned flow control methods are illustrated with reference to a specific embodiment, it is important to note, however, that the specific reality Example is applied merely to the application is better described, does not form the improper restriction to the application.
It is only limitted to block the flow beyond threshold values primarily to solving flow control of the prior art in the embodiment of the present application Cut and think that stream control is completed, some metric datas that can combine system in this example provide the automatic lifting level of stream control threshold value, with reality Now to the more preferable protection of system.
To achieve these goals, the flow control system of the application can with as shown in Fig. 2 including:Data acquisition, metric data pipe Reason, dynamic stream control tactical management and dynamic flow-control administration these modules, wherein, data acquisition module can be responsible for the degree of system Data acquisition is measured, data aggregate is carried out in metric data management module after collection, dynamic stream control policy module is combined after data aggregate The strategy of offer completes the dynamic promotion and demotion function of flow control valve value in dynamic flow-control administration module.
(1) dynamic stream interface driver
The configuration of dynamic stream interface driver can be completed by dynamic stream control policy management module by keeper, wherein, dynamic stream interface driver Following components can be included:
1) strategy based on active threads number:
Current N minute active lines number of passes starts dynamic flow control mode before when M times of N minutes average value, i.e. logical Active line number of passes is crossed to determine whether to start dynamic stream control.
2) strategy of the processing response time based on each service request:
For specific API (Application Programming Interface, application programming interface) current N minutes When average response time exceeds tactful preset value, the flow control valve value of the specific API can be degraded automatically, degradation ratio X% is could be arranged to, if next N minutes persistently exceed above-mentioned tactful preset value, then just on the basis of current flow control valve value On continue automatic degradation X%, when recovering the response time, flow control valve value will upgrade automatically, until revert to stream control preset value.
3) strategy based on history stream control data:
When notifications service application has stream control to produce, can be degraded automatically to being set by the object of stream control, it is automatic to degrade Ratio can also be X%, if continuing to be controlled by stream by stream control object next cycle, then just continue to degrade automatically, when being flowed When controlling object not by stream control, automatic upgrading, until reverting to stream control preset value.
(2) data acquisition
It is responsible for the data acquisition of system loading conditions, in the embodiment of the present application, the data of collection can have:
1) system entry thread pool active threads number;
2) response times of each API of system to request processing.
3) to by the historical data of stream control.
(3) metric data is pushed to metric data management module
Metric data management module is responsible for carrying out polymerization processing to the data of collection.
(4) metric data of polymerization is pushed to dynamic flow-control administration module
Dynamic flow-control administration module is analyzed according to the metric data of polymerization, and combines dynamic stream interface driver and current dynamic stream Control actual conditions generation additional flow strategy is applied in the stream control configuration of current system.
(5) request is initiated using access personnel
Service application calls whether dynamic flow-control administration module check is controlled by stream, if controlled by stream, dynamic flow-control administration module will Record stream control data, and request is returned by the notification message of stream control to service application, if do not controlled by stream, service application will be entered Row business processing simultaneously returns to request result to application access personnel.
In the above-described embodiments, by carrying out dynamic sensing to system load state, and stream control promotion and demotion processing is carried out automatically, can , can be with when system goes wrong to solve the problems, such as that existing fluidics automatically adaptive system load condition can not change Automatically convection current control carries out automatic upgrade or downgrade, has reached the technique effect of dynamic stream control.
For example, flow control system can with as shown in figure 3, including:The user terminal of server end and requested service, server end Request is handled in response to the service request of user terminal.As shown in figure 3, server end is connected with multiple user terminals, The species and type of user terminal are also different, and these user terminals all may be to server initiating business request, when multiple user terminals Simultaneously during initiating business request, server end load can be caused excessive unavoidably, therefore, server end is to service request When reason, it is possible to carry out dynamic stream control to service request according to above-mentioned stream prosecutor formula.
Volume control device in upper server end can with as shown in figure 4, including:Acquisition module 401, the and of degradation module 402 Stream control module 403, i.e. server end is handled by the volume control device the service request from user terminal and dynamic Stream control, is illustrated to the structure below.
Acquisition module 401, it can be used in the case of it is determined that needing to carry out flow control, obtaining being averaged for current service request Response time;
Degradation module 402, it can be used for carrying out degradation processing according to the average response time convection current control threshold value;
Stream control module 403, it can be used for carrying out flow control using the stream control threshold value after degradation processing.
In one embodiment, as shown in figure 5, above-mentioned volume control device can also include:Determining module 501, specifically It can be used for being determined the need for carrying out flow control according to the active line number of passes of system entry.
In one embodiment, as shown in figure 5, determining module 501 can include:Acquiring unit 5011, for specifically using In the active threads of system entry in the active line number of passes of system entry in the current scheduled duration of acquisition and foregoing description scheduled duration Number;First determining unit 5012, the active line number of passes for the system entry thread pool in current scheduled duration are more than the foregoing description In scheduled duration in the case of the active line number of passes preset multiple of system entry, it is determined that needing to carry out flow control.
In one embodiment, as shown in figure 5, degradation module 402 can include:Second determining unit 4021, for true Whether the average response time for determining current service request exceeds preset time threshold;Processing unit 4022, for determining currently In the case that the average response time of service request exceeds preset time threshold, convection current control threshold value carries out degradation processing.
In one embodiment, processing unit specifically can be used for dropping the stream control threshold value according to default degradation ratio Level processing.
In one embodiment, above-mentioned volume control device can also include:Acquisition module, for obtaining from using at degradation Stream control threshold value after reason carries out the average response time of the service request in the preset duration after flow control;Adjusting module, use Yu Cong carries out the average response of the service request in the preset duration after flow control using the stream control threshold value after degradation processing Time exceeds in the case of the preset time threshold, and convection current control threshold value carries out degradation processing again, until after using degradation processing The average response time of service request that carries out in the preset duration after flow control of stream control threshold value be less than the preset time Threshold value.
In one embodiment, above-mentioned volume control device can also include:Module is confirmed, for after using degradation processing Stream control threshold value carry out flow control after, determine current service request average response time whether be less than or equal to it is described default Time threshold;Upgraded module, for it is determined that the average response time of current service request is less than or equal to the preset time threshold In the case of value, convection current control threshold value carries out upgrading processing, until stream control threshold value is recovered to control preset value to stream.
In one embodiment, above-mentioned volume control device can also include:Detection module, for after using degradation processing Stream control threshold value carry out flow control after, detected whether service request access;Module is returned to, for detecting business In the case of request access, the current notification message for having flow to control is returned to the service application of the service request;Control module, For controlling the flow of the service application to carry out degradation processing.
It is similar to flow control methods to solve the principle of problem due to volume control device, therefore the implementation of volume control device can be with Referring to the implementation of flow control methods, repeat part and repeat no more.It is used above, term " unit " or " module " The combination of the software and/or hardware of predetermined function can be realized.Although described device is preferably realized with software, firmly Part, or the realization of the combination of software and hardware is also what may and be contemplated.
The flow control methods and device that the application provides, in the case of it is determined that needing to carry out flow control to system, server End determines the need for carrying out degradation processing to default stream control threshold value according to the average response time of current service request, i.e. stream Control threshold value is the numerical value of a dynamic change, rather than from start to finish all by the way of a fixed numerical value.If for example, The processing speed that average response time is long so to indicate that current business is too slow, and period of reservation of number is oversize, at this time can Stream control threshold value is reduced, so that more business are processed simultaneously, to improve the processing speed of service request, reduces the sensation of interim card, This is the existing effect for using fixed stream control threshold value not reached, and efficiently solves prior art through the above way using fixation Stream control threshold value carry out flow control caused by system fluid control effect it is bad, can not automatically adaptive system load condition change technology Problem, the technique effect of dynamic stream control is reached.
Foregoing description in the application involved by each embodiment is only the application in some embodiments in the application, in some marks Embodiment amended slightly can also carry out the scheme of each embodiment of above-mentioned the application on the basis of standard, model, method.When So, other deformations without creativeness of the process method step described in the application the various embodiments described above are being met, still can be with Identical application is realized, will not be repeated here.
Although this application provides the method operating procedure as described in embodiment or flow chart, based on conventional or without creativeness Work can include more or less operating procedures.The step of being enumerated in embodiment order is only numerous step execution sequences In a kind of mode, do not represent unique execution sequence., can be according to reality when device or client production in practice performs Applying example, either method order shown in the drawings performs or performs (such as environment of parallel processor or multiple threads) parallel.
The device or module that above-described embodiment illustrates, it can specifically be realized by computer chip or entity, or by with certain work( Can product realize.For convenience of description, it is divided into various modules during description apparatus above with function to describe respectively.Implementing The function of each module can be realized in same or multiple softwares and/or hardware during the application.It is of course also possible to certain will be realized The module of function combines realization by multiple submodule or subelement.
Method, apparatus described herein or module can realize controller by any suitable in a manner of computer readable program code When mode realize, for example, controller can take such as microprocessor or processor and storage can be by (micro-) processor Computer-readable medium, gate, switch, the special collection of the computer readable program code (such as software or firmware) of execution Into circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller (PLC) and embedded microcontroller Form, the example of controller include but is not limited to following microcontroller:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20 and Silicone Labs C8051F320, the control that Memory Controller is also implemented as memory are patrolled The part collected.It is also known in the art that in addition to realizing controller in a manner of pure computer readable program code, Completely can by by method and step carry out programming in logic come controller with gate, switch, application specific integrated circuit, can compile The form of journey logic controller and embedded microcontroller etc. realizes identical function.Therefore this controller is considered one kind Hardware component, and what its inside was included is used to realize that the device of various functions can also to be considered as the structure in hardware component.Or Even, it not only can be able to will be the software module of implementation method for realizing that the device of various functions is considered as but also can be hardware component Interior structure.
Part of module in herein described device can be in the general context of computer executable instructions Described in, such as program module.Usually, program module includes performing particular task or realizes the example of particular abstract data type Journey, program, object, component, data structure, class etc..The application can also be put into practice in a distributed computing environment, at this In a little DCEs, by performing task by communication network and connected remote processing devices.In Distributed Calculation In environment, program module can be located in the local and remote computer-readable storage medium including storage device.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can be by soft Part adds the mode of required hardware to realize.Based on such understanding, the technical scheme of the application is substantially in other words to existing skill The part that art contributes can be embodied in the form of software product, can also be by being embodied in the implementation process of Data Migration Out.The computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some Instruct to cause a computer equipment (can be personal computer, mobile terminal, server, or network equipment etc.) Perform the method described in some parts of each embodiment of the application or embodiment.
Each embodiment in this specification is described by the way of progressive, and same or analogous part is mutual between each embodiment Referring to what each embodiment stressed is the difference with other embodiment.The all or part of of the application can For in numerous general or special purpose computing system environments or configuration.Such as:Personal computer, server computer, hold Equipment or portable set, laptop device, mobile communication terminal, multicomputer system, the system based on microprocessor, can Electronic equipment, network PC, minicom, the mainframe computer of programming include the distributed meter of any of the above system or equipment Calculate environment etc..
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have it is many deformation and change and Spirit herein is not departed from, it is desirable to which appended claim includes these deformations and changed without departing from spirit herein.

Claims (16)

1. a kind of flow control methods, it is characterised in that methods described includes:
When it is determined that needing to carry out flow control, server end obtains the average response time of current service request;
The server end carries out degradation processing according to the average response time convection current control threshold value;
The server end carries out flow control using the stream control threshold value after degradation processing.
2. according to the method for claim 1, it is characterised in that obtain the average sound of current service request in server end Before between seasonable, methods described also includes:
The server end determines the need for carrying out flow control according to the active line number of passes of system entry.
3. according to the method for claim 2, it is characterised in that the server end is according to the active threads of system entry Number determines the need for carrying out flow control, including:
The server end obtains in current scheduled duration system in the active line number of passes of system entry and foregoing description scheduled duration The active line number of passes of entrance;
The active line number of passes of system entry thread pool is more than system entry in foregoing description scheduled duration in current scheduled duration In the case of active line number of passes preset multiple, the server end determines to need to carry out flow control.
4. according to the method for claim 1, it is characterised in that the server end is according to the average response time pair Stream control threshold value carries out degradation processing, including:
The server end determines whether the average response time of current service request exceeds preset time threshold;
If it was exceeded, convection current control threshold value carries out degradation processing.
5. according to the method for claim 4, it is characterised in that the server end convection current control threshold value carries out degradation processing, Including:
The server end carries out degradation processing according to default degradation ratio to the stream control threshold value.
6. according to the method for claim 4, it is characterised in that in the server end using the stream control after degradation processing After threshold value carries out flow control, in addition to:
The stream that the server end is obtained after using degradation processing controls the industry in the preset duration after threshold value carries out flow control The average response time of business request;
The average sound of the service request in the preset duration after flow control is carried out in the stream control threshold value after using degradation processing Exceeding between seasonable in the case of the preset time threshold, convection current control threshold value carries out degradation processing to the server end again, until from The average response time that stream control threshold value after being handled using degradation carries out the service request in the preset duration after flow control is small In the preset time threshold.
7. according to the method for claim 4, it is characterised in that in the server end using the stream control after degradation processing After threshold value carries out flow control, in addition to:
The server end determines whether the average response time of current service request is less than or equal to the preset time threshold;
If less than or be equal to, the server end convection current control threshold value carries out upgrading processing, until stream control threshold value recovers pre- to stream control If value.
8. method according to any one of claim 1 to 7, it is characterised in that in the server end using degradation After stream control threshold value after processing carries out flow control, methods described also includes:
The server end has detected whether service request access;
In the case where having detected service request access, the server end returns current to the service application of the service request There is the notification message that flow controls;
The server end controls the flow of the service application to carry out degradation processing.
A kind of 9. volume control device, positioned at server end, it is characterised in that including:
Acquisition module, in the case of it is determined that needing to carry out flow control, obtaining the average response time of current service request;
Degradation module, for carrying out degradation processing according to the average response time convection current control threshold value;
Stream control module, for carrying out flow control using the stream control threshold value after degradation processing.
10. device according to claim 9, it is characterised in that also include:
Determining module, for being determined the need for carrying out flow control according to the active line number of passes of system entry.
11. device according to claim 10, it is characterised in that the determining module includes:
Acquiring unit, for specifically for obtaining the active line number of passes of system entry and the pre- timing of the foregoing description in current scheduled duration The active line number of passes of system entry in length;
First determining unit, in current scheduled duration the active line number of passes of system entry thread pool make a reservation for more than the foregoing description In duration in the case of the active line number of passes preset multiple of system entry, it is determined that needing to carry out flow control.
12. device according to claim 9, it is characterised in that the degradation module includes:
Second determining unit, for determining whether the average response time of current service request exceeds preset time threshold;
Processing unit, it is right in the case of exceeding preset time threshold in the average response time for determining current service request Stream control threshold value carries out degradation processing.
13. device according to claim 12, it is characterised in that the processing unit is specifically used for according to default drop Level ratio carries out degradation processing to the stream control threshold value.
14. device according to claim 12, it is characterised in that also include:
Acquisition module, for obtaining the industry flowed in the preset duration controlled after threshold value carries out flow control after using degradation processing The average response time of business request;
Adjusting module, for carrying out the business in the preset duration after flow control in the stream control threshold value after using degradation processing The average response time of request exceeds in the case of the preset time threshold, and convection current control threshold value carries out degradation processing again, until from The average response time that stream control threshold value after being handled using degradation carries out the service request in the preset duration after flow control is small In the preset time threshold.
15. device according to claim 12, it is characterised in that also include:
Confirm module, after carrying out flow control for the stream control threshold value after using degradation processing, determine current service request Whether average response time is less than or equal to the preset time threshold;
Upgraded module, for it is determined that the average response time of current service request is less than or equal to the feelings of the preset time threshold Under condition, convection current control threshold value carries out upgrading processing, until stream control threshold value is recovered to control preset value to stream.
16. the device according to any one of claim 9 to 15, it is characterised in that also include:
Detection module, after carrying out flow control for the stream control threshold value after using degradation processing, service request is detected whether Access;
Module is returned to, in the case where having detected service request access, returning and working as to the service application of the service request Before have flow control notification message;
Control module, for controlling the flow of the service application to carry out degradation processing.
CN201610369698.3A 2016-05-30 2016-05-30 A kind of flow control methods and device Pending CN107454004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610369698.3A CN107454004A (en) 2016-05-30 2016-05-30 A kind of flow control methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610369698.3A CN107454004A (en) 2016-05-30 2016-05-30 A kind of flow control methods and device

Publications (1)

Publication Number Publication Date
CN107454004A true CN107454004A (en) 2017-12-08

Family

ID=60485580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610369698.3A Pending CN107454004A (en) 2016-05-30 2016-05-30 A kind of flow control methods and device

Country Status (1)

Country Link
CN (1) CN107454004A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683605A (en) * 2018-06-12 2018-10-19 阿里巴巴集团控股有限公司 A kind of current-limiting method and device of service call
CN108762684A (en) * 2018-06-04 2018-11-06 平安科技(深圳)有限公司 Hot spot data migrates flow control method, device, electronic equipment and storage medium
CN108959399A (en) * 2018-06-04 2018-12-07 平安科技(深圳)有限公司 Distributed data deletes flow control method, device, electronic equipment and storage medium
CN110071952A (en) * 2018-01-24 2019-07-30 北京京东尚科信息技术有限公司 The control method and device of service call amount
CN110166371A (en) * 2019-05-16 2019-08-23 北京达佳互联信息技术有限公司 Flow control methods, device, electronic equipment and storage medium
CN110535784A (en) * 2018-05-23 2019-12-03 北京三快在线科技有限公司 Flow managing method and device and calculating equipment based on confidence interval
CN111130939A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Flow control method and device, computer equipment and storage medium
CN111355664A (en) * 2020-02-19 2020-06-30 中国农业银行股份有限公司 Flow control method and device
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN111786895A (en) * 2020-03-16 2020-10-16 北京京东尚科信息技术有限公司 Method and apparatus for dynamic global current limiting
CN113347111A (en) * 2021-05-12 2021-09-03 金茂数字科技有限公司 Flow adjusting method and management system based on user experience
CN113726672A (en) * 2020-10-23 2021-11-30 天翼智慧家庭科技有限公司 Method and system for self-adjusting flow control threshold
CN114969112A (en) * 2021-09-29 2022-08-30 中移互联网有限公司 Flow control method and device for distributed cache system and electronic equipment
CN115396379A (en) * 2022-08-24 2022-11-25 北京沃东天骏信息技术有限公司 Flow control method, device, equipment and medium for service server
CN115580580A (en) * 2022-10-12 2023-01-06 中国平安人寿保险股份有限公司 Flow control method, flow control apparatus, and computer-readable storage medium
CN115580580B (en) * 2022-10-12 2024-05-17 中国平安人寿保险股份有限公司 Flow control method, flow control device, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695034A (en) * 2009-10-09 2010-04-14 清华大学 Device and method for adjusting monitoring parameter of WEB service
US20110165550A1 (en) * 2010-01-07 2011-07-07 Ubion Corp. Management system for online test assessment and method thereof
CN102779062A (en) * 2011-05-09 2012-11-14 阿里巴巴集团控股有限公司 Method and device for controlling number of threads accessing system resources
CN105389214A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Monitoring method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695034A (en) * 2009-10-09 2010-04-14 清华大学 Device and method for adjusting monitoring parameter of WEB service
US20110165550A1 (en) * 2010-01-07 2011-07-07 Ubion Corp. Management system for online test assessment and method thereof
CN102779062A (en) * 2011-05-09 2012-11-14 阿里巴巴集团控股有限公司 Method and device for controlling number of threads accessing system resources
CN105389214A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Monitoring method and system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071952A (en) * 2018-01-24 2019-07-30 北京京东尚科信息技术有限公司 The control method and device of service call amount
CN110071952B (en) * 2018-01-24 2023-08-08 北京京东尚科信息技术有限公司 Service call quantity control method and device
CN110535784A (en) * 2018-05-23 2019-12-03 北京三快在线科技有限公司 Flow managing method and device and calculating equipment based on confidence interval
CN108762684B (en) * 2018-06-04 2021-03-05 平安科技(深圳)有限公司 Hot spot data migration flow control method and device, electronic equipment and storage medium
CN108959399A (en) * 2018-06-04 2018-12-07 平安科技(深圳)有限公司 Distributed data deletes flow control method, device, electronic equipment and storage medium
CN108762684A (en) * 2018-06-04 2018-11-06 平安科技(深圳)有限公司 Hot spot data migrates flow control method, device, electronic equipment and storage medium
CN108683605B (en) * 2018-06-12 2021-08-24 创新先进技术有限公司 Current limiting method and device for service call
CN108683605A (en) * 2018-06-12 2018-10-19 阿里巴巴集团控股有限公司 A kind of current-limiting method and device of service call
CN111385214B (en) * 2018-12-27 2023-11-17 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN110166371A (en) * 2019-05-16 2019-08-23 北京达佳互联信息技术有限公司 Flow control methods, device, electronic equipment and storage medium
CN111130939B (en) * 2019-12-26 2021-09-10 深圳前海环融联易信息科技服务有限公司 Flow control method and device, computer equipment and storage medium
CN111130939A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Flow control method and device, computer equipment and storage medium
CN111355664A (en) * 2020-02-19 2020-06-30 中国农业银行股份有限公司 Flow control method and device
CN111786895A (en) * 2020-03-16 2020-10-16 北京京东尚科信息技术有限公司 Method and apparatus for dynamic global current limiting
CN113726672A (en) * 2020-10-23 2021-11-30 天翼智慧家庭科技有限公司 Method and system for self-adjusting flow control threshold
CN113726672B (en) * 2020-10-23 2024-04-02 天翼数字生活科技有限公司 Method and system for self-adjusting flow control threshold
CN113347111A (en) * 2021-05-12 2021-09-03 金茂数字科技有限公司 Flow adjusting method and management system based on user experience
CN114969112A (en) * 2021-09-29 2022-08-30 中移互联网有限公司 Flow control method and device for distributed cache system and electronic equipment
CN115396379A (en) * 2022-08-24 2022-11-25 北京沃东天骏信息技术有限公司 Flow control method, device, equipment and medium for service server
CN115580580A (en) * 2022-10-12 2023-01-06 中国平安人寿保险股份有限公司 Flow control method, flow control apparatus, and computer-readable storage medium
CN115580580B (en) * 2022-10-12 2024-05-17 中国平安人寿保险股份有限公司 Flow control method, flow control device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN107454004A (en) A kind of flow control methods and device
US10877801B2 (en) Systems and methods for scheduling tasks
EP3629165A1 (en) Accelerated resource allocation techniques
RU2644522C2 (en) Method and system for traffic management
US11513853B2 (en) Shared resources control in a multi-tenant system
CN108197909B (en) Project progress supervision control system
CN106201722A (en) The load regulation method of server and system
JP2005196601A (en) Policy simulator for autonomous management system
CN104168133B (en) The method and gateway and system of a kind of dynamic configuration API Access amount
CN104780185A (en) Information sharing control method and device
CN107026877A (en) The method and apparatus that resource is managed in cloud platform
US8612578B2 (en) Forecast-less service capacity management
CN106210129A (en) The current-limiting method of a kind of sing on web server configures and system
US20200159565A1 (en) Predicting transaction outcome based on artifacts in a transaction processing environment
WO2017054422A1 (en) Method and device for managing cell peak time segment and self-organizing network cell
CN105577958B (en) For adjusting distributing strategy and shunting the method, apparatus and system of user's request
CN107995286A (en) Service automatic start-stop method, server and storage medium based on dubbo platforms
WO2021012877A1 (en) Blockchain-based alliance member management method and apparatus, and computer device
CN112463367A (en) Method and system for optimizing performance of storage system, electronic equipment and storage medium
CN104750546B (en) A kind of method and system for adjusting connection pool
CN108536356A (en) Seating stand processing method, device and computer readable storage medium
US20130274944A1 (en) Electricity management apparatus and electricity management method
CN109508843A (en) A kind of intelligent Service implementation method and device
CN112887407B (en) Job flow control method and device for distributed cluster
CN107888517A (en) A kind of method and apparatus that domain is drawn for main frame

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171208