CN110493362A - Request amount control method, device, storage medium and computer equipment - Google Patents

Request amount control method, device, storage medium and computer equipment Download PDF

Info

Publication number
CN110493362A
CN110493362A CN201910934961.2A CN201910934961A CN110493362A CN 110493362 A CN110493362 A CN 110493362A CN 201910934961 A CN201910934961 A CN 201910934961A CN 110493362 A CN110493362 A CN 110493362A
Authority
CN
China
Prior art keywords
amount
request
request amount
service
service server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910934961.2A
Other languages
Chinese (zh)
Other versions
CN110493362B (en
Inventor
朱龙云
周小辉
袁文頔
陈阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910934961.2A priority Critical patent/CN110493362B/en
Publication of CN110493362A publication Critical patent/CN110493362A/en
Application granted granted Critical
Publication of CN110493362B publication Critical patent/CN110493362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1025Dynamic adaptation of the criteria on which the server selection is based

Abstract

This application involves a kind of request amount control method, device, storage medium and computer equipments, which comprises when meeting request amount information reporting trigger condition, obtains the request amount information of actual time window;The request amount information includes the request sub- amount of multiple second timeslices in the actual time window;Current request amount amount is obtained from Quota distribution server according to the request amount information;Component requests amount in the request amount information that the current request amount amount is reported according to each service server in the service server cluster is dynamically determined;The component requests amount is the request sub- amount in respective request amount information according to forward the second timeslice of part of timing;, to obtaining in the period that request amount amount is stopped next time, the request amount in each first time piece is controlled in the current request amount amount from obtaining the current request amount amount.The control efficiency of request amount can be improved in scheme provided by the present application.

Description

Request amount control method, device, storage medium and computer equipment
The application be on 08 22nd, 2019 submission Patent Office of the People's Republic of China, application No. is 2019107783645, denomination of invention For the divisional application of " request amount control method, device, storage medium and computer equipment ", entire contents are incorporated by reference In this application.
Technical field
This application involves Internet technical field, more particularly to a kind of request amount control method, device, storage medium and Computer equipment.
Background technique
With the development of internet technology, operation system Internet-based is more more and more universal, and people stay indoors can Business activity is carried out with online access operation system, it is many convenient to bring to people's lives.If a large number of users accesses simultaneously Operation system can have the case where request amount surge, and server can receive huge request flow in moment, make to server At impact, it is possible to leading to server snowslide or delay machine due to load too high.Server is based on the request amount volume distributed Degree controls request amount, usually can to avoid or alleviate due to load too high snowslide or the problem of delay machine.
Currently, request amount amount is normally based on the type static allocation of server.Under this kind of method of salary distribution, if it exists Server exception is offline or needs newly-increased server, needs manually to cause based on cumbersome operation redistribution request amount amount Request amount amount updates not in time, to there is a problem of that request amount control efficiency is low.
Summary of the invention
Based on this, it is necessary to for the low technical problem of request amount control efficiency, provide a kind of request amount control method, dress It sets, storage medium and computer equipment.
A kind of request amount control method, applied to the service server in service server cluster, which comprises
When meeting request amount information reporting trigger condition, the request amount information of actual time window is obtained;The request Amount information includes the request sub- amount of multiple second timeslices in the actual time window;
Current request amount amount is obtained from Quota distribution server according to the request amount information;The current request amount volume The component requests amount in request amount information that degree is reported according to each service server in the service server cluster is moved State determines;The component requests amount is request in respective request amount information according to forward the second timeslice of part of timing Amount;
From obtaining the current request amount amount to obtain next time request amount amount stop period in, will be each Request amount in first time piece controls in the current request amount amount.
A kind of request amount control device, described device include:
Module is obtained, for obtaining the request amount of actual time window when meeting request amount information reporting trigger condition Information;The request amount information includes the request sub- amount of multiple second timeslices in the actual time window;
Distribution module, for obtaining current request amount amount from Quota distribution server according to the request amount information;Institute It states in the request amount information that current request amount amount is reported according to each service server in the service server cluster Component requests amount is dynamically determined;The component requests amount is part second forward according to timing in respective request amount information The request sub- amount of timeslice;
Control module, for from obtaining the current request amount amount to obtain next time request amount amount stop when Between in section, the request amount in each first time piece is controlled in the current request amount amount.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of request amount control method.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the step of processor executes the request amount control method.
Above-mentioned request amount control method, device, storage medium and computer equipment make requests son according to the second timeslice Amount statistics, and when meeting request amount information reporting trigger condition, it reports according to actual time window including multiple second times The request amount information of the request son amount of piece is guaranteeing having for request amount amount to obtain the current request amount amount dynamically distributed In the case where effect distribution, the communication frequency of service server Yu Quota distribution server can be reduced, so as to effectively avoid The problem of increasing system communication load because frequently communicating, and then can guarantee the accuracy and efficiency of request amount Quota distribution. Quota distribution server is based in the request amount information reported, the relatively high component requests amount amount of making requests of accuracy The automatic distribution of amount, and it is not necessarily to manual intervention, the accuracy and efficiency of request amount Quota distribution can be further increased.Business Current request amount amount of the server based on dynamic allocation, to asking in each timeslice in the certain period of time after current time The amount of asking is controlled, and can be improved the control efficiency and accuracy of request amount, so as to effectively avoid causing because of overload The problem of service server snowslide or delay machine.
A kind of request amount control method, which comprises
Each service server in service server cluster is received to obtain when meeting request amount information reporting trigger condition The request amount information of actual time window for taking and reporting;The request amount information includes multiple in the actual time window The request sub- amount of second timeslice;
According in the request amount information according to the request amount of forward the second timeslice of part of timing and to be allocated Request amount full amount be dynamically determined the current request amount amount for distributing to each service server;
The current request amount amount is fed back into corresponding service server;The current request amount amount of feedback is used The current request amount amount amount of the making requests control is based in the corresponding service server of instruction.
A kind of request amount control device, described device include:
Receiving module is meeting request amount information reporting for receiving each service server in service server cluster When trigger condition, the request amount information of actual time window that obtains and report;When the request amount information includes described current Between multiple second timeslices in window request sub- amount;
Distribution module, for according to request in the request amount information according to forward the second timeslice of part of timing Amount and request amount full amount to be allocated are dynamically determined the current request amount amount for distributing to each service server;
Feedback module, for the current request amount amount to be fed back to corresponding service server;The described of feedback is worked as Preceding request amount amount is used to indicate corresponding service server and is based on the current request amount amount amount of the making requests control.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of request amount control method.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the step of processor executes the request amount control method.
Above-mentioned request amount control method, device, storage medium and computer equipment, Quota distribution server receive business clothes The each service server being engaged in device cluster, when meeting request amount information reporting trigger condition, what is reported includes current time The request amount information of the request son amount of multiple second timeslices in window, and the dynamic allocation of request amount amount are carried out, it is protecting In the case where the effective distribution for demonstrate,proving request amount amount, the communication frequency of service server Yu Quota distribution server can be reduced, So as to effectively avoid the problem that increasing because frequently communicating system communication load, and then it can guarantee request amount Quota distribution Accuracy and efficiency.Amount server is based in received request amount information, the relatively high component requests of accuracy The automatic distribution of the son amount amount of making requests amount, and it is not necessarily to manual intervention, the standard of request amount Quota distribution can be further increased True property and efficiency.The current request amount amount of dynamic allocation is fed back to each service server by Quota distribution server, so that Each service server is based on the current request amount amount amount of the making requests control distributed, so as to improve the control of request amount Efficiency and accuracy.
Detailed description of the invention
Fig. 1 a is the applied environment figure that amount control method is requested in one embodiment;
Fig. 1 b is the architecture diagram of service server cluster in one embodiment;
Fig. 2 is the flow diagram that amount control method is requested in one embodiment;
Fig. 3 is the structural schematic diagram of actual time window in one embodiment;
Fig. 4 is the structural schematic diagram of actual time window in another embodiment;
Fig. 5 is the flow diagram that amount control method is requested in another embodiment;
Fig. 6 is the flow diagram that amount control method is requested in another embodiment;
Fig. 7 is the architecture diagram that amount control system is requested in one embodiment;
Fig. 8 is the architecture diagram that amount control system is requested in another embodiment;
Fig. 9 is the architecture diagram that amount control system is requested in another embodiment;
Figure 10 is the structural block diagram that amount control device is requested in one embodiment;
Figure 11 is the structural block diagram that amount control device is requested in another embodiment;
Figure 12 is the structural block diagram of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Fig. 1 a is the applied environment figure that amount control method is requested in one embodiment.A referring to Fig.1, the request amount controlling party Method is applied to request amount control system.The request amount control system includes service server cluster 110 and Quota distribution server 120.Service server cluster 110 includes at least service server 112 and service server 114.In service server cluster 110 Each service server and Quota distribution server 120 pass through network connection.Each business service in server cluster 110 Device and Quota distribution server 120 can be with the server clusters of the either multiple server compositions of independent server come real It is existing.
Fig. 1 b is the architecture diagram that service server cluster in amount control system is requested in one embodiment.Wherein, business takes Business device cluster 110 specifically can be block chain network, and each service server in service server cluster is the block link network Block chain node server in network.B referring to Fig.1, block chain network include at least block chain node server 112, block chain Node server 114 ..., block chain node server 11n.Each block chain node server in block chain network passes through net Network is communicated.
As shown in Fig. 2, in one embodiment, providing a kind of request amount control method.The present embodiment is mainly with the party Method is illustrated applied to the service server in the service server cluster 110 in above-mentioned Fig. 1 a.Referring to Fig. 2, the request Amount control method specifically comprises the following steps:
S202 obtains the request amount information of actual time window.
Wherein, time window refers to the time interval or time range for being corresponding with set time length.Set time length Can be customized according to the actual situation, such as 1 minute.Time window specifically may include multiple timeslices, and each timeslice is corresponding with Time span, the time span summation of multiple timeslice are equal to the set time length of time window.Actual time window is Refer to time window corresponding to current time.Request amount information is the information for describing or characterizing request amount.It is appreciated that asking It include at least one request son amount in the amount of asking information.
Specifically, each service server in service server cluster obtains in actual time window the request amount of itself Information.In one embodiment, service server based on the received service request dynamic update local cache request amount Information, and in the amount of making requests information reporting, from the request amount information of the local actual time window for obtaining caching.
In one embodiment, when meeting request amount information reporting trigger condition, server determines actual time window, And obtain the request amount information of actual time window.Request amount information reporting trigger condition is for trigger request amount information reporting The condition of operation, for example detect that current time is consistent with the preset request amount information reporting triggered time, alternatively, from last Reach specified duration after reporting request amount information, alternatively, receiving the request amount information reporting instruction of other equipment transmission
In one embodiment, actual time window includes multiple second timeslices, and each second timeslice, which is corresponding with, asks Seek sub- amount.Server determines multiple second timeslices included by actual time window, and it is corresponding to obtain each second timeslice Request son amount, and the corresponding request amount information of actual time window is measured according to accessed request.
S204 obtains current request amount amount from Quota distribution server according to request amount information;Current request amount amount It is dynamically determined by Quota distribution server according to the request amount information that each service server in service server cluster reports.
Wherein, current request amount amount refers to the request amount amount currently distributed.Request amount amount refers to unit interval The maximum quantity of the interior service request for allowing to respond or handle.Unit interval refers to that time span is the time of unit duration Section, can specifically refer to time span be unit duration first time piece, unit time such as 1 second.
Specifically, each service server in service server cluster will be in the actual time window accessed by itself Request amount information reporting to Quota distribution server.Quota distribution server based on the received treat point by request amount information The request amount full amount matched is dynamically distributed, to determine the current request amount amount for distributing to each service server, and will Identified current request amount amount feeds back to corresponding service server.
In one embodiment, Quota distribution server is reported according to service server each in service server cluster Request amount information determines that the request amount of each service server distribution in actual time window accounts in the service server cluster The ratio of total amount is requested, and is dynamically determined based on identified ratio and request amount full amount to be allocated and distributes to corresponding service The current request amount amount of server.
In one embodiment, actual time window includes multiple second timeslices, and each second timeslice respectively corresponds There is request son amount.The request sub- amount of second timeslice each in actual time window is buffered in local by service server.Business Server obtains and reports to the request amount information of Quota distribution server, including multiple second time in actual time window The respective request amount of piece.Correspondingly, Quota distribution server is treated point based on multiple request amounts in each request amount information The request amount full amount matched is dynamically distributed, and the request amount information cache that each service server is reported is in local.Work as industry When business server causes the request amount information of actual time window to report to Quota distribution server not successfully because of communication failure, Quota distribution server still is able to the dynamic point for the request amount information amount of the making requests amount for reporting and caching according to the last time Match.In this way, since network problem causes service server and a small amount of communication failure of Quota distribution server, it will not be to request amount volume The accuracy of degree distribution has an impact, and disaster tolerance and fault-tolerant ability is improved, so as to guarantee service server to service request Significant response or control.
In one embodiment, actual time window includes multiple second timeslices, and request amount information includes multiple second The respective request amount of timeslice.Quota distribution server from the request amount information that each service server reports, according to when Sequence screens the request sub- amount of forward the second timeslice of part, and be dynamically determined according to the request sub- amount filtered out distribute to it is each The current request amount amount of service server.Due to the second timeslice of one or more in request amount information according to timing rearward Request amount may inaccuracy, that is, the quantity of the service request in second timeslice of one or more may count not Completely, the request sub- amount of accurate second timeslice is screened according to timing as a result, and based on accurate request The dynamic allocation for measuring the amount of making requests amount, can be improved the accuracy of current request amount amount.
In one embodiment, service identification is carried in request amount information.Quota distribution server is from each business service Identical services are filtered out in the request amount information that device reports and identify corresponding request amount information, and based on the request amount letter filtered out Request amount full amount to be allocated corresponding with the service identification is ceased, is dynamically determined and distributes to currently asking for each service server The amount of asking amount.It is appreciated that when the corresponding request amount full amount to be allocated of service identification is greater than or equal to preset threshold, volume Degree distribution server dynamically distributes the request amount full amount to be allocated to each service server using business as dimension.Work as business When identifying corresponding request amount full amount to be allocated less than preset threshold, Quota distribution server is dimension with service server Degree, the respective request amount full amount of multiple service identifications that request amount full amount is less than preset threshold as a whole, move State is distributed to each service server.
S206, from obtaining current request amount amount to obtain next time request amount amount stop period in, will be every Request amount in a first time piece controls in current request amount amount.
Specifically, service server is obtaining Quota distribution server based on received request amount information dynamic allocation Current request amount amount after, from obtaining the current request amount amount to obtain next time request amount amount stop period It is interior, the request amount in each first time piece is controlled according to the current request amount amount, by each first time piece Interior request amount control is in this prior in request amount amount.
In one embodiment, from obtaining current request amount amount to obtain next time request amount amount stop time In section, for each first time piece, if the request amount in first time piece is less than current request amount amount, service server meeting The next service request received in the first time piece is handled or responded, and is updated in the first time piece Request amount;If the request amount in first time piece is greater than or equal to current request amount amount, service server can be refused to handle Or next service request that response receives in the first time piece, until next first time piece continues to locate when arriving Service request received by reason or response.It is currently asked in this way, controlling the request amount in each first time piece accordingly In the amount of asking amount, service server snowslide or the problem of delay machine due to request amount is increased sharply can be avoided.
In one embodiment, the request amount in each first time piece is controlled in current request amount amount, comprising: Detect service request;When detecting service request, the request amount in current first time piece is obtained;When request amount is greater than or waits When current request amount amount, refuse the response to service request.
Specifically, service server real-time detection service request determines the service request institute when detecting service request The first time piece of category obtains the request amount in the current first time piece as current first time piece, and will be accessed Request amount current request amount amount corresponding with the current first time piece be compared.When in the current first time piece When request amount is greater than or equal to corresponding current request amount amount, show that the request amount in the current first time piece is more than to permit Perhaps the request amount for responding or handling, service server then refuse to respond received service request.
In one embodiment, when the request amount in current first time piece is less than corresponding current request amount amount, Show that the request amount in the first time piece is within the scope of normal request amount, service server then asks received business It asks and is responded or handled.
In one embodiment, service server is after receiving service request, if it is determined that the current request amount volume of itself Degree is initial amount value, then directly the service request is handled or responded.Initial amount value specifically can be 0.It is right as a result, It is newly-increased that this is configured by initial amount value when not yet collecting corresponding request amount information in newly-increased service server The current request amount amount of service server, and when subsequent acquisition is to request amount information, based on the collected request amount letter of institute Breath dynamic carries out the distribution of current request amount amount.It, also can be compared in this way, in service server cluster when Added Business server To be accurately dynamically determined corresponding current request amount amount, with the control of the accurately amount of making requests.
In one embodiment, when decision request amount is greater than or equal to current request amount amount, service server triggering Limit prompt information is generated, and limit prompt information generated is fed back to the upstream server for sending corresponding service request. The request amount amount that limit prompt information can be used for prompting in the current first time piece of upstream server is using finishing.It can manage Solution, when refusing to respond received service request, service server then will not call downstream service based on the service request Device.
In above-described embodiment, request amount in current request amount amount and current first time piece based on dynamic allocation, The response condition for determining the service request received in first time piece in this prior, is achieved in the current first time piece The control of interior request amount, so as to realize to from obtaining current request amount amount to obtaining request amount amount value next time Period in, the control of the request amount in each first time piece.
Above-mentioned request amount control method, each service server in service server cluster obtain asking for current time window The amount of asking information simultaneously reports to Quota distribution server, and Quota distribution server is based on the request amount information dynamic reported to each Service server distributes current request amount amount.The current request amount amount of each service server is based on current time as a result, The corresponding request amount information automatic dynamic distribution of window, it is not necessarily to human intervention, can be improved current request amount Quota distribution Efficiency and accuracy.Service server is based on the request amount amount distributed, to each in the certain period of time after current time Request amount in timeslice is controlled, the snowslide or the problem of delay machine due to load too high to avoid service server.In this way, base It is dynamically determined the request amount amount of each timeslice in subsequent time period in the request amount information of actual time window, and based on request The control of the amount amount of making requests is measured, can be improved the control efficiency of request amount.
In one embodiment, actual time window includes multiple second timeslices;Step S202 includes: that acquisition business is asked It asks;According to the request time of service request determine service request belonging to the second timeslice, update determined by the second timeslice Request sub- amount;When meeting request amount information reporting trigger condition, each second timeslice in actual time window is obtained Request son amount;The request amount information of actual time window is measured according to request.
Wherein, the second timeslice is that have the time range or time interval of specific time length.Specific time length ratio Such as 10 seconds.Actual time window includes multiple second timeslices, when the time span of actual time window is equal to multiple second Between the respective specific time length summation of piece.Service request is the request for triggering business processing operation.Request time is industry The corresponding time is requested in business, specifically can be the generation time or triggered time of service request, is also possible to connecing for service request Between time receiving.It is appreciated that the generation time or triggered time of service identification He the service request can be carried in service request.Please Sub- amount is asked to refer to the quantity of service request received in the second timeslice.
Specifically, service server obtains service request, determines the request time of accessed service request, according to asking Seeking time determines the second timeslice belonging to the service request, and updates asking for its affiliated second timeslice according to the service request Seek sub- amount.Service server can parse accessed service request and obtain the generation time of the service request, as the business The request time of request.Service server can also will receive the receiving time of service request as when the request of the service request Between.When meeting request amount information reporting trigger condition, each of service server determined in actual time window the second time Piece, and obtain the request sub- amount of each second timeslice.Service server measures this according to accessed multiple request The request amount information of actual time window.
In one embodiment, the request amount letter that service server real-time detection current time and/or other equipment are sent Breath reports instruction.When detecting that current time is consistent with the preset request amount information reporting triggered time, alternatively, when detecting When request amount information reporting instructs, service server judgement meets request amount information reporting trigger condition, then obtains current time The request sub- amount of each second timeslice in window.
In one embodiment, the waiting time after service server real-time detection reports request amount information from the last time, And it will test to ground waiting time and be compared with preset duration.When waiting time being greater than or equal to preset duration, business clothes Business device obtains the request sub- amount of each second timeslice in actual time window.It is appreciated that service server real-time detection away from It reports whether the time interval of request amount information reaches preset duration from the last time, determines to meet request if reaching preset duration Information reporting trigger condition is measured, and obtains the request amount information of actual time window.Service server is regular according to predetermined period The request amount information of actual time window is reported, periodically to obtain dynamic allocation from Quota distribution server according to predetermined period Request amount amount, rather than the distribution of the Real time request Quota distribution server amount of making requests amount, accordingly even when Quota distribution It is inaccessible in the server of short duration period that serious impact will not be caused to service server, thus reduce operation at This, and ensured significant response of the service server to service request.
In one embodiment, service server is in request for getting each second timeslice in actual time window After amount, the second timeslice of each second timeslice mark is measured with request and is associated, and according to after association second when Between piece mark and request measure the request amount information of actual time window.In this way, including current time in request amount information Each second timeslice mark and corresponding request amount in window.
In one embodiment, service server according in actual time window according to the second time of part that timing is forward The request sub- amount of piece, obtains the request amount information of the actual time window.It is appreciated that service server can also be from current time Screening part second timeslice forward according to timing in window, identifies according to the second timeslice of the second timeslice filtered out The request amount information of actual time window is measured with request.
In above-described embodiment, according to the request amount of the received service request of timeslice statistics, and meeting request amount When information reporting trigger condition, according to the request sub- amount of timeslice statistical report, and according to request counted according to timeslice The request amount information for measuring actual time window, as request amount information to be reported.It is requested in this way, being counted according to timeslice Son amount, and request amount information is reported according to time window, to obtain current request amount amount from Quota distribution server, guaranteeing In the case where effective distribution of request amount amount, reduce the communication frequency of service server Yu Quota distribution server, it can It effectively avoids the problem that increasing system communication load because frequently communicating, and the disaster tolerance and fault-tolerant ability of system can be improved.
In one embodiment, according to the request time of service request determine service request belonging to the second timeslice, more The request sub- amount of second timeslice determined by new, comprising: determined belonging to service request according to the request time of service request The corresponding second timeslice mark of second timeslice;It is identified according to the second timeslice and determines that service request is corresponding with request time The destination request time;When the destination request time, timestamp corresponding with the second timeslice mark was consistent, to the second timeslice mark Know corresponding request amount and carries out incremental update.
Wherein, the second timeslice mark is used for the second timeslice of unique identification, and it is corresponding specifically to can be the second timeslice Number.Actual time window includes multiple second timeslices, the corresponding number of each second timeslice, and multiple number is continuous And it is different.Incremental update, which refers to, carries out increment or incremental update processing to request son amount.
Specifically, service server determines the request time of accessed service request, is determined according to the request time Corresponding the second timeslice mark of corresponding service request, second timeslice are identified as the second timeslice belonging to service request Corresponding the second timeslice mark.Service server is identified according to corresponding second timeslice of service request and request time, It determines the destination request time corresponding to the service request, and identified destination request time and the second timeslice mark is worked as Preceding corresponding timestamp is compared.When the destination request time, timestamp corresponding with the second timeslice mark was consistent, to this Second timeslice identifies corresponding request amount and carries out incremental update.
In one embodiment, service server is according to the request time of service request, according to the first default mapping relations Determine the corresponding second timeslice mark of the service request.First default mapping relations are such as: index=(A%60)/10, In, A is the request time of service request, and % indicates modulus or modulo operation ,/indicate that floor operation, index are service request pair The the second timeslice mark answered, also is understood as the index or number of the second timeslice belonging to service request, the value of index Range is between [0,5].It is appreciated that being rounded object can be according to the in time window in above-mentioned first default mapping relations The Number dynamics of two timeslices adjust, for example, can close the first default mapping when time window includes 3 the second timeslices Rounding object in system is revised as 20 by 10.The statistics that the quantity of the second timeslice can be counted by tradeoff request in time window Error and statistical efficiency are dynamically determined.
In one embodiment, service server is according to the request time and identified second timeslice mark of service request Know, determines the service request corresponding destination request time according to the second default mapping relations.Second default mapping relations are such as: Timekey=A-A%60+index*10, wherein A is the request time of service request, the target of the timekey service request Request time, index are that the second timeslice determined according to the above-mentioned first default mapping relations identifies.In the present embodiment, with The request time that identical fiducial time is time zero to calculate each service request, the starting in fiducial time in such as specified time Time is also possible to every month, initial time weekly or daily.
It illustrates, it is assumed that using daily initial time as the benchmark time, the request time of some service request is 5: 12 Point, then according to the first default mapping relations index=((5*60+12) %60)/10, it may be determined that the service request corresponding second Timeslice is identified as 1, correspondingly, according to the second default mapping relations timekey=(5*60+12)-(5*60+12) %60+1* 10, it may be determined that the service request corresponding destination request time be 310 seconds, exactly 5 points 10 minutes.In this way, request time is 5: 10 The corresponding destination request time for assigning to 5 points of 19 minutes service requests is unified at 5 points 10 minutes, and is by the destination request time It is in the corresponding request amount of 5 points of 10 minutes second timeslices that 5 points of 10 minutes service requests, which are counted to timestamp,.
In one embodiment, when the destination request time, timestamp corresponding with the second timeslice mark was consistent, show Service request belongs to second timeslice in actual time window and identifies in corresponding second timeslice, service server by this Two timeslices identify corresponding request amount and add one to obtain updated request amount, and second timeslice mark is current right The request sub- amount answered is updated to updated request amount.In this way, service server receive it is next belong to this second When the service request of timeslice, incremental update is carried out to the updated request amount.
In above-described embodiment, the corresponding second timeslice mark of the service request is determined according to the request time of service request Know, and request time is handled to obtain the corresponding destination request time according to the second timeslice mark, in service request When belonging to second timeslice in actual time window, dynamic increment updates the request sub- amount of second timeslice.According to this Kind of mode can accurate statistics to each second timeslice request sub- amount.
In one embodiment, according to the request time of service request determine service request belonging to the second timeslice, more The request sub- amount of second timeslice determined by new, further includes: when the destination request time is corresponding with the second timeslice mark Between when stabbing inconsistent, the second timeslice identified into corresponding request amount reset to request and measure initial statistical value;When by second Between piece to identify corresponding update of time stamp be the destination request time.
Wherein, request amount initial statistical value refers to that the second timeslice identifies the initial statistical value of corresponding request amount. Initial statistical value refers to initial value when making requests sub- amount statistics.It is appreciated that request son amount initial statistical value refers to the Service request in two timeslices carries out request sub- measurement value when initial statistical.
Specifically, corresponding with the second timeslice mark when the service request the being currently received corresponding destination request time When timestamp is inconsistent, shows that time window exists and update, that is, show the service request being currently received and last time The service request received belongs to different time windows, and service server is then corresponding by the service request being currently received The corresponding request sub- amount of the second timeslice mark reset to request son amount initial statistical value.Correspondingly, service server will When the corresponding timestamp of the service request corresponding second timeslice mark resets to the service request corresponding destination request Between, that is, it is the corresponding destination request time that second timeslice, which is identified corresponding update of time stamp,.
In one embodiment, when identified destination request time and the corresponding timestamp of the second timeslice mark are different When cause, showing that time window generates back wheel, that is, showing in previous time window timing near preceding one second Between piece become actual time window in second timeslice of the timing after.It illustrates, it is assumed that each time window packet 6 the second timeslices are included, the respective second timeslice mark of 6 second timeslices is respectively 0,1,2,3,4 and 5, if previous The timing of 6 second timeslices is 0,1,2,3,4,5 in a time window, then after time window generates back wheel, current time The timing of 6 second timeslices is 1,2,3,4,5,0 in window.In this way, when time window generates back wheel, the previous time The last one second timeslice that first the second timeslice mark of window becomes actual time window identifies.
In one embodiment, over time, the time span of time window immobilizes, each time window The quantity of the second included timeslice and the second timeslice mark remain unchanged, but multiple second timeslices in time window Timing or sequencing cycle variation.The timing of the second timeslice is different in two time windows of arbitrary neighborhood as a result, that is, appoints The sequence for the second timeslice mark in two neighboring time window of anticipating is different.If be appreciated that service server it is adjacent twice on Report the time interval of request amount information less than the time span of the second timeslice, then the adjacent request amount information institute reported twice is right The actual time window answered may be window at the same time.
Fig. 3 is the structural schematic diagram of time window in one embodiment.As shown in figure 3, time window is long including 6 times Spend consistent second timeslice, which is respectively 0,1,2,3,4 and 5, and this 6 A second timeslice is carried out sequential concatenation in a manner of end to end and obtains corresponding time window.Each second timeslice is corresponding Having time carries out the service request in each second timeslice to count to get corresponding request amount, as a result, each timeslice Corresponding having time and request count the information of two dimensions.Fig. 3 show the time window of pie, according to timing successively to the time The second timeslice makes requests counting each of in window, when the request counting successively carried out is finished, time window meeting Generate back wheel, continue to execute according to timing successively to the second timeslice makes requests counting each of in time window the step of. Each timeslice in time window can be regarded as a memory grid, and multiple memory grid constitute complete internal storage structure.Industry Be engaged in server after receiving service request, according to the request time of the service request determine the service request belonging to memory cell Son, and the request for updating the memory grid counts, that is, updates the request sub- amount of the second timeslice.
It is worth noting that the time span of time window shown in Fig. 3 is 1 minute, when time window is divided into 6 Between piece, the time span of each timeslice is 10 seconds, merely exemplary, be not used to the time span of limiting time window, And timeslice quantity included by time window.
Fig. 4 is the structural schematic diagram of time window in another embodiment.Fig. 4 is corresponding with time window shown in Fig. 3, Fig. 4 show the time window of chain, and be capable of directly perceived characterization time window returns wheel and two neighboring time window Nei Ge The timing of two timeslices.Multiple second timeslices in the dotted line frame of Fig. 4 constitute actual time window, over time, Time window, toward front slide, forms new time window according to the step-length per next the second timeslice, as a result, by constantly sliding Dynamic time window is capable of forming chain structure as shown in Figure 4.Second time identifier can be regarded as the index of the second timeslice.When When service request statistics in actual time window in 4 corresponding second timeslices of index finishes, which can be produced Wheel is given birth to back, the service request in 5 corresponding second timeslices of index can be counted again in next time window, according to this Analogize, the timing of each second timeslice and request son amount in time window can be constantly updated.
In one embodiment, service server corresponds to the array that time window one length of distribution is 6, the array Each corresponds to second timeslice, and each of the array includes time and structural body that request counts, time for one Two timeslices corresponding time, request are counted as the request sub- amount of the second timeslice.
In above-described embodiment, when determining that time window generates back wheel based on received service request, then by the business Request belonging to the second timeslice request sub- amount reset to request son amount initial statistical value, and by second timeslice when Between stab and reset to the service request corresponding destination request time, returning request in the time window after wheel based on resetting in this way Initial statistical value and timestamp are measured, counting is made requests to second timeslice again.
In one embodiment, request amount information is corresponding with process identification (PID);Step S204 includes: by the process of self-operating Request amount information reporting corresponding with each process identification (PID) is counted to Quota distribution server;Quota distribution server is received to correspond to The current request amount amount of process identification (PID) feedback;Current request amount amount is by Quota distribution server according to service server cluster In the process number that reports of each service server and the corresponding request amount information of each process identification (PID) be dynamically determined.
Wherein, process identification (PID) is used for unique identification process.Process is operate in service server and can be realized business The service or program of logic.Operation has at least one process in one service server, service server by process response or The received service request of processing.
Specifically, the service server service request received by the process response or processing of self-operating, and press It shines into journey and each of counts in actual time window the request sub- amount of the second timeslice respectively, that is, count each process and working as The request sub- amount of second timeslice each of in preceding time window.It is appreciated that the request sub- amount of second timeslice is used for table Request amount distribution of the corresponding process in second timeslice is levied, is asked including the service request responded and the business refused to respond It asks, may also include service request to be responded.When meeting request amount information reporting trigger condition, service server is according to itself The process identification (PID) of each process of operation obtains request of each process second timeslice each of in actual time window Amount, and request amount information of each process in actual time window is measured according to accessed request.Business service Device counts the process number of self-operating, and the request amount information by the process number and each process of statistics in actual time window Report to Quota distribution server.
Process number that Quota distribution server is reported according to service server each in service server cluster and each into The corresponding request amount information of journey dynamically distributes request amount full amount to be allocated, to be dynamically determined distribution to each business The current request amount amount of each process on server, and identified current request amount amount is fed back into corresponding business Server.Correspondingly, service server receives amount server and currently asks for what each process of self-operating dynamically distributed The amount of asking amount, and from obtaining in current request amount amount to the period for obtaining request amount amount next time, by it is each into Journey controls the process in corresponding current request amount amount in the request amount in each first time piece.
In one embodiment, from obtaining the current request amount amount for distributing to each process to being asked next time In the period that the amount of asking amount is stopped, service server distributes the business of the process by each process real-time detection of self-operating Request.When detecting service request, service server is by detecting that the process of the service request obtains the process current Request amount in first time piece, and accessed request amount current request amount amount corresponding with the process is compared Compared with.When decision request amount is greater than or equal to corresponding current request amount amount, service server is refused by the process to being examined The response of the service request measured.
In above-described embodiment, the request amount information in actual time window is reported according to process, with enterprising in process dimension The dynamic allocation of row request amount amount, can be improved the accuracy of request amount Quota distribution.In this way, currently being asked based on what is distributed The amount of asking amount can be realized the control of the request amount in process dimension, so as to improve the accuracy of request amount control.
In one embodiment, the current request amount amount that Quota distribution server corresponds to process identification (PID) feedback is received, It include: the current request amount amount and service server cluster for receiving Quota distribution server and corresponding to process identification (PID) feedback The process sum of middle operation;When reaching preset duration after receiving current request amount amount, Quota distribution clothes are not received The request amount amount that business device is fed back next time determines according to process sum and request amount full amount to be allocated and distributes to itself fortune The request amount amount of capable each process.
Wherein, process sum refers to the sum of the process run on each service server in service server cluster Amount.Preset duration is the time span of the preset operating condition for being used to determine Quota distribution server, be can customize, than Such as 5 minutes.
Specifically, Quota distribution server is believed according to the request amount of each service server process number reported and each process Breath is dynamically determined the process sum run in the current request amount amount and service server cluster for distribute to each process Afterwards, the current request amount amount for distributing to each process and the process sum run in service server cluster are fed back to accordingly Service server.Received process sum is buffered in local by service server, and by the request amount control of each process System is in corresponding current request amount amount.Service server is after receiving the current request amount amount of dynamic allocation, in real time The request amount amount that detection Quota distribution server dynamically distributes next time, and count the waiting of request amount Quota distribution next time Duration.When the waiting time of statistics being greater than or equal to preset duration, service server does not still receive Quota distribution service The request amount amount of the lower sub-distribution of device then determines that Quota distribution server is operating abnormally, and service server is then according to caching Process sum and request amount full amount to be allocated, automatically determine the request amount amount for distributing to each process of self-operating.
In one embodiment, when determining that Quota distribution server is operating abnormally, service server is according to process sum Average request amount amount is determined with request amount full amount to be allocated, and the average request amount amount is determined as self-operating The current request amount amount of each process.In this way, can be realized request amount when Quota distribution server is operating abnormally The distribution of amount, and then the control of the request amount amount amount of making requests based on distribution, improve service server and the business The disaster tolerance and fault-tolerant ability of system locating for server.
In one embodiment, service server receives the request amount full amount to be allocated that management equipment is synchronized to, and It is buffered in local, can realize and ask based on the request amount full amount of caching when determining that Quota distribution server is operating abnormally The voluntarily distribution of the amount of asking amount.It is appreciated that management equipment can realize that request amount to be allocated is total based on the trigger action of user The configuration of amount.Management equipment specifically can be management terminal or management server.
In one embodiment, after the current request amount amount for receiving Quota distribution server dynamic allocation, business The request amount amount that server detection Quota distribution server dynamically distributes next time, and the dynamic point next time is being not detected It when the request amount amount matched, keeps the current request amount amount constant, and is based on the current request amount amount amount of the making requests control System, until the request amount amount dynamically distributed is detected, alternatively, counting on waiting time more than or equal to preset duration next time When, based on the request amount amount amount of the making requests control redefined.In this way, not receiving Quota distribution server next time The request amount amount of dynamic allocation and when market being waited to be less than preset duration, then determine to cause not successfully due to network problem The request amount amount of next sub-distribution is received, and is based on the amount of the making requests control of current request amount amount, can be improved business The fault-tolerant ability of server.
In above-described embodiment, by the process in the current request amount amount and service server cluster of distributing to each process Sum feeds back to service server together, and when request amount amount not receive dynamic allocation in preset duration is based on process Sum realizes the voluntarily distribution of request amount amount, to improve disaster tolerance and fault-tolerant ability.
As shown in figure 5, providing a kind of request amount control method, this method is applied to the industry in service server cluster Business server be illustrated, this method specifically includes the following steps:
S502 obtains service request.
S504, according to the request time of service request determine service request belonging to the second timeslice corresponding second time Piece mark.
S506 determines service request corresponding destination request time with request time according to the second timeslice mark.
S508, when the destination request time, timestamp corresponding with the second timeslice mark was consistent, to the second timeslice mark Know corresponding request amount and carries out incremental update.
S510, when the destination request time, timestamp corresponding with the second timeslice mark was inconsistent, by the second timeslice It identifies corresponding request amount and resets to request son amount initial statistical value.
S512, it is the destination request time that the second timeslice, which is identified corresponding update of time stamp,.
S514 obtains each second timeslice in actual time window when meeting request amount information reporting trigger condition Request sub- amount.
S516 measures the request amount information of actual time window according to request.
S518 obtains current request amount amount from Quota distribution server according to request amount information;Current request amount amount It is dynamically determined by Quota distribution server according to the request amount information that each service server in service server cluster reports.
S520, to obtaining in the period that request amount amount is stopped next time, is detected from obtaining current request amount amount Service request.
S522 obtains the request amount in current first time piece when detecting service request.
S524 refuses the response to service request when request amount is greater than or equal to current request amount amount.
In above-described embodiment, each second timeslice is made requests to count to get according to the request time of service request and is asked Sub- amount is sought, when meeting request amount information reporting trigger condition, is reported according to actual time window by multiple second timeslices The request amount information that measures of request, with the current request amount amount dynamically distributed according to the request amount information reported, In the case where reducing the communication frequency of service server and Quota distribution server, it can guarantee effectively dividing for request amount amount Match, and the request amount information of the request son amount including multiple second timeslices is reported to can be improved service server place system Disaster tolerance and fault-tolerant ability, so as to guarantee the distribution accuracy and efficiency of request amount amount.Further, based on dynamic allocation The control of the current request amount amount amount of making requests can be improved the control efficiency and accuracy of request amount, so as to effectively keep away Exempt from the problem of leading to service server snowslide or delay machine because of overload.
As shown in fig. 6, in one embodiment, providing a kind of request amount control method, this method is applied to amount Distribution server is illustrated, method includes the following steps:
S602 receives the request of actual time window that each service server is obtained and reported in service server cluster Measure information.
Specifically, each service server in service server cluster is obtained from the request amount in actual time window Information, and by accessed request amount information reporting to Quota distribution server.Quota distribution server receives business service The request amount information in actual time window that each service server in device cluster reports respectively.
In one embodiment, service server cluster is when receiving service request, when according to the request of service request Between determine the service request belonging to the second timeslice, and according to the service request update its affiliated second timeslice request son Amount.When meeting request amount information reporting trigger condition, service server obtains each second timeslice in actual time window Request sub- amount, the request amount information of the actual time window is measured according to request of multiple second timeslices, and should Request amount information reporting is to Quota distribution server.
In one embodiment, Quota distribution server receives that each service server reports and including current time The request amount information of the interior request son amount according to forward the second timeslice of part of timing of window, in order to be based on being somebody's turn to do according to timing The request sub- amount amount of the making requests Quota distribution of forward the second timeslice of part, obtains more accurate current request amount volume Degree.
In one embodiment, Quota distribution server receives the current time that each service server is reported according to process The request amount information of window distributes to currently asking for each process in order to which the request amount information according to each process is dynamically determined The amount of asking amount can be improved the precision of request amount Quota distribution, can be improved and asks when controlling according to the process amount of making requests The accuracy of the amount of asking control.
In one embodiment, Quota distribution server receives the process number for the self-operating that each service server reports With each process in the corresponding request amount information of actual time window.
S604 is dynamically determined according to request amount information and request amount full amount to be allocated and distributes to each service server Current request amount amount.
Specifically, the current time that Quota distribution server is reported according to service server each in service server cluster The request amount information of window determines that request amount of each service server in actual time window accounts for the service server cluster In request amount ratio, and be dynamically determined according to identified ratio and request amount full amount to be allocated and distribute to each industry The current request amount amount of business server.
In one embodiment, actual time window includes multiple second timeslices, and each second timeslice, which is corresponding with, asks Seek sub- amount.The request amount information of actual time window includes the respective request amount of multiple second timeslices.Quota distribution service Device multiple request amounts in each request amount information based on the received, obtain corresponding service server in current time window The corresponding first request total amount of mouth obtains working as service server cluster according to the first of each service server the request total amount Preceding time window corresponding second requests total amount, and obtains corresponding service service according to the first request total amount and the second request total amount Device request amount ratio shared in service server cluster.
In one embodiment, Quota distribution server is sub according to the request of the second timeslice each in actual time window Amount, alternatively, according to, according to the request sub- amount of forward the second timeslice of part of timing, corresponding service is obtained in actual time window Time window corresponding first requests total amount to server in this prior.Correspondingly, Quota distribution server is according to request amount information In each request amount, alternatively, according in request amount information according to the request sub- amount of forward the second timeslice of part of timing, Corresponding service server is obtained in the corresponding first request total amount of actual time window.
In one embodiment, when receiving the request amount information that service server is reported according to process, Quota distribution Server is dynamically determined according to each process in the request amount information of actual time window and request amount full amount to be allocated Distribute to the current request amount amount of each process.
In one embodiment, the request amount information of Quota distribution server actual time window based on the received, Request amount full amount to be allocated is dynamically distributed to each process according to business.It is appreciated that when service identification it is corresponding to When the request amount full amount of distribution is greater than or equal to preset threshold, Quota distribution server is by the corresponding request amount of the service identification Full amount is dynamically distributed in the manner described above.When the corresponding request amount full amount to be allocated of service identification is less than default threshold When value, the respective request amount full amount of service identification that multiple request amount full amounts are less than preset threshold carries out as a whole It dynamically distributes.
In one embodiment, in the dynamic allocation procedure of request amount amount, Quota distribution server local or pass through Network communication obtains request amount full amount to be allocated from management equipment.The request amount to be allocated of Quota distribution server local Full amount is synchronous in advance by management equipment and is buffered in local request amount full amount, can reduce Quota distribution server with The number of communications of management equipment also can be avoided because network problem can not influence request amount due to real-time acquisition request amount full amount when The problem of dynamic allocation of amount.
Current request amount amount is fed back to corresponding service server by S606;The current request amount amount of feedback is used for Indicate that corresponding service server is based on the amount of the making requests control of current request amount amount.
Specifically, Quota distribution server is believed according to the request amount that each service server in service server cluster reports Breath, it is after being dynamically determined the current request amount amount for distributing to each service server, identified current request amount amount is anti- It is fed to corresponding service server.Service server is receiving Quota distribution server for the request amount information feedback reported Current request amount amount when, from obtaining current request amount amount to obtain next time request amount amount stop period It is interior, the request amount in each first time piece is controlled in current request amount amount, to realize in each first time piece Request amount control.
In one embodiment, Quota distribution server is by the current request amount amount being dynamically determined and service server collection The quantity of service server feeds back to corresponding service server in group, in order to which service server is run in Quota distribution server It, being capable of voluntarily dividing based on the quantity amount of the making requests amount of request amount full amount and service server to be allocated when abnormal Match, can be improved disaster tolerance and fault-tolerant ability.
In one embodiment, Quota distribution server takes the current request amount amount for distributing to each process and business Process sum in business device cluster feeds back to corresponding service server, in order to which service server is determining Quota distribution server The current request amount amount for distributing to each process is automatically determined when operation exception.
Above-mentioned request amount control method, Quota distribution server receive each service server point in service server cluster The request amount information for the actual time window not reported, and based on the request amount information reported and request amount total value to be allocated Degree dynamic distributes current request amount amount to each service server, automatic hereby based on the request amount information of actual time window It dynamically distributes current request amount amount and can be improved the allocative efficiency of request amount amount without manual intervention.Quota distribution clothes Automatically the current request amount amount distributed is fed back to each service server by business device, so that each service server is based on being distributed The current request amount amount amount of making requests control, so as to improve the control efficiency of request amount.
In one embodiment, actual time window includes multiple second timeslices;Each second timeslice and request Amount corresponds to;Step S604 includes: the request sub- amount chosen from request amount information according to forward the second timeslice of part of timing; The first request total amount corresponding to corresponding service server is measured according to the request of selection;According to each service server pair The the first request total amount answered obtains the second request total amount corresponding to service server cluster;According to the first request total amount, second Total amount and request amount full amount to be allocated are requested, the current request amount amount for distributing to corresponding service server is dynamically determined.
Specifically, actual time window includes multiple second timeslices, and each second timeslice is corresponding with request son amount.Phase Ying Di, the request amount information for the actual time window that service server reports include respective request of multiple second timeslices Amount.Quota distribution server chooses forward the second time of part according to timing from received each request amount information The request sub- amount of piece measures the first request total amount corresponding to respective request amount information according to the request of selected taking-up, and The first request total amount is determined as the first request total amount corresponding to corresponding service server.Quota distribution server is according to industry Each service server corresponding first requests total amount in business server cluster, obtains the service server cluster corresponding second Request total amount.Quota distribution server is according to each service server corresponding first request total amount, service server cluster pair The the second request total amount answered and request amount full amount to be allocated, are dynamically determined the current request for distributing to corresponding service server Measure amount.
In one embodiment, in the amount of making requests information reporting, according to timing by front and back the in actual time window Request in two timeslices counts may be imperfect, and Quota distribution server is chosen forward according to timing from request amount information The dynamic allocation of the request son amount amount of the making requests amount of the second timeslice of part, to guarantee in the second timeslice calculated The integrality of request technology, to guarantee the accuracy of request amount Quota distribution.In this way, normally asking according to each service server The amount of asking allocation proportion is dynamically determined the current request amount amount of each service server, can in order to when request amount is increased sharply The current request amount amount amount of making requests control based on dynamic allocation.
In one embodiment, Quota distribution server chooses forward part second from request amount information according to timing The request sub- amount of timeslice, and the dynamic allocation based on the selected request son amount amount of making requests amount.Here, selected The request sub- amount of the second timeslice of part is not specifically limited.For example, can choose according to 4 forward the second timeslices of timing Request son amount, can also the second timeslice before selected distance current time 15 seconds request sub- amount.
In above-described embodiment, the higher component requests amount of accuracy is chosen from the request amount information reported and is made requests The dynamic allocation for measuring amount, can be improved the accuracy of current request amount amount, in order to which service server is based on the accuracy When the higher current request amount amount amount of making requests controls, the accuracy of request amount control can be improved.
In one embodiment, service server cluster is block chain network;Service server is in block chain network Block chain node server;Step S604 includes: the breath of notifying in history for obtaining each block chain node server;From block chain Breath of notifying in history is screened in network meets the target block chain node server for operating normally decision condition;According to target block The request amount information and request amount full amount to be allocated that chain node server reports are dynamically determined and distribute to each target block The current request amount amount of chain node server.
Wherein, breath of notifying in history refers to the history information reported before current time, is particularly used in characterization and works as Request amount information reports situation before the preceding time.Record in breath of notifying in history has service server before current time each Report request amount information on call time.Operating normally decision condition is for determining whether service server is in normal operation The decision condition or foundation of state.Decision condition is operated normally for example, having request in nearest first preset duration of service server Information reporting record is measured, and/or, when the stable duration for reporting request amount information of service server is default more than or equal to second It is long.First preset duration such as 15 seconds, the second preset duration such as 2 minutes.Service server cluster is block chain network, business Each service server in server cluster is the block chain node server in block chain network.
Specifically, Quota distribution server is after getting the request amount information that block chain node server reports, from this Ground obtains the breath of notifying in history of each block chain node server.Quota distribution server notifies accessed in history Breath is compared with preset normal operation decision condition, is notified in history with being screened from block chain network according to comparison result Breath meets the target block chain node server for operating normally decision condition, that is, screens history from block chain network and report Information meets the block chain node server for operating normally decision condition as target block chain node server.Quota distribution clothes The request amount information and request amount full amount to be allocated that business device is reported according to the target block chain node server filtered out The dynamic allocation of the amount of making requests amount in the manner described above distribute to working as each target block chain node server with determination Preceding request amount amount.
In one embodiment, Quota distribution server and service server establish heartbeat machine when carrying out data interaction System, to judge the function situation of data interaction object based on established thought-read jump mechanism.
In one embodiment, when Added Business server in service server cluster, Quota distribution server should The request amount information setting that Added Business server reports is default value, and is reported based on the default value and other service servers The request amount information amount of making requests amount dynamic allocation.It is appreciated that for newly-increased service server, in initial launch Part first time piece in can be controlled without request amount, alternatively, according to the initial request amount amount amount of making requests control.When The request sub- amount amount of making requests volume when collecting the request sub- amount of multiple second timeslices, then based on multiple second timeslice The dynamic allocation of degree.
In one embodiment, Quota distribution server analyzes the breath of notifying in history of each service server, With the request amount information reporting statistical conditions of each service server of determination.When request amount information reporting statistical conditions are not met just Often when operation decision condition, then determine that corresponding service server is operating abnormally, then no longer dynamic gives the operation in the manner described above Abnormal service server distributes current request amount amount.
In one embodiment, if not receiving currently on one or more service servers in service server cluster When the request amount information of report, Quota distribution server can based on the request amount information that other service servers successfully report, and The dynamic allocation for the request amount information amount of the making requests amount that the previous success of one or more service server reports, to guarantee The allocative efficiency of request amount amount.In this way, when being unsuccessfully received the request amount letter that service server reports due to network problem When breath, still can the amount of making requests amount distribution, as long as the service server is next time or lower next time can succeed The request amount information of itself is reported, thus, it is possible to improve disaster tolerance and fault-tolerant ability.
In one embodiment, when there is the service server for reporting request amount information not successfully, Quota distribution service Device can keep the current request amount amount of the service server constant, and based on the request amount information successfully reported to other business The current request amount amount of server is dynamically distributed.
In above-described embodiment, the operating condition of each service server is determined based on breath of notifying in history, and to normal operation The service server amount of making requests amount dynamic allocation, to improve the accuracy of request amount Quota distribution.
In one embodiment, in some special timing nodes, moment has huge request amount and pours into including business clothes The background system of business device, causes huge impact to background system.Wherein, request amount also is understood as flow.These transient flows Amount is usually 7 to 8 times for estimating peak flow.The flow that abnormal conditions may trigger tens times pours in, may be to business service The background servers such as device even background system causes huge impact.But each service server will not be given under normal conditions Excessive resource or amount are distributed, even if being assigned enough resources or amount, after peak value, the resource benefit of service server It is relatively low with rate, cause the wasting of resources.Secondly, partial discharge itself is redundancy or invalid traffic, thus upstream is flowed Amount control, that is, it is vital for carrying out control to request amount.
Currently, the static allocation mode request amount amount fixed to the distribution of each service server is typically based on, alternatively, base In the request amount amount of each service server of service request Real time request.Based on static allocation mode to each service server point It is easy to accomplish with fixed request amount amount and smaller on business processing logic influence, but complexity is runed, redundancy ability is weak. Especially it is difficult to determine the request amount volume of each service server under the isomerous environment of service server for including different type of machines Degree, secondly, needing human intervention to re-start when needs are offline extremely or need Added Business server for service server and asking The distribution of the amount of asking amount, and it is complicated for operation, the allocative efficiency of request amount amount is reduced, to reduce redundancy ability.
In mode based on service request Real time request respective request amount amount, request amount full amount is stored in Quota distribution Server, service server, will be based on received service requests in Quota distribution after receiving each service request Inquiry whether there is remaining request amount amount in server, and if it exists, then respond the service request.This kind of method of salary distribution needs The request amount amount that current residual is frequently inquired from Quota distribution server, increases operation complexity and cost, and disaster tolerance Ability is poor, especially will lead to the response obstruction of service request when Quota distribution server is operating abnormally, may be to entire industry Business generates risk.Secondly, needing to carry out dilatation to Quota distribution server when flow explodes, increases operation cost and answer Miscellaneous degree.
And request amount control method provided by the present application, service server make requests counting according to the second timeslice, press The request sub- amount of multiple second timeslices is buffered in local according to time window, to meet request amount information reporting trigger condition When, service server measures the request amount information of actual time window according to request of caching, and by the request amount information Automatically Quota distribution server is reported to.Quota distribution server is based on received request amount information and request to be allocated The dynamic allocation of the full amount amount of making requests amount are measured, and the request amount amount being dynamically determined is fed back into service server.This Sample determines that request amount is uprushed the request amount of each service server under abnormal conditions based on request amount distribution dynamic under normal circumstances Distribution/request amount amount.Service server controls the request amount in each first time piece in corresponding current request amount volume In degree, the influence of logic normally handled business to reduce request amount control to the greatest extent when flow is normal, energy when request amount exception Enough request amount amounts based on distribution realize being precisely controlled for request amount.
Although should be understood that each embodiment of the application flow chart in each step according to arrow instruction successively It has been shown that, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, There is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, each embodiment In at least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily multiple sub-steps Completion is executed in synchronization, but can be executed at different times, the execution in these sub-steps or stage sequence is not yet Necessarily successively carry out, but can be at least part of the sub-step or stage of other steps or other steps in turn Or it alternately executes.
As shown in fig. 7, in one embodiment, providing a kind of request amount control system, which includes: business service Device cluster 110, Quota distribution server 120 and routing server 130.Wherein, service server cluster 110 includes at least business Server 112 and service server 114.Each service server in processing server cluster 110, by network respectively with volume Degree distribution server 120 and routing server 130 are communicated.Routing server 130 can be regarded as service server cluster 110 Upstream server, by service request to be processed route to any service server in service server cluster 110 carry out Response or processing.Each service server in service server cluster 110 makes requests counting according to the second timeslice, and The request sub- amount of the second timeslice each in actual time window is buffered in local according to time window, to meet request amount When information reporting trigger condition, the request amount information of actual time window is measured according to multiple request of caching, and should Request amount information reporting is to Quota distribution server, to indicate that Quota distribution server is carried out based on the request amount information reported The dynamic allocation of request amount amount.
In one embodiment, if service server carries out received service request by the process of self-operating Response or processing can then count respectively the request amount information of actual time window, and asking each process for each process The amount of asking information reporting is to Quota distribution server.It is appreciated that service server can be respective by multiple processes of self-operating Request amount information reports to Quota distribution server together, the respective request amount information of each process can also be reported to respectively Quota distribution server.
As shown in figure 8, the system includes: business clothes another embodiment provides a kind of request amount control system Business device cluster 110, Quota distribution server 120, routing server 130, management equipment 140 and processing server cluster 150.Its In, processing server cluster 150 includes at least processing server 152 and processing server 154.In processing server cluster 110 Each service server, by network respectively with Quota distribution server 120, routing server 130, management equipment 140 and Processing server cluster 150 is communicated.Processing business server in processing server cluster 150 can be regarded as business service The downstream server of device cluster 110, the calling based on service server carry out corresponding business processing.
Each service server in service server cluster 110 can call any one in processing server cluster 150 A processing server.Management equipment 140 can complete every configuration based on the trigger action of user, and configuration is synchronized to business clothes The each service server being engaged in device cluster 110.Such as.Management equipment 140 can by for each service identification configuration to point The request amount full amount matched is synchronized to each service server.It is appreciated that management equipment 140 can be total by request amount to be allocated Amount is directly synchronized to Quota distribution server 120 by network, and Quota distribution service can also be synchronized to by service server Device 120.
In one embodiment, above-mentioned request amount control method is based on the less resource amount of making requests control, to guarantee The background servers such as service server cluster 110 and/or processing server cluster 150, gush in the unexpected burst of user's request amount It is fashionable to be safely operated, and facilitate operation and management in practice.Above-mentioned request amount control method can be widely applied to various Second kills activity, alternatively, being applied in the client ludic activity of various request amounts or the unpredictable emergency case of flow.
As shown in figure 9, In yet another embodiment, providing a kind of request amount control system, which includes: business clothes Business device cluster 110, Quota distribution server 120, routing server 130 and server proxy cluster 160.Wherein, agency service Device cluster 160 includes at least proxy server 162 and proxy server 164.Each agency clothes in server proxy cluster 160 The each service server being engaged in device and service server cluster 110 corresponds, and is communicated between each other by network.
Request of corresponding service server each second timeslice in actual time window is stored in proxy server Amount and Quota distribution server are directed to the current request amount amount that the request amount information reported dynamically distributes.Service server When receiving service request, judge whether the request amount of current first time piece is greater than or equal to currently by proxy server Request amount amount, and the service request is performed corresponding processing according to judging result, to realize the control of request amount.Accordingly The request time of received service request and/or service request is sent to proxy server by ground, service server, to refer to Show that proxy server makes requests counting to the second timeslice belonging to the service request.Proxy server is fixed according to predetermined period Phase reports the request amount information of actual time window to amount distribution server, to obtain corresponding service from Quota distribution server The current request amount amount of server.In this way, business processing logic and request amount control logic are disposed respectively, can drop The data processing pressure of low service server.
It is appreciated that service request respond by one or more processes of self-operating when service server or Processing is, can also be by proxy server according to the above-mentioned request amount control logic amount of making requests control.
In one embodiment, multiple service servers in service server cluster 110 can be taken by the same agency The business device amount of making requests control.
It in one embodiment, can be in each service server in Fig. 7 or service server cluster 110 shown in Fig. 8 Middle deployment agency service and business service, service server is handled by business service or corresponding service is requested, and passes through the agency Server controls the request amount of itself.Agency service can be regarded as being deployed in service server and can be realized above-mentioned The service of the correlation function of proxy server.Business processing and agency service can be regarded as in operation service server it is different into Journey.Activity service can be communicated with agency service by way of shared drive or unix socket, to improve communication efficiency. Business service and agency service can carry out real time communication, can also carry out periodic communication according to the specified period.Correspondingly, agency service Real time communication can be carried out with Quota distribution server, periodic communication can also be carried out according to the specified period.In this way, based between process Request amount control is realized in communication, can be improved communication efficiency, to improve the control efficiency of request amount.It can based on this kind of mode More flexibly realize the control of request amount.
As shown in Figure 10, in one embodiment, a kind of request amount control device 1000 is provided, which includes: to obtain Modulus block 1002, distribution module 1004 and control module 1006, wherein
Module 1002 is obtained, for obtaining the request amount information of actual time window.
Distribution module 1004, for obtaining current request amount amount from Quota distribution server according to request amount information;When The request amount that preceding request amount amount is reported by Quota distribution server according to each service server in service server cluster Information is dynamically determined.
Control module 1006, for from obtaining current request amount amount to obtain next time request amount amount stop when Between in section, the request amount in each first time piece is controlled in current request amount amount.
In one embodiment, actual time window includes multiple second timeslices;Module 1002 is obtained, is also used to obtain Service request;According to the request time of service request determine service request belonging to the second timeslice, update determined by second The request sub- amount of timeslice;When meeting request amount information reporting trigger condition, when obtaining each second in actual time window Between piece request sub- amount;The request amount information of actual time window is measured according to request.
In one embodiment, module 1002 is obtained, is also used to determine service request according to the request time of service request The corresponding second timeslice mark of the second affiliated timeslice;Service request is determined according to the second timeslice mark and request time The corresponding destination request time;When the destination request time, timestamp corresponding with the second timeslice mark was consistent, when to second Between piece identify corresponding request son amount progress incremental update.
In one embodiment, module 1002 is obtained, is also used to when the destination request time is corresponding with the second timeslice mark Timestamp it is inconsistent when, the second timeslice identified into corresponding request son amount reset to request and measure initial statistical value;By It is the destination request time that two timeslices, which identify corresponding update of time stamp,.
In one embodiment, request amount information is corresponding with process identification (PID);Distribution module 1004 is also used to self-operating Process number and the corresponding request amount information reporting of each process identification (PID) to Quota distribution server;Receive Quota distribution server Current request amount amount corresponding to process identification (PID) feedback;Current request amount amount is by Quota distribution server according to business service The corresponding request amount information dynamic of the process number and each process identification (PID) that each service server in device cluster reports is true It is fixed.
In one embodiment, it is anti-corresponding to process identification (PID) to be also used to receive Quota distribution server for distribution module 1004 The process sum run in the current request amount amount and service server cluster of feedback;When receiving current request amount volume When reaching preset duration after degree, the request amount amount that Quota distribution server is fed back next time is not received, according to process sum The request amount amount for distributing to each process of self-operating is determined with request amount full amount to be allocated.
In one embodiment, control module 1006 are also used to detect service request;When detecting service request, obtain Take the request amount in current first time piece;When request amount is greater than or equal to current request amount amount, refuse to service request Response.
As shown in figure 11, in one embodiment, a kind of request amount control device 1100 is provided, which includes: to connect Receive module 1102, distribution module 1104 and feedback module 1106, in which:
Receiving module 1102, for receive each service server in service server cluster obtain and report it is current when Between window request amount information.
Distribution module 1104 is distributed to often for being dynamically determined according to request amount information and request amount full amount to be allocated The current request amount amount of a service server.
Feedback module 1106, for current request amount amount to be fed back to corresponding service server;Feedback is currently asked The amount of asking amount is used to indicate corresponding service server and is based on the amount of the making requests control of current request amount amount.
In one embodiment, actual time window includes multiple second timeslices;Each second timeslice and request Amount corresponds to;Distribution module 1104 is also used to choose asking according to forward the second timeslice of part of timing from request amount information Seek sub- amount;The first request total amount corresponding to corresponding service server is measured according to the request of selection;According to each business The corresponding first request total amount of server obtains the second request total amount corresponding to service server cluster;It is total according to the first request Amount, the second request total amount and request amount full amount to be allocated, are dynamically determined the current request for distributing to corresponding service server Measure amount.
In one embodiment, service server cluster is block chain network;Service server is in block chain network Block chain node server;Distribution module 1104 is also used to obtain the breath of notifying in history of each block chain node server;From Breath of notifying in history is screened in block chain network meets the target block chain node server for operating normally decision condition;According to mesh The request amount information and request amount full amount to be allocated that mark block chain node server reports are dynamically determined and distribute to each mesh Mark the current request amount amount of block chain node server.
Figure 12 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure The service server in service server cluster 110 in 1, alternatively, Quota distribution server 120.As shown in figure 12, the calculating Machine equipment includes processor, memory and the network interface connected by system bus.Wherein, memory includes non-volatile deposits Storage media and built-in storage.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with calculating Machine program when the computer program is executed by processor, may make processor to realize request amount control method.In the built-in storage Computer program can also be stored, when which is executed by processor, processor may make to execute request amount controlling party Method.
It will be understood by those skilled in the art that structure shown in Figure 12, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, request amount control device provided by the present application can be implemented as a kind of shape of computer program Formula, computer program can be run in computer equipment as shown in figure 12.Composition can be stored in the memory of computer equipment Each program module of the request amount control device.For example, acquisition module 1002 shown in Fig. 10, distribution module 1004 and control Module 1006.It is each that the computer program that each program module is constituted makes processor execute the application described in this specification Step in the request amount control method of embodiment.Also for example, for example, receiving module 1102, distribution module shown in Figure 11 1104 and feedback module 1106.It is described in this specification that the computer program that each program module is constituted executes processor Step in the request amount control method of each embodiment of the application.
For example, computer equipment shown in Figure 12 can pass through the acquisition mould in request amount control device as shown in Figure 10 Block 1002 executes step S202.Computer equipment can execute step S204 by distribution module 1004.Computer equipment can pass through Control module 1006 executes step S206.
For example, computer equipment shown in Figure 12 can pass through the reception mould in request amount control device as shown in figure 11 Block 1102 executes step S602.Computer equipment can execute step S604 by distribution module 1104.Computer equipment can pass through Feedback module 1106 executes step S606.
In one embodiment, a kind of computer equipment, including memory and processor are provided, memory is stored with meter Calculation machine program, when computer program is executed by processor, so that the step of processor executes above-mentioned request amount control method.Herein The step of requesting amount control method can be the step in the request amount control method of above-mentioned each embodiment.
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer journey are stored with When sequence is executed by processor, so that the step of processor executes above-mentioned request amount control method.Amount control method is requested herein Step can be the step in the request amount control method of above-mentioned each embodiment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Instruct relevant hardware to complete by computer program, program can be stored in a non-volatile computer storage can be read In medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein each To any reference of memory, storage, database or other media used in embodiment, may each comprise it is non-volatile and/ Or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
Above embodiments only express the several embodiments of the application, and the description thereof is more specific and detailed, but can not Therefore it is interpreted as the limitation to the application the scope of the patents.It should be pointed out that for those of ordinary skill in the art, Without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection model of the application It encloses.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (14)

1. a kind of request amount control method, applied to the service server in service server cluster, which comprises
When meeting request amount information reporting trigger condition, the request amount information of actual time window is obtained;The request amount letter Breath includes the request sub- amount of multiple second timeslices in the actual time window;
Current request amount amount is obtained from Quota distribution server according to the request amount information;The current request amount amount root Component requests amount dynamic in the request amount information reported according to each service server in the service server cluster is true It is fixed;The component requests amount is the request sub- amount in respective request amount information according to forward the second timeslice of part of timing;
From obtaining the current request amount amount to obtain next time request amount amount stop period in, by each first Request amount in timeslice controls in the current request amount amount.
2. the method according to claim 1, wherein described when meeting request amount information reporting trigger condition, Before the request amount information for obtaining actual time window, the method also includes:
Obtain service request;
According to the request time of the service request determine the service request belonging to the second timeslice, update determined by institute State the request sub- amount of the second timeslice.
3. according to the method described in claim 2, it is characterized in that, the request time according to the service request determines institute The second timeslice belonging to service request is stated, the request sub- amount of identified second timeslice is updated, comprising:
According to the request time of the service request determine the service request belonging to the second timeslice corresponding second time Piece mark;
The service request corresponding destination request time is determined with the request time according to second timeslice mark;
When the destination request time, timestamp corresponding with the second timeslice mark was consistent, to second timeslice It identifies corresponding request amount and carries out incremental update.
4. according to the method described in claim 3, it is characterized in that, the request time according to the service request determines institute The second timeslice belonging to service request is stated, the request sub- amount of identified second timeslice is updated, further includes:
When the destination request time, timestamp corresponding with the second timeslice mark was inconsistent, by second time Piece identifies corresponding request amount and resets to request son amount initial statistical value;
It is the destination request time that second timeslice, which is identified corresponding update of time stamp,.
5. the method according to claim 1, wherein the request amount information is corresponding with process identification (PID);Described Current request amount amount is obtained from Quota distribution server according to the request amount information, comprising:
By the process number of self-operating and the corresponding request amount information reporting of each process identification (PID) to Quota distribution server;
Receive the current request amount amount that the Quota distribution server corresponds to process identification (PID) feedback;The current request The process that amount amount is reported by the Quota distribution server according to each service server in the service server cluster Component requests amount in number and the corresponding request amount information of each process identification (PID) is dynamically determined;The component requests amount For in respective request amount information according to the request sub- amount of forward the second timeslice of part of timing.
6. according to the method described in claim 5, it is characterized in that, described receive the Quota distribution server corresponding to described The current request amount amount of process identification (PID) feedback, comprising:
Receive current request amount amount and the business that the Quota distribution server corresponds to process identification (PID) feedback The process sum run in server cluster;
When reaching preset duration after receiving the current request amount amount, do not receive under the Quota distribution server The request amount amount once fed back distributes to self-operating according to the process sum and request amount full amount determination to be allocated Each process request amount amount.
7. method according to any one of claims 1 to 6, which is characterized in that described by asking in each first time piece The amount of asking controls in the current request amount amount, includes:
Detect service request;
When detecting the service request, the request amount in current first time piece is obtained;
When the request amount is greater than or equal to the current request amount amount, refuse the response to the service request.
8. a kind of request amount control method, which comprises
Each service server in service server cluster is received, when meeting request amount information reporting trigger condition, is obtained simultaneously The request amount information of the actual time window reported;The request amount information includes multiple second in the actual time window The request sub- amount of timeslice;
It according to the request amount of forward the second timeslice of part of timing and to be allocated is asked according in the request amount information The amount of asking full amount is dynamically determined the current request amount amount for distributing to each service server;
The current request amount amount is fed back into corresponding service server;The current request amount amount of feedback is for referring to Show that corresponding service server is based on the current request amount amount amount of the making requests control.
9. according to the method described in claim 8, it is characterized in that, described according to forward according to timing in the request amount information The second timeslice of part request amount and request amount full amount to be allocated be dynamically determined and distribute to each business The current request amount amount of server, comprising:
According to according to the request sub- amount of forward the second timeslice of part of timing, obtaining corresponding service clothes in the request amount information First request total amount corresponding to business device;
The is obtained corresponding to the service server cluster according to the corresponding first request total amount of each service server Two request total amounts;
According to the first request total amount, the second request total amount and the request amount full amount to be allocated, it is dynamically determined Distribute to the current request amount amount of corresponding service server.
10. according to the method described in claim 8, it is characterized in that, the service server cluster is block chain network;It is described Service server is the block chain node server in the block chain network;It is described according in the request amount information according to when The request amount of forward the second timeslice of part of sequence and request amount full amount to be allocated be dynamically determined distribute to it is described every The current request amount amount of a service server, comprising:
Obtain the breath of notifying in history of each block chain node server;
Breath of notifying in history is screened from the block chain network meets the target block chain node clothes for operating normally decision condition Business device;
According to the second time of part that timing is forward in the request amount information reported according to the target block chain node server The request amount of piece and request amount full amount to be allocated, which are dynamically determined, distributes to each target block chain node server Current request amount amount.
11. a kind of request amount control device, which is characterized in that described device includes:
Module is obtained, for obtaining the request amount information of actual time window when meeting request amount information reporting trigger condition; The request amount information includes the request sub- amount of multiple second timeslices in the actual time window;
Distribution module, for obtaining current request amount amount from Quota distribution server according to the request amount information;It is described to work as The part in request amount information that preceding request amount amount is reported according to each service server in the service server cluster Request son amount is dynamically determined;The component requests amount is the second time of part forward according to timing in respective request amount information The request sub- amount of piece;
Control module, for from obtaining the current request amount amount to obtain next time request amount amount stop period It is interior, the request amount in each first time piece is controlled in the current request amount amount.
12. a kind of request amount control device, which is characterized in that described device includes:
Receiving module is meeting the triggering of request amount information reporting for receiving each service server in service server cluster When condition, the request amount information of actual time window that obtains and report;The request amount information includes the current time window The request sub- amount of multiple second timeslices in mouthful;
Distribution module, for according in the request amount information according to the request sub- amount of forward the second timeslice of part of timing, And request amount full amount to be allocated is dynamically determined the current request amount amount for distributing to each service server;
Feedback module, for the current request amount amount to be fed back to corresponding service server;The described of feedback is currently asked The amount of asking amount is used to indicate corresponding service server and is based on the current request amount amount amount of the making requests control.
13. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor is executed such as the step of any one of claims 1 to 10 the method.
14. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating When machine program is executed by the processor, so that the processor is executed such as any one of claims 1 to 10 the method Step.
CN201910934961.2A 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment Active CN110493362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910934961.2A CN110493362B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910934961.2A CN110493362B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment
CN201910778364.5A CN110460676B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201910778364.5A Division CN110460676B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN110493362A true CN110493362A (en) 2019-11-22
CN110493362B CN110493362B (en) 2022-04-29

Family

ID=68488503

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910934961.2A Active CN110493362B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment
CN201910778364.5A Active CN110460676B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910778364.5A Active CN110460676B (en) 2019-08-22 2019-08-22 Request quantity control method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (2) CN110493362B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113009906A (en) * 2021-03-04 2021-06-22 青岛弯弓信息技术有限公司 Big data prediction analysis method and system based on industrial Internet
CN113034882A (en) * 2020-12-23 2021-06-25 利尔达科技集团股份有限公司 Centralized meter reading method based on time slice competition reporting
WO2021256978A1 (en) * 2020-06-15 2021-12-23 Telefonaktiebolaget Lm Ericsson (Publ) Reconfiguration procedure in a wireless communication network

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685169B (en) * 2019-10-17 2023-06-23 腾讯科技(深圳)有限公司 Load control method, device, server and readable storage medium
CN111142799A (en) * 2019-12-26 2020-05-12 深圳市网心科技有限公司 Distributed storage method and device, network node and storage medium
CN111651339B (en) * 2020-06-04 2022-02-15 腾讯科技(深圳)有限公司 Request quantity control method and related device
CN111431813B (en) * 2020-06-09 2020-10-30 北京信安世纪科技股份有限公司 Access current limiting method, device and storage medium
CN112019445B (en) * 2020-07-31 2024-02-02 青岛海尔科技有限公司 Method and device for controlling flow of intelligent equipment and intelligent equipment
CN113411269B (en) * 2021-07-07 2022-05-17 杭州网易云音乐科技有限公司 Current limiting control method, current limiting control device, storage medium and electronic equipment
CN113596126B (en) * 2021-07-20 2023-02-17 中国联合网络通信集团有限公司 Service providing method, server, client and device
CN113590563A (en) * 2021-07-28 2021-11-02 深圳Tcl新技术有限公司 Data request method, system, storage medium and server
CN116074384B (en) * 2023-01-10 2024-01-30 安芯网盾(北京)科技有限公司 Method and system for controlling service request quantity

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000062502A2 (en) * 1999-04-12 2000-10-19 Rainfinity, Inc. Distributed server cluster for controlling network traffic
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
US20150281032A1 (en) * 2014-03-27 2015-10-01 International Business Machines Corporation Smart migration of overperforming operators of a streaming application to virtual machines in a cloud
CN106921584A (en) * 2017-03-31 2017-07-04 武汉绿色网络信息服务有限责任公司 A kind of distributed network flow control method
CN108259376A (en) * 2018-04-24 2018-07-06 北京奇艺世纪科技有限公司 The control method and relevant device of server cluster service traffics
CN108345594A (en) * 2017-01-22 2018-07-31 中国移动通信集团安徽有限公司 Control method, control device and the control system of database access request
CN109660400A (en) * 2018-12-24 2019-04-19 苏州思必驰信息科技有限公司 Flow control configuration method and system
CN109905333A (en) * 2017-12-11 2019-06-18 腾讯科技(深圳)有限公司 A kind of media information processing method, device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7996546B2 (en) * 2008-10-02 2011-08-09 Ray-V Technologies, Ltd. Dynamic allocation of a quota of consumer nodes connecting to a resource node of a peer-to-peer network
CN103744808B (en) * 2013-12-31 2017-12-26 百度在线网络技术(北京)有限公司 A kind of method and apparatus for being used to control I/O to ask
US10044879B1 (en) * 2016-05-16 2018-08-07 Amdocs Development Limited System, method, and computer program for monitoring and allocating a quota for a user session associated with a service corresponding to a communication service provider (CSP)
CN105897484A (en) * 2016-06-01 2016-08-24 努比亚技术有限公司 Traffic management device, server and method
CN108306830B (en) * 2017-01-11 2021-05-25 腾讯科技(深圳)有限公司 Method and device for dynamically adjusting overload threshold

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000062502A2 (en) * 1999-04-12 2000-10-19 Rainfinity, Inc. Distributed server cluster for controlling network traffic
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
US20150281032A1 (en) * 2014-03-27 2015-10-01 International Business Machines Corporation Smart migration of overperforming operators of a streaming application to virtual machines in a cloud
CN108345594A (en) * 2017-01-22 2018-07-31 中国移动通信集团安徽有限公司 Control method, control device and the control system of database access request
CN106921584A (en) * 2017-03-31 2017-07-04 武汉绿色网络信息服务有限责任公司 A kind of distributed network flow control method
CN109905333A (en) * 2017-12-11 2019-06-18 腾讯科技(深圳)有限公司 A kind of media information processing method, device and storage medium
CN108259376A (en) * 2018-04-24 2018-07-06 北京奇艺世纪科技有限公司 The control method and relevant device of server cluster service traffics
CN109660400A (en) * 2018-12-24 2019-04-19 苏州思必驰信息科技有限公司 Flow control configuration method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021256978A1 (en) * 2020-06-15 2021-12-23 Telefonaktiebolaget Lm Ericsson (Publ) Reconfiguration procedure in a wireless communication network
CN113034882A (en) * 2020-12-23 2021-06-25 利尔达科技集团股份有限公司 Centralized meter reading method based on time slice competition reporting
CN113034882B (en) * 2020-12-23 2022-02-22 利尔达科技集团股份有限公司 Centralized meter reading method based on time slice competition reporting
CN113009906A (en) * 2021-03-04 2021-06-22 青岛弯弓信息技术有限公司 Big data prediction analysis method and system based on industrial Internet

Also Published As

Publication number Publication date
CN110460676B (en) 2022-03-25
CN110493362B (en) 2022-04-29
CN110460676A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN110493362A (en) Request amount control method, device, storage medium and computer equipment
CN108965381A (en) Implementation of load balancing, device, computer equipment and medium based on Nginx
CN109787780B (en) Charging method based on API content and capability open function entity
EP1424809B1 (en) Decentralized SLS monitoring in a differentiated service environment
JP7108628B2 (en) Online charging mechanism while OCS is unresponsive
CN110572280B (en) Network monitoring method and system
CN111585824B (en) Resource distribution method, device and system and electronic equipment
SE0901532A1 (en) Method and apparatus for determining service performance.
Do et al. A new finite-source queueing model for mobile cellular networks applying spectrum renting
US9077735B2 (en) Method and related device for controlling service charging
CN105491612B (en) A kind of method and device of determining business cutting off rate
WO2011150688A1 (en) Charging method and system for prepaid service
US20230262170A1 (en) Using subscriber event data to control release operations related to communication session in communications network
CN112532486B (en) Network diagnosis method, electronic device, system and readable storage medium
EP3437258A1 (en) Dynamic distribution in an offline charging system
EP1472820B1 (en) System, method and terminal for measuring the quality of service in a telecommunications network
CN113110983B (en) Transaction system time delay processing method and device, computer equipment and storage medium
WO2022062778A1 (en) Service charging method, communication device and storage medium
KR100802092B1 (en) Method and system for billing based on the client-server
CN115695399A (en) Interface connection method, system, device and medium
CN112087336A (en) Deployment and management method and device of virtual IP service system and electronic equipment
KR20010064498A (en) Method for supervising cell in a mobile telecommunication system
CN116229600A (en) Attendance checking statistical control method and related equipment
Vassilakis et al. Call-level Multi-rate Loss Models for Elastic Traffic
CN115529566A (en) Charge control method, system, computer device and storage medium based on predefined Urr

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40014887

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant