CN105337891B - Flow control methods and device for distributed cache system - Google Patents
Flow control methods and device for distributed cache system Download PDFInfo
- Publication number
- CN105337891B CN105337891B CN201510731999.1A CN201510731999A CN105337891B CN 105337891 B CN105337891 B CN 105337891B CN 201510731999 A CN201510731999 A CN 201510731999A CN 105337891 B CN105337891 B CN 105337891B
- Authority
- CN
- China
- Prior art keywords
- delay
- cache system
- distributed cache
- ratio
- current
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses the flow control methods and device for distributed cache system.One specific implementation mode of the method includes:The total degree for the operation that record distributed cache system is completed within the unit interval, and obtain the number of delay operation in the operation, wherein, the operation is read operation or write operation of the distributed cache system performed by client request, and the delay operation is the operation that time delay is more than default delay threshold;Ratio is operated according to the number of the delay operation and the total degree computation delay of the operation;Compare the delay operation ratio and preset ratio threshold value;Determined whether to execute current-limiting operation to distributed cache system according to comparison result.This embodiment improves the accuracys that the current-limiting operation time is executed to distributed cache system.
Description
Technical field
This application involves fields of communication technology, and in particular to distributed caching technical field, it is more particularly, to distributed
The flow control methods and device of caching system.
Background technology
Caching (cache) has the characteristic that can promote instruction and data reading speed, therefore, in computer system from originally
Ground computer system is buffered in Distributed Calculation field and is widely used into the expansion process of distributed system,
This caching applied in Distributed Calculation is known as distributed caching.
It is transparent to reading and writing transparent routing when in order to realize failure in distributed caching storage service, it can be before cache layer
A layer proxy (proxy) server is arranged in face.After Traffic Anomaly goes up, need to limit flow, otherwise agency service
Device and the cache server of rear end will be unable to reply all requests within the scheduled time, as being gradually accumulated for request there is also
Avalanche effect.However, it is also desirable to further increase the accuracy that flow restriction operation in distributed cache system executes the time.
Invention content
The purpose of the application is to propose a kind of improved flow control methods and device for distributed cache system,
To solve the technical issues of background section above is mentioned.
In a first aspect, this application provides a kind of flow control methods for distributed cache system, the method packet
It includes:The total degree for the operation that record distributed cache system is completed within the unit interval, and obtain the behaviour that is delayed in the operation
The number of work, wherein the operation is read operation of the distributed cache system performed by client request or writes behaviour
Make, the delay operation is the operation that time delay is more than default delay threshold;According to the number of the delay operation and the operation
Total degree computation delay operate ratio;Compare the delay operation ratio and preset ratio threshold value;It is determined according to comparison result
Whether current-limiting operation is executed to distributed cache system.
In some embodiments, the time delay is each operation from request is received to the time for completing response.
In some embodiments, described to determine whether that executing current-limiting operation includes according to comparison result:When the delay is grasped
When making ratio more than the preset ratio threshold value, current-limiting operation is executed.
In some embodiments, the execution current-limiting operation includes:The token number of the distributed cache system is reduced
Preset value, wherein the token number is used to characterize the number that distributed cache system accommodates client request.
In some embodiments, the preset value is 1.
Second aspect, this application provides a kind of volume control device for distributed cache system, described device packets
It includes:Recording unit, is configured to the total degree for the operation that record distributed cache system is completed within the unit interval, and obtains
The number of delay operation in the operation, wherein the operation is that the distributed cache system is held according to client request
Capable read operation or write operation, the delay operation are the operations that time delay is more than default delay threshold;Computing unit is configured to
Ratio is operated according to the number of the delay operation and the total degree computation delay of the operation;Comparing unit is configured to compare
The delay operation ratio and preset ratio threshold value;Current limiting unit is configured to be determined whether to distribution according to comparison result
Formula caching system executes current-limiting operation.
In some embodiments, the time delay be each operation from request is received to the time for completing response.
In some embodiments, the current limiting unit is further configured to:Described in being more than when the delay operation ratio
When preset ratio threshold value, current-limiting operation is executed.
In some embodiments, the current limiting unit is further configured to:Described in being more than when the delay operation ratio
When preset ratio threshold value, the token number of the distributed cache system is reduced into preset value, wherein the token number is for characterizing
Distributed cache system accommodates the number of client request.
In some embodiments, the preset value is 1.
Flow control methods and device provided by the present application for distributed cache system, by postponing operation and total behaviour
Judge whether Traffic Anomaly as ratio and need to execute current-limiting operation, due to delay operation using operate time delay as judge according to
According to and operation time delay can more reflect that can the performance of distributed system meet the requirement of client, so as to accurately determine execute
The opportunity of current-limiting operation.
Description of the drawings
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow according to one embodiment of the flow control methods for distributed cache system of the application
Figure;
Fig. 3 is the flow according to another embodiment of the flow control methods for distributed cache system of the application
Figure;
Fig. 4 is shown according to the structure of one embodiment of the volume control device for distributed cache system of the application
It is intended to;
Fig. 5 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application
Figure.
Specific implementation mode
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, is illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the implementation that can apply the flow control methods or device for distributed cache system of the application
The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104,106, agency service
Device 105, cache server 107,108,109.Network 104,106 is respectively in terminal device 101,102,103 and agency's clothes
It is engaged in providing the medium of communication link between device 105 and between proxy server 105 and cache server 107,108,109.Net
Network 104,106 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted by network 104 with proxy server 105 with using terminal equipment 101,102,103, to receive
Or send message etc..Various telecommunication customer end applications, such as web browser can be installed on terminal device 101,102,103
Using, shopping class application, searching class application, instant messaging tools, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart mobile phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts
Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture
Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) it is player, on knee portable
Computer and desktop computer etc..
Proxy server 105 can be carried between terminal device 101,102,103 and cache server 107,108,109
For the server of indirect connection.It is asked for example, proxy server can receive the reading and writing data that terminal device 101,102,103 is sent
It asks and reading and writing data request is forwarded on corresponding cache server and after cache server completes corresponding request by place
Reason result feeds back to terminal device.
Cache server can be the memory node for handling read-write requests.Cache server is receiving proxy server turn
Corresponding read-write requests are executed after the read-write requests of hair and return to handling result to proxy server.
It should be noted that the flow control methods for distributed cache system that the embodiment of the present application is provided are general
It is executed by proxy server 105, correspondingly, the volume control device for distributed cache system is generally positioned at agency service
In device 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, one of the flow control methods for distributed cache system according to the application is shown
The flow 200 of embodiment.The flow control methods for distributed cache system, include the following steps:
Step 201, the total degree for the operation that record distributed cache system is completed within the unit interval, and obtain the behaviour
The number of delay operation in work.
In the present embodiment, it is used for electronic equipment (the example of the flow control methods operation of distributed cache system thereon
Proxy server 105 as shown in Figure 1) operation that distributed cache system is completed within the unit interval can be recorded first
Total degree.Wherein, the unit interval can be set as needed.In order to ensure the real-time of record, usually select shorter
Time is as the unit interval.The operation can be read operation of the above-mentioned distributed cache system performed by client request or
Write operation.In general, all operations that electronic equipment can be executed are stored in the form of journal file.Electronic equipment can
With by obtaining all read operations or write operation of the distributed cache system performed by the unit interval to the inquiry of journal file
Information.Electronic equipment can carry out number statistics to the operation recorded in journal file, you can record the total degree of operation.This
Field technology personnel are it is contemplated that proxy server can also by other means unite to the number of read operation or write operation
Meter.
Secondly, electronic equipment can judge which operation belongs to delay operation according to the time delay operated every time, to obtain
Belong to the number of delay operation in aforesaid operations.The time delay of each operation, electronic equipment can be recorded in aforesaid operations daily record
Delay operation is regarded as in the operation that time delay can be more than to default delay threshold.Time delay can be used to indicate that one read operation of processing
Or the write operation required time, the time of request can be sent out by client and client is received to respective request
The time of response calculates, can also can be indicated by other distributed cache system to the response speed of client request when
Between characterize.Default delay threshold is the preset time, and electronic equipment can be according to distributed cache system processing operation
Whether the time of request is more than default time delay come whether judge an operation be delay operation.Optionally, the default delay threshold
Can be that the request that proxy server is sent in advance according to client (such as terminal device shown in FIG. 1 101,102,103) is pre-
First it is arranged.It is the request setting according to client due to presetting delay threshold, it is this that standard is set as with client
Judge delay operation, can adapt to the specific requirements of different clients.The time delay operated every time can be recorded in by electronic equipment
In journal file, when electronic equipment needs to judge which operation belongs to delay operation, the behaviour can be obtained from journal file
The time delay of work compares the time delay and default delay threshold, and the operation to which time delay to be more than to default delay threshold is judged to prolonging
When operate;Just time delay and default delay threshold can also be compared when recording the information operated every time by journal file
Compared with being delay operation by the operation note that time delay is more than default delay threshold, and delay operation is recorded in day with certain mark
In will file, when electronic equipment needs to record the number of delay operation, statistics has above-mentioned mark directly in journal file
Operation can obtain the number of delay operation.
In some optional realization methods of the present embodiment, above-mentioned time delay is that each operation is answered from request is received to completion
The time answered.That is, electronic equipment can be in the request for receiving client and at the place for sending the corresponding request to client
A time is respectively recorded when managing result, using the difference of time twice as above-mentioned time delay.
Step 202, ratio is operated according to the number of delay operation and the total degree computation delay of operation.
In the present embodiment, the total degree of number and operation based on the delay operation obtained in step 201, above-mentioned electronics
Equipment (such as proxy server shown in FIG. 1) can using the ratio between the number of delay operation and the total degree of operation as
Delay operation ratio.Art technology is it is contemplated that delay operation ratio can also be by other methods to the secondary of delay operation
Both numerical value are calculated to obtain delay operation ratio number with the total degree of operation.In distributed cache system processing operation
When request, it may be to be difficult to avoid that delay operation occur.When delay operation number is more, it is believed that distributed caching system
The ability of system processing read-write requests has been difficult to meet current all read-write requests.When judging whether delay operation is more,
It is more accurate to be judged by this relative data of delay operation ratio.
Step 203, compare delay operation ratio and preset ratio threshold value.
In the present embodiment, electronic equipment, can be by delay operation when getting delay operation ratio by step 202
Ratio is compared with preset ratio threshold value.Preset ratio threshold value is for judging that current delay operates the whether excessively high mark of ratio
Standard, the preset ratio threshold value can be pre-set in the electronic device.Optionally, which can be agency service
Device is pre-set according to the request that client is sent in advance.Since preset ratio threshold value is arranged according to the request of client
, therefore the criterion of delay operation can fully meet the needs of client.
Step 204, determined whether to execute current-limiting operation to distributed cache system according to comparison result.
In the present embodiment, electronic equipment gets the comparison of delay operation ratio and preset ratio threshold value according to step 203
As a result after, electronic equipment can determine whether to carry out current-limiting operation according to the comparison result in step 204.That is, electronic equipment exists
When judging whether to current-limiting operation, using the comparison result as basis for estimation.Wherein, current-limiting operation is to limit distributed delay
Deposit system can currently handle the quantity of read request or write request.
In some optional realization methods of the present embodiment, determined whether to distributed cache system according to comparison result
Executing current-limiting operation can be operated in the following way:When delay operation ratio is more than preset ratio threshold value, limit is executed
Stream operation.When delay operation ratio is more than preset ratio threshold value, it is meant that the ratio has exceeded preset standard, indicates whole
The response speed of a distributed cache system can no longer meet the demand that client reads data, and abnormal increase occurs in present flow rate
Greatly.At this point, electronic equipment can execute current-limiting operation, avalanche effect is caused to prevent the continuous accumulation of delay operation number.
The method that above-described embodiment of the application provides is reaching certain proportion threshold value to delay operation with total operation ratio
When judge whether flow goes up and need to execute current-limiting operation extremely, since delay operation is to operate time delay as basis for estimation,
And it is that can more reflect the index of distributed cache system response speed to operate time delay, so that executing the opportunity of current-limiting operation more
It is accurate.
With further reference to Fig. 3, it illustrates another embodiments of the flow control methods for distributed cache system
Flow 300.This is used for the flow 300 of the flow control methods of distributed cache system, includes the following steps:
Step 301, the total degree for the operation that record distributed cache system is completed within the unit interval, and obtain the behaviour
The number of delay operation in work.
In the present embodiment, step 301 is almost the same with step 201, and which is not described herein again.
Step 302, ratio is operated according to the number of delay operation and the total degree computation delay of operation.
In the present embodiment, step 302 is almost the same with step 202, and which is not described herein again.
Step 303, compare delay operation ratio and preset ratio threshold value.
In the present embodiment, step 303 is almost the same with step 203, and which is not described herein again.
Step 304, when delay operation ratio is more than preset ratio threshold value, the token number of distributed cache system is reduced
Preset value.
In the present embodiment, electronic equipment can be by reducing preset value to execute by the token number of distributed cache system
Current-limiting operation.
In the present embodiment, the reading that electronic equipment can be sent by the opposite distributed cache system of token (token) is asked
It asks or write request accesses control.Correspondingly, the number of token can accommodate the number of request in characterization system.When connecing
When receiving the read request or write request of client transmission, electronic equipment can detect the number of token first, if number is more than
1, then electronic equipment receive the request, distributed cache system can handle corresponding request, and receive the same of the request
When the number of token subtracted one;When the number of token is less than 1, then refuse the request.When completing a request, electronic equipment
The number of token can be added the response being completed at the same time together to client request.
In the above manner, the number of token can be corresponding with the number of request that distributed cache system can also currently accommodate.
When executing current-limiting operation, the number of token can be subtracted default value by electronic equipment, you can to reduce distributed caching system
System is currently able to the number of request accommodated to achieve the purpose that limit flow.Optionally, above-mentioned preset value could be provided as 1.That is, every
It is secondary the number of token to be subtracted 1 when executing current-limiting operation.
From figure 3, it can be seen that compared with the corresponding embodiments of Fig. 2, distributed cache system is used in the present embodiment
Flow control methods flow 300 further describe execute current-limiting operation the step of.The scheme of the present embodiment description as a result,
Can be by reducing the open ended number of request of distributed system to the adjustment of token number, this current-limiting operation mechanism can be more effective
Ground executes current-limiting operation, to further avoid that " avalanche effect " occurs.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides one kind for distribution
One embodiment of the volume control device of caching system, the device embodiment is corresponding with embodiment of the method shown in Fig. 2, should
Device specifically can be applied in various electronic equipments.
As shown in figure 4, the volume control device 400 for distributed cache system described in the present embodiment includes:Record
Unit 401, computing unit 402, comparing unit 403 and current limiting unit 404.Wherein, recording unit 401 is configured to record distribution
The total degree for the operation that formula caching system is completed within the unit interval, and obtain the number of delay operation in the operation, wherein
The operation is read operation or write operation of the distributed cache system performed by client request, and delay operation is that time delay is more than
The operation of default delay threshold;Resolution unit 402 is configured to the number according to above-mentioned delay operation and the total degree meter of operation
Calculate delay operation ratio;Comparing unit 403 is configured to compare delay operation ratio and preset ratio threshold value;And current limiting unit
404 are configured to be determined whether to execute current-limiting operation to distributed cache system according to comparison result.
In the present embodiment, the recording unit 401 of above-mentioned volume control device 400 can record distributed caching system first
The total degree for the operation that system is completed within the unit interval, and judge which operation belongs to delay behaviour according to the time delay operated every time
Make, to obtain the number for belonging to delay operation in aforesaid operations.Wherein, the unit interval can be set as needed.It should
Operation is read operation or write operation of the distributed cache system performed by client request.Recording unit 401 can be from generation
Manage all read operations or write operation for obtaining that distributed system is executed in the unit interval in the operation log of server.Recording unit
The operation recorded in 401 pairs of operation logs carries out number statistics, you can records the total degree of operation.
In the present embodiment, the number of the delay operation obtained based on recording unit 401 and the total degree of operation, above-mentioned meter
Ratio can be operated according to the two computation delay by calculating unit 402, can will be between the number of delay operation and the total degree of operation
Ratio as delay operation ratio.
In the present embodiment, volume control device 400 can prestore preset ratio threshold value, which can
Being received from client.The above-mentioned comparing unit 403 of volume control device 400 can be by above-mentioned delay operation as a result,
Ratio is compared with the preset ratio threshold value, to obtain comparison result.
In the present embodiment, above-mentioned current limiting unit 404 can be determined whether according to the comparison result of comparing unit 403 to dividing
Cloth caching system executes current-limiting operation.That is, current limiting unit 403 is obtained after judging whether to current-limiting operation with comparing unit
The comparison result obtained is as basis for estimation.
It will be understood by those skilled in the art that the above-mentioned volume control device 400 for distributed cache system further includes
Some other known features, such as processor, memory etc., in order to unnecessarily obscure embodiment of the disclosure, known in these
Structure be not shown in Fig. 4.
Below with reference to Fig. 5, it illustrates the calculating suitable for terminal device or server for realizing the embodiment of the present application
The structural schematic diagram of machine system 500.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in
Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and
Execute various actions appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data.
CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always
Line 504.
It is connected to I/O interfaces 505 with lower component:Importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section 508 including hard disk etc.;
And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because
The network of spy's net executes communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 510, as needed in order to be read from thereon
Computer program be mounted into storage section 508 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readable
Computer program on medium, the computer program include the program code for method shown in execution flow chart.At this
In the embodiment of sample, which can be downloaded and installed by communications portion 509 from network, and/or from removable
Medium 511 is unloaded to be mounted.
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part for a part for one module, program segment, or code of table, the module, program segment, or code includes one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be arranged in the processor, for example, can be described as:A kind of processor packet
Include recording unit, computing unit, comparing unit and current limiting unit.Wherein, the title of these units not structure under certain conditions
The restriction of the pairs of unit itself, for example, computing unit be also described as " according to the number of the delay operation with it is described
The unit of the total degree computation delay operation ratio of operation ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;Can also be
Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited
One or more program is contained, when one or more of programs are executed by an equipment so that the equipment:Record
The total degree for the operation that distributed cache system is completed within the unit interval, and obtain time of delay operation in the operation
Number, wherein the operation is read operation or write operation of the distributed cache system performed by client request, described
Delay operation is the operation that time delay is more than default delay threshold;According to the total degree of the number of the delay operation and the operation
Computation delay operates ratio;Compare the delay operation ratio and preset ratio threshold value;Determined whether to dividing according to comparison result
Cloth caching system executes current-limiting operation.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of arbitrary combination and formation.Such as features described above has similar work(with (but not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (10)
1. a kind of flow control methods for distributed cache system, which is characterized in that the method includes:
The total degree for the operation that record distributed cache system is completed within the unit interval, and obtain the behaviour that is delayed in the operation
The number of work, wherein the operation is read operation of the distributed cache system performed by client request or writes behaviour
Make, the delay operation is the operation that time delay is more than default delay threshold;
Ratio is operated according to the number of the delay operation and the total degree computation delay of the operation;
Compare the delay operation ratio and preset ratio threshold value;
Determined whether to execute current-limiting operation to distributed cache system according to comparison result.
2. according to the method described in claim 1, it is characterized in that, the time delay is that operation asks to completion to answer from reception every time
The time answered.
3. according to the method described in claim 1, it is characterized in that, described determine whether to execute current-limiting operation according to comparison result
Including:
When the delay operation ratio is more than the preset ratio threshold value, current-limiting operation is executed.
4. according to the method described in claim 3, it is characterized in that, the execution current-limiting operation includes:It will be described distributed slow
The token number of deposit system reduces preset value, wherein the token number accommodates client request for characterizing distributed cache system
Number.
5. according to the method described in claim 4, it is characterized in that, the preset value is 1.
6. a kind of volume control device for distributed cache system, which is characterized in that described device includes:
Recording unit, is configured to the total degree for the operation that record distributed cache system is completed within the unit interval, and obtains
Take the number of delay operation in the operation, wherein the operation is the distributed cache system according to client request institute
The read operation of execution or write operation, the delay operation are the operations that time delay is more than default delay threshold;
Computing unit is configured to operate ratio according to the number of the delay operation and the total degree computation delay of the operation
Example;
Comparing unit is configured to delay operation ratio described in comparison and preset ratio threshold value;
Current limiting unit is configured to be determined whether to execute current-limiting operation to distributed cache system according to comparison result.
7. device according to claim 6, which is characterized in that the time delay is that each operation is answered from request is received to completion
The time answered.
8. device according to claim 6, which is characterized in that the current limiting unit is further configured to:Prolong when described
When operation ratio be more than the preset ratio threshold value when, execute current-limiting operation.
9. device according to claim 8, which is characterized in that the current limiting unit is further configured to:Prolong when described
When operation ratio when being more than the preset ratio threshold value, the token number of the distributed cache system is reduced into preset value, wherein
The token number is used to characterize the number that distributed cache system accommodates client request.
10. device according to claim 9, which is characterized in that the preset value is 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510731999.1A CN105337891B (en) | 2015-11-02 | 2015-11-02 | Flow control methods and device for distributed cache system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510731999.1A CN105337891B (en) | 2015-11-02 | 2015-11-02 | Flow control methods and device for distributed cache system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105337891A CN105337891A (en) | 2016-02-17 |
CN105337891B true CN105337891B (en) | 2018-08-17 |
Family
ID=55288191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510731999.1A Active CN105337891B (en) | 2015-11-02 | 2015-11-02 | Flow control methods and device for distributed cache system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105337891B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106533798B (en) * | 2016-12-15 | 2019-09-20 | 北京小米移动软件有限公司 | Detection method and device |
CN110022268B (en) * | 2018-01-09 | 2022-05-03 | 腾讯科技(深圳)有限公司 | Data transmission control method, device and storage medium |
CN108667744B (en) * | 2018-02-26 | 2020-09-25 | 华为技术有限公司 | Flow control method and device |
CN110557341A (en) * | 2018-05-31 | 2019-12-10 | 北京京东尚科信息技术有限公司 | Method and device for limiting data current |
CN109413212B (en) * | 2018-12-19 | 2021-09-17 | 北京百度网讯科技有限公司 | Method and apparatus for processing requests |
CN110955681B (en) * | 2019-10-14 | 2021-09-03 | 京东数字科技控股有限公司 | Information processing method and device, electronic equipment and storage medium |
CN113765818A (en) * | 2020-06-28 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Distributed current limiting method, device, equipment, storage medium and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101630280A (en) * | 2009-08-13 | 2010-01-20 | 中兴通讯股份有限公司 | Software anti-aging method and system thereof |
CN103795781A (en) * | 2013-12-10 | 2014-05-14 | 西安邮电大学 | Distributed cache model based on file prediction |
CN104715020A (en) * | 2015-02-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Cache data deleting method and server |
CN104980472A (en) * | 2014-04-10 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Network traffic control method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7171482B2 (en) * | 2002-07-12 | 2007-01-30 | Ianywhere Solutions, Inc. | System and method for managing bandwidth utilization |
US9251032B2 (en) * | 2011-11-03 | 2016-02-02 | Fujitsu Limited | Method, computer program, and information processing apparatus for analyzing performance of computer system |
-
2015
- 2015-11-02 CN CN201510731999.1A patent/CN105337891B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101630280A (en) * | 2009-08-13 | 2010-01-20 | 中兴通讯股份有限公司 | Software anti-aging method and system thereof |
CN103795781A (en) * | 2013-12-10 | 2014-05-14 | 西安邮电大学 | Distributed cache model based on file prediction |
CN104980472A (en) * | 2014-04-10 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Network traffic control method and device |
CN104715020A (en) * | 2015-02-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Cache data deleting method and server |
Also Published As
Publication number | Publication date |
---|---|
CN105337891A (en) | 2016-02-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105337891B (en) | Flow control methods and device for distributed cache system | |
CN109684358B (en) | Data query method and device | |
US11394625B2 (en) | Service level agreement based storage access | |
CN105281981B (en) | The data traffic monitoring method and device of network service | |
US8868727B2 (en) | Methods and computer program products for storing generated network application performance data | |
CN106843755B (en) | Data balancing method and device for server cluster | |
CN106302445B (en) | Method and apparatus for handling request | |
JP2020173778A (en) | Method, apparatus, electronic facility, computer readable medium, and computer program for allocating resource | |
CN105338078B (en) | Date storage method and device for storage system | |
CN105205174B (en) | Document handling method and device for distributed system | |
CN113010818B (en) | Access current limiting method, device, electronic equipment and storage medium | |
CN109299348A (en) | A kind of data query method, apparatus, electronic equipment and storage medium | |
CN101557427A (en) | Method for providing diffluent information and realizing the diffluence of clients, system and server thereof | |
CN109871388A (en) | Data cache method, device, whole electronic equipment and storage medium | |
CN106101256B (en) | Method and apparatus for synchrodata | |
CN109005056A (en) | Storage capacity evaluation method and apparatus based on CDN application | |
CN109783158A (en) | Using starting task processing method and device | |
CN106817388B (en) | Method and device for acquiring data by virtual machine and host machine and system for accessing data | |
CN109447635A (en) | Information storage means and device for block chain | |
CN106851343A (en) | For the method and apparatus of net cast | |
US11750711B1 (en) | Systems and methods for adaptively rate limiting client service requests at a blockchain service provider platform | |
JP2019164705A (en) | Information processing device | |
CN109413694B (en) | Small cell caching method and device based on content popularity prediction | |
CN109828980A (en) | Data cache method, device, terminal and storage medium | |
CN111192070B (en) | Storage service metering method and system, computer system and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |