CN106713171B - Server, and current-limiting protection system and method based on delay queues - Google Patents

Server, and current-limiting protection system and method based on delay queues Download PDF

Info

Publication number
CN106713171B
CN106713171B CN201510451329.4A CN201510451329A CN106713171B CN 106713171 B CN106713171 B CN 106713171B CN 201510451329 A CN201510451329 A CN 201510451329A CN 106713171 B CN106713171 B CN 106713171B
Authority
CN
China
Prior art keywords
delay queue
requests
server
request
queue
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
Application number
CN201510451329.4A
Other languages
Chinese (zh)
Other versions
CN106713171A (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 CN201510451329.4A priority Critical patent/CN106713171B/en
Publication of CN106713171A publication Critical patent/CN106713171A/en
Application granted granted Critical
Publication of CN106713171B publication Critical patent/CN106713171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a current-limiting protection method based on a delay queue, which comprises the steps of collecting and analyzing performance parameters of a server, thereby obtaining a threshold value of the number of requests in the queue and the occupation time of the requests; judging whether the number of the requests in the queue exceeds a threshold value; if the number of the requests in the delay queue does not exceed the threshold value, adding the requests into the delay queue, and leaving the requests from the delay queue when the requests meet the occupation time; and if the request quantity of the delay queue exceeds a threshold value, sending busy information to the user terminal. The invention also provides a server and a current-limiting protection system based on the delay queue. The server, the current-limiting protection system based on the delay queue and the method can meet the condition that the user requests are randomly distributed and the server has excessive processing capacity.

Description

Server, and current-limiting protection system and method based on delay queues
Technical Field
The invention relates to the technical field of computer communication, in particular to a server, a current-limiting protection system based on a delay queue and a method.
Background
Currently, for high concurrent requests, a server usually sets a First-in-First-out (FIFO) queue for overload protection.
Semaphore control may be performed to limit the amount of concurrent request processing, where requests that get a token are allowed to the server to be processed, and requests that do not get a token are treated as overloaded and return busy information. Furthermore, the current limiting protection can be further carried out by controlling the passing request quantity in a fixed time interval through a counter and time.
However, the conventional queue protection strategy can only address the situation that the processing capacity of the server is insufficient, and cannot satisfy the situation that the processing capacity of the server is excessive and is limited by network card flow resources, for example, and when the flow limit protection is performed by controlling the passing request amount in a fixed time interval through a counter and time, the time interval is fixed, and the situation that the user requests are randomly distributed cannot be satisfied.
Disclosure of Invention
In view of this, the present invention provides a delay queue-based current-limiting protection method that can satisfy the situation of random distribution of user requests and the situation of excess processing capacity of a server.
The embodiment of the invention provides a current-limiting protection method based on a delay queue, which comprises the steps of collecting and analyzing performance parameters of a server, thereby obtaining a threshold value of the number of requests in the delay queue and the occupation time of the requests; receiving a request sent by a user terminal; judging whether the number of the requests in the delay queue exceeds a threshold value; if the number of the requests in the delay queue does not exceed a threshold value, adding the requests into the delay queue, and leaving the requests out of the delay queue when the requests meet the occupation time; and if the request quantity of the delay queue exceeds a threshold value, sending busy information to the user terminal.
The embodiment of the invention also provides a server, which comprises an acquisition module and a flow control module. The acquisition module is used for collecting and analyzing the performance parameters of the server so as to acquire the threshold value of the number of the requests in the delay queue and the occupation time of the requests; the flow control module is used for receiving a request sent by a user terminal, adding the request into the delay queue when the number of the requests in the delay queue does not exceed a threshold value, and leaving the request from the delay queue when the requests in the delay queue meet the occupation time.
The embodiment of the invention also provides a current-limiting protection system based on the delay queue, which comprises a user terminal and a server; the user terminal is used for sending a request to the server; the server is used for collecting and analyzing performance parameters of the server, so as to obtain a threshold value of the number of requests in a delay queue and the occupation time of the requests, adding the requests into the delay queue when the number of the requests in the delay queue does not exceed the threshold value, and leaving the requests from the delay queue when the requests in the delay queue meet the occupation time.
The server, the current-limiting protection system based on the delay queue and the method can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, correspondingly reduces the number of the requests in the delay queue when the requests in the delay queue meet the occupation time, and can meet the condition of excess processing capacity of the server.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is a schematic structural diagram of a server according to a first embodiment of the present invention.
Fig. 2 shows a schematic structure of a delay queue.
Fig. 3 shows a block diagram of a user terminal.
Fig. 4 is a schematic structural diagram of a delay queue-based current-limiting protection system according to a second embodiment of the present invention.
Fig. 5 is a flowchart illustrating a current limiting protection method based on a delay queue according to a third embodiment of the present invention.
Fig. 6 is a schematic diagram of an application environment of the method for current limiting protection based on the delay queues shown in fig. 5.
Fig. 7 is a flowchart illustrating a current limiting protection method based on a delay queue according to a fourth embodiment of the present invention.
Fig. 8 is a flowchart illustrating a method for current limiting protection based on a delay queue according to a fifth embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, features and effects according to the present invention will be made with reference to the accompanying drawings and preferred embodiments.
First embodiment
Fig. 1 is a schematic structural diagram of a server according to a first embodiment of the present invention. As shown in fig. 1, the server 10 includes an acquisition module 100 and a flow control module 101.
The obtaining module 100 is configured to collect and analyze performance parameters of the server 10, so as to obtain a threshold of the number of requests in the delay queue and an occupation time of the requests.
Specifically, the performance parameters of the server 10 may include, but are not limited to, performance parameters corresponding to network card traffic and use cases of the input and output interfaces, respectively. Of course, those skilled in the art will understand that the performance parameters of the server 10 may also include, but are not limited to, the corresponding performance parameters of the central processor load condition, etc.
The traffic control module 101 is configured to receive a request sent by a user terminal, add the request to a delay queue when the number of requests in the delay queue does not exceed a threshold, and leave the request from the delay queue when the request in the delay queue meets the occupancy time.
Specifically, the user terminal may be, but is not limited to, a mobile phone, a tablet computer, and the like. The user terminal may communicate with various networks, such as the internet, an intranet, a wireless network, for example, sending a request to a server over the wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless networks described above may use various communication standards, protocols, and technologies.
The delay queue may be, but is not limited to, a delay queue with a priority of a timestamp, and it is understood by those skilled in the art that the delay queue may also be a queue with a priority of other types, such as a type of request.
Fig. 2 shows a schematic structure of a delay queue. The delay queue is a delay queue with a timestamp as a priority, that is, the head of the delay queue is a request with a smallest timestamp (the time of enqueuing at this moment), and the tail of the delay queue is a request with a largest timestamp. As shown in fig. 2, the delay queue includes 9 requests, and the time in the delay queue represents the remaining time for dequeuing the corresponding request, for example, if the threshold of the number of requests in the delay queue is 9 and the occupancy time of the request is 1 second(s), then only after 100 milliseconds (ms), it is possible to have the next request to join the delay queue, that is, when the delay queue is full (the number of requests reaches the threshold), the next request can join the delay queue only when there is a request to leave the delay queue. Furthermore, each request must satisfy 1s in the delay queue to leave the delay queue.
It is worth mentioning that each request must meet the floor time in the delay queue to leave the delay queue, but the time when the server actually responds to the request may be, but is not limited to, the time when the request leaves the delay queue before.
The server provided by the embodiment of the invention can respond to the requests of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user requests, correspondingly reduces the number of the requests in the delay queue when the requests in the delay queue meet the occupation time, and can meet the condition of excess processing capacity of the server.
Fig. 3 shows a block diagram of a user terminal. As shown in fig. 3, the user terminal includes a memory 202, a memory controller 204, one or more processors 206 (only one shown), a peripheral interface 208, a radio frequency module 210, a positioning module 212, a camera module 214, an audio module 216, a touch screen 218, and a key module 220. These components communicate with each other via one or more communication buses/signal lines.
It will be appreciated that the configuration shown in figure 3 is merely illustrative and that the user terminal may also include more or fewer components than shown in figure 3 or have a different configuration than shown in figure 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
The memory 202 may be used to store software programs and modules. The processor 202 executes various functional applications and data processing by executing software programs and modules stored in the memory 204.
The memory 202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 202 may further include memory located remotely from the processor 206, which may be connected to the user terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 202 by the processor 206, and possibly other components, may be under the control of the memory controller 204.
The peripheral interface 208 couples various input/output devices to the processor 206 as well as to the memory 202. The processor 206 executes various software, instructions within the memory 202 to perform various functions of the user terminal and to perform data processing.
In some embodiments, the peripheral interface 208, the processor 206, and the memory controller 204 may be implemented in a single chip. In other examples, the peripheral interface 208, the processor 206, and the memory controller 204 may each be implemented by separate chips.
The rf module 210 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The rf module 210 may include various existing circuit elements for performing these functions, such as an antenna, an rf transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The rf module 210 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), bluetooth, Wireless Fidelity (WiFi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE802.11 a, IEEE802.11 b, IEEE802.1 g, and/or IEEE802.11 n), Voice over internet protocol (VoIP), world wide mail Access (Wireless for Microwave, Mobile telecommunications), Wi-Max, and any other suitable protocols for instant messaging, and may even include those protocols that have not yet been developed.
The positioning module 212 is used for acquiring the current position of the user terminal. Examples of the positioning module 212 include, but are not limited to, a global positioning satellite system (GPS), a wireless local area network-based positioning technology, or a mobile communication network-based positioning technology.
The camera module 214 is used to take a picture or video. The pictures or videos taken may be stored in memory 202 and transmitted via radio frequency module 210.
The audio module 216 provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry. The audio module 216 receives audio data from the peripheral interface 208, converts the audio data into electrical information, and transmits the electrical information to the speaker. The speaker converts the electrical information into sound waves that the human ear can hear. The audio circuitry also receives electrical information from the microphone, converts the electrical information to voice data, and transmits the voice data to the peripheral interface 208 for further processing. The audio data may be retrieved from the memory 202 or through the radio frequency module 210. In addition, the audio data may also be stored in the memory 202 or transmitted through the radio frequency module 210. In some examples, the audio module 216 may also include a headphone jack for providing an audio interface to headphones or other devices.
The touch screen 218 provides both an output and an input interface between the user terminal and the user. The touch screen 218 is used to display video output to the user, the content of which may include text, graphics, video, and any combination thereof. The touch screen 218 is also used to receive user inputs, such as user clicks, swipes, and other gesture operations, so that the user interface objects respond to these user inputs. The technique of detecting user input may be based on resistive, capacitive, or any other possible touch detection technique. Specific examples of touch screen 218 display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.
The key module 220 also provides an interface for a user to input to the user terminal, and the user can press different keys to cause the user terminal to perform different functions.
Second embodiment
Fig. 4 is a schematic structural diagram of a delay queue-based current-limiting protection system according to a second embodiment of the present invention. As shown in fig. 4, the current limiting protection system based on the delay queue includes a server 30 and a user terminal 40.
Wherein the user terminal 40 is configured to send a request to the server 30.
Specifically, the user terminal 40 may be, but is not limited to, a mobile phone, a tablet computer, or the like. The user terminal 40 may communicate with various networks, such as the internet, an intranet, a wireless network, for example, sending a request to the server 30 over the wireless network. Wireless networks may use various communication standards, protocols, and technologies.
The server 30 is configured to collect and analyze performance parameters of the server 30, so as to obtain a threshold of the number of requests in the delay queue and the occupation time of the requests, add the received request sent by the user terminal 40 to the delay queue when the number of requests in the delay queue does not exceed the threshold, and leave the delay queue when the number of requests in the delay queue satisfies the occupation time.
Specifically, the performance parameters of the server 30 may include, but are not limited to, performance parameters corresponding to network card traffic and use cases of the input and output interfaces, respectively. Of course, those skilled in the art will understand that the performance parameters of the server 30 may also include, but are not limited to, the corresponding performance parameters of the central processor load condition, etc.
The delay queue may be, but is not limited to, a delay queue with a priority of a timestamp, and it is understood by those skilled in the art that the delay queue may also be a queue with a priority of other types, such as a type of request.
It is worth mentioning that each request must meet the floor time in the delay queue to leave the delay queue, but the time when the server actually responds to the request may be, but is not limited to, the time when the request leaves the delay queue before.
The current-limiting protection system based on the delay queue provided by the embodiment of the invention can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, correspondingly reduces the number of the requests in the delay queue when the requests in the delay queue meet the occupation time, and can meet the condition of excess processing capacity of a server.
Third embodiment
Fig. 5 is a flowchart illustrating a current limiting protection method based on a delay queue according to a third embodiment of the present invention. Fig. 6 is a schematic diagram of an application environment of the method for current limiting protection based on the delay queues shown in fig. 5.
Referring to fig. 5 and fig. 6, the method for current limiting protection based on the delay queue includes the following steps:
step S51: collecting and analyzing the performance parameters of the server 50, thereby obtaining the threshold value of the number of the requests in the delay queue and the occupation time of the requests;
specifically, the performance parameters of the server 50 may include, but are not limited to, performance parameters corresponding to network card traffic and use cases of the input and output interfaces, respectively. Of course, those skilled in the art will understand that the performance parameters of the server 50 may also include, but are not limited to, the corresponding performance parameters of the central processor load condition, etc.
The delay queue may be, but is not limited to, a delay queue with a priority of a timestamp, and it is understood by those skilled in the art that the delay queue may also be a queue with a priority of other types, such as a type of request.
Step S52: receiving a request sent by the user terminal 60;
specifically, the user terminal 60 may be, but is not limited to, a mobile phone, a tablet computer, or the like. The user terminal 60 may communicate with various networks, such as the internet, an intranet, a wireless network, for example, sending a request to the server 50 over the wireless network. Wireless networks may use various communication standards, protocols, and technologies.
Step S53: judging whether the number of the requests in the delay queue exceeds a threshold value or not;
if the number of requests in the delay queue does not exceed the threshold, step S54 is entered: adding the request into a delay queue, and leaving the request from the delay queue when the request meets the occupation time;
it is worth mentioning that each request must meet the floor time in the delay queue to leave the delay queue, but the time when the server actually responds to the request may be, but is not limited to, the time when the request leaves the delay queue before.
If the number of requests in the delay queue exceeds the threshold, the process proceeds to step S55: sending a busy message to the user terminal 60.
The current-limiting protection method based on the delay queue provided by the embodiment of the invention can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, correspondingly reduces the number of the requests in the delay queue when the requests in the delay queue meet the occupation time, and can meet the condition of excess processing capacity of a server.
Fourth embodiment
Fig. 7 is a flowchart illustrating a current limiting protection method based on a delay queue according to a fourth embodiment of the present invention. The current-limiting protection method based on the delay queue comprises the following steps:
step S71: collecting and analyzing performance parameters of a server, thereby obtaining a threshold value of the number of requests in a delay queue and the occupation time of the requests;
specifically, the performance parameters of the server may include, but are not limited to, performance parameters corresponding to network card traffic and use cases of the input and output interfaces, respectively. Of course, it can be understood by those skilled in the art that the performance parameters of the server may also include, but are not limited to, performance parameters corresponding to the load condition of the central processing unit, etc.
Specifically, the delay queue may be, but is not limited to, a delay queue with priority given by a timestamp, and it is understood by those skilled in the art that the delay queue may also be a queue with priority given by other types of requests, for example.
Step S72: receiving a request sent by a user terminal;
specifically, the user terminal may be, but is not limited to, a mobile phone, a tablet computer, and the like. The user terminal may send the request to the server through various networks, but is not limited to.
Step S73: judging whether the number of the requests in the delay queue exceeds a threshold value or not;
if the number of requests in the delay queue does not exceed the threshold, step S74 is entered: adding the request into a delay queue;
step S75: judging whether the requests in the delay queue meet the occupation time or not;
if the request in the delay queue satisfies the time-to-live, step S76 is entered: leaving the request out of the delay queue;
if the request in the delay queue does not satisfy the time-out, the process returns to step S75.
Specifically, whether the request meets the occupation time or not is judged in real time, if the time to be waited by the request in the delay queue meets the occupation time, the request is left from the delay queue, and if the time to be waited by the request in the delay queue does not meet the occupation time, the judgment is repeated until the time to be waited by the request meets the occupation time.
If the number of requests in the delay queue exceeds the threshold, the process proceeds to step S77: and sending busy information to the user terminal.
It is worth mentioning that each request must meet the floor time in the delay queue to leave the delay queue, but the time when the server actually responds to the request may be, but is not limited to, the time when the request leaves the delay queue before.
The current-limiting protection method based on the delay queue provided by the embodiment of the invention can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, can judge whether the requests in the delay queue meet the occupation time in real time, correspondingly reduces the number of the requests in the delay queue when the requests meet the occupation time, and can meet the condition of excess processing capacity of a server.
Fifth embodiment
Fig. 8 is a flowchart illustrating a method for current limiting protection based on a delay queue according to a fifth embodiment of the present invention.
The current-limiting protection method based on the delay queue comprises the following steps:
step S81: collecting and analyzing performance parameters of a server, thereby obtaining a threshold value of the number of requests in a delay queue and the occupation time of the requests;
specifically, the performance parameters of the server may include, but are not limited to, performance parameters corresponding to network card traffic and use cases of the input and output interfaces, respectively. Of course, it can be understood by those skilled in the art that the performance parameters of the server may also include, but are not limited to, performance parameters corresponding to the load condition of the central processing unit, etc.
Specifically, the delay queue may be, but is not limited to, a delay queue with priority given by a timestamp, and it is understood by those skilled in the art that the delay queue may also be a queue with priority given by other types of requests, for example.
Step S82: receiving a request sent by a user terminal;
specifically, the user terminal may be, but is not limited to, a mobile phone, a tablet computer, and the like. The user terminal may send the request to the server through various networks, but is not limited to.
Step S83: judging whether the number of the requests in the delay queue exceeds a threshold value or not;
if the number of requests in the delay queue does not exceed the threshold, step S84 is entered: adding the request into a delay queue;
step S85: acquiring a timestamp for requesting to join a delay queue;
specifically, the timestamp of the joining of the get request to the delay queue is the time when the get request joined the delay queue.
Step S86: after waiting for the occupation time, enabling the request to leave the delay queue;
specifically, for example, if the occupancy time is 1S, the request leaves the delay queue 1S after the request is added to the delay queue.
It is worth mentioning that each request must meet the floor time in the delay queue to leave the delay queue, but the time when the server actually responds to the request may be, but is not limited to, the time when the request leaves the delay queue before.
If the number of requests in the delay queue exceeds the threshold, the process proceeds to step S87: and if the busy information is sent to the user terminal.
The current-limiting protection method based on the delay queue provided by the embodiment of the invention can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, and after waiting for the occupation time, the request leaves the delay queue to compare with the situation that whether the requests in the delay queue meet the occupation time or not is judged in real time, and the system operation times are reduced under the condition that the processing capacity of a server is excessive.
The server, the current-limiting protection system based on the delay queue and the method can respond the request of the user terminal in real time according to the number of the requests in the delay queue, can meet the condition of random distribution of the user request, correspondingly reduces the number of the requests in the delay queue when the requests in the delay queue meet the occupation time, and can meet the condition of excess processing capacity of the server.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (11)

1. A current-limiting protection method based on a delay queue is characterized by comprising the following steps:
collecting and analyzing performance parameters of a server, so as to obtain a threshold value of the number of requests in the delay queue and the occupation time of the requests;
receiving a request sent by a user terminal;
judging whether the number of the requests in the delay queue exceeds a threshold value;
if the number of the requests in the delay queue does not exceed a threshold value, adding the requests into the delay queue, and leaving the requests out of the delay queue when the requests meet the occupation time; wherein the time for the server to respond to the request is prior to the time for the request to leave the delay queue; and
and if the request quantity of the delay queue exceeds a threshold value, sending busy information to the user terminal.
2. The method of claim 1, wherein the step of leaving the request from the delay queue when the request satisfies the time-occupancy comprises:
judging whether the request in the delay queue meets the occupation time or not;
if the request in the delay queue meets the occupation time, enabling the request to leave the delay queue; and
and if the request in the delay queue does not meet the occupation time, returning to the step of judging whether the request in the delay queue meets the occupation time or not.
3. The method of claim 1, wherein the step of leaving the request from the delay queue when the request satisfies the time-occupancy comprises:
acquiring a timestamp of the request for adding into the delay queue; and
and after waiting for the occupation time, enabling the request to leave the delay queue.
4. The delay-queue-based current-limiting protection method of claim 1, wherein the performance parameters of the server include performance parameters corresponding to network card traffic and use conditions of input and output interfaces, respectively.
5. The method of claim 1, wherein the delay queue is a time-stamped priority delay queue.
6. A server, characterized in that the server comprises:
the acquisition module is used for collecting and analyzing the performance parameters of the server so as to acquire the threshold value of the number of the requests in the delay queue and the occupation time of the requests; and
and the flow control module is used for receiving requests sent by a user terminal, and adding the requests into the delay queue when the number of the requests in the delay queue does not exceed a threshold value, wherein the time for the server to respond to the requests is prior to the time for the requests to leave the delay queue, and the requests leave the delay queue when the requests in the delay queue meet the occupation time.
7. The server according to claim 6, wherein the performance parameters of the server include performance parameters corresponding to network card traffic and the use of the input/output interface.
8. The server of claim 6, wherein the delay queue is a time stamp prioritized delay queue.
9. A current-limiting protection system based on a delay queue is characterized by comprising a user terminal and a server;
the user terminal is used for sending a request to the server;
the server is used for collecting and analyzing performance parameters of the server, so as to obtain a threshold value of the number of requests in the delay queue and the occupation time of the requests, and adding the requests into the delay queue when the number of the requests in the delay queue does not exceed the threshold value, wherein the time for the server to respond to the requests is prior to the time for the requests to leave the delay queue, and when the requests in the delay queue meet the occupation time, the requests leave the delay queue.
10. The delay-queue-based current-limiting protection system of claim 9, wherein the performance parameters of the server include performance parameters corresponding to network card traffic and usage of input/output interfaces, respectively.
11. The delay-queue-based current-limiting protection system of claim 9, wherein the delay queue is a time-stamped priority delay queue.
CN201510451329.4A 2015-07-28 2015-07-28 Server, and current-limiting protection system and method based on delay queues Active CN106713171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510451329.4A CN106713171B (en) 2015-07-28 2015-07-28 Server, and current-limiting protection system and method based on delay queues

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510451329.4A CN106713171B (en) 2015-07-28 2015-07-28 Server, and current-limiting protection system and method based on delay queues

Publications (2)

Publication Number Publication Date
CN106713171A CN106713171A (en) 2017-05-24
CN106713171B true CN106713171B (en) 2020-04-03

Family

ID=58900645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510451329.4A Active CN106713171B (en) 2015-07-28 2015-07-28 Server, and current-limiting protection system and method based on delay queues

Country Status (1)

Country Link
CN (1) CN106713171B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465743B (en) * 2017-08-03 2020-10-16 苏州浪潮智能科技有限公司 Method and device for processing request
CN110099009B (en) * 2018-01-31 2021-01-26 北京易真学思教育科技有限公司 Dynamic current limiting method based on interface response time trend and computer readable medium
CN110971561B (en) * 2018-09-28 2022-08-23 阿里巴巴集团控股有限公司 Access request processing method, device and equipment
CN113032410B (en) * 2019-12-25 2024-05-03 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and computer storage medium
CN111935782B (en) * 2020-06-29 2023-08-08 福建天泉教育科技有限公司 Optimization method of client retry mechanism and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159699A (en) * 2007-11-27 2008-04-09 杭州华三通信技术有限公司 Distributed equipment switch network bandwidth dynamic assignment method and apparatus
CN102932840A (en) * 2012-11-14 2013-02-13 浙江大学 Wireless router active queue management method based on rates and queue length
CN103248583A (en) * 2012-02-09 2013-08-14 迈普通信技术股份有限公司 FIFO (first-in first-out) message queue management method and device based on finite depth
CN104022965A (en) * 2014-05-20 2014-09-03 华为技术有限公司 Message dequeue scheduling method and equipment thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299764B (en) * 2008-06-19 2014-09-10 中兴通讯股份有限公司 Method for backupping broadband access server for PPPOE access service
CN102307133B (en) * 2011-03-25 2014-07-16 国云科技股份有限公司 Virtual machine scheduling method for public cloud platform
CN103107955B (en) * 2011-11-15 2016-04-27 中国移动通信集团公司 Packet Transport Network array dispatching method and device
CN104301066A (en) * 2013-07-19 2015-01-21 华为技术有限公司 Data packet transmission method and device
CN104767689B (en) * 2014-01-07 2018-11-09 腾讯科技(深圳)有限公司 Control method and server that network accesses access amount
CN104202261B (en) * 2014-08-27 2019-02-05 华为技术有限公司 A kind of service request processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159699A (en) * 2007-11-27 2008-04-09 杭州华三通信技术有限公司 Distributed equipment switch network bandwidth dynamic assignment method and apparatus
CN103248583A (en) * 2012-02-09 2013-08-14 迈普通信技术股份有限公司 FIFO (first-in first-out) message queue management method and device based on finite depth
CN102932840A (en) * 2012-11-14 2013-02-13 浙江大学 Wireless router active queue management method based on rates and queue length
CN104022965A (en) * 2014-05-20 2014-09-03 华为技术有限公司 Message dequeue scheduling method and equipment thereof

Also Published As

Publication number Publication date
CN106713171A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106713171B (en) Server, and current-limiting protection system and method based on delay queues
JP6596173B1 (en) Incoming call management method and apparatus
JP6526919B2 (en) Method, apparatus and mobile terminal for screen mirroring
CN106357364B (en) Data transmission method, device and system
CN104349340B (en) The surfing flow monitoring method and device of mobile terminal
CN109120683B (en) Data transmission method and related product
CN110730445A (en) Paging processing method, device, electronic equipment and storage medium
CN105657479B (en) Video processing method and device
CN106155458B (en) Multimedia message playing method and device
CN107360332B (en) Call state display method and device, mobile terminal and storage medium
CN106708240B (en) Power saving method, server and power saving system
CN107371221B (en) Select method, apparatus, mobile terminal and the readable storage medium storing program for executing of network
CN105468513B (en) Test method, device and system based on mobile terminal
CN107948055B (en) Method, apparatus and computer readable storage medium for masking messages sent by group members
US10908976B2 (en) Broadcast queue adjustment method, terminal, and storage medium
CN107608720A (en) Using the display methods of footmark, device, mobile terminal and storage medium
CN105704106B (en) A kind of visualization IVR implementation method and mobile terminal
CN104113620A (en) Contact list updating method, updating device and user terminal
CN106503023B (en) Method and device for prompting nearby friends
CN107211274A (en) A kind of equipment correlating method and relevant device
CN106470215B (en) User terminal, server, and message pushing system and method for scene not concerned
CN110856213B (en) Method and device for switching data transmission modes, storage medium and electronic equipment
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
CN107124353B (en) Message processing method and device, computer device and storage medium
CN110754097B (en) Call control method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant