Queue flow limiting method and storage medium

A current limiting method and queue technology, applied in digital transmission systems, electrical components, transmission systems, etc., can solve problems such as failure to reach limits, system performance impact, and inability to perform normal functions, so as to reduce risks and ensure availability.

Active Publication Date: 2020-02-25
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF7 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, the current limit for queues in some software is generally limited according to the length of the queue. For example, if the number of queues reaches 10,000, it will be limited. However, if the number of queues reaches 10,000, the CPU has reached 90% or the memory usage rate Reached 90%, since the condition of the restriction has not been met, the purpose of the restriction has not been achieved
But at this time, the resources are already full, and the system performance is seriously affected, which may lead to the inability to perform normal functions.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Queue flow limiting method and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0061] Please refer to figure 1 , Embodiment 1 of the present invention is:

[0062] Software that uses queues for processing, such as various message middleware such as tomcat and rabbitmq, will have the need to use queue functions to receive and process tasks. Wherein, when the queue message is full, that is, when the maximum number of queues that can be supported is reached, the request begins to be rejected. Generally, the maximum number of supported queues is configurable and written in the configuration file. In the existing situation, there is only this number of configurations. If at this time, multiple application instances have been deployed on one server and the server's resources are insufficient, but the task queue of a single application instance has not yet reached the configured maximum At this time, the task will continue to be connected to the queue, but even if the queue task is subsequently processed, the task will fail due to lack of resources. Therefor...

Embodiment 2

[0089] This embodiment further expands on the basis of the first embodiment, and provides a current limiting method in which resource current limiting and quantity current limiting coexist in combination with the quantity current limiting manner.

[0090] The method of this embodiment is based on the first embodiment, and increases the formulation of the quantity current limiting strategy;

[0091] The quantity-limiting strategy is that when the client receives the request, it judges the current queue quantity, if it reaches the configured maximum queue quantity threshold, then limits the flow, rejects the request, and if not, writes it into the queue.

[0092] Quantity rate limiting policy and classification rate limiting policy can be enabled at the same time or independently, which is more practical.

[0093] In this embodiment, the coexistence of resource current limit and quantity current limit can ensure the availability of the system to the greatest extent and reduce th...

Embodiment 3

[0095] This embodiment corresponds to Embodiment 1 or Embodiment 2, and provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the above-mentioned Embodiment 1 or Embodiment 2 can be implemented. The steps included in a queue current limiting method described in the item. The specific steps will not be repeated here, please refer to the description of Embodiment 1 or Embodiment 2 for details.

[0096]To sum up, the queue current limiting method and storage medium provided by the present invention can not only limit the current according to the real situation of resource occupation, and ensure good system performance; but also can perform targeted current limiting for different application types Judgment is more practical; further, it can also realize the current limit judgment of a single application, and realize the balanced allocation of resources; more importantly, the method of the present ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a queue flow limiting method and a storage medium, and the method comprises the steps: formulating a classification flow limiting strategy according to a preset CPU resource occupation threshold and a preset memory resource occupation threshold, and the classification flow limiting strategy comprises a calculation type strategy and a memory type strategy; if the request is configured to be the classified flow limiting strategy, when the client receives the request of writing the application into the message queue, judging whether the request corresponds to a computing type application or a memory type application; if the application is the computational application, executing a computational strategy; and if the application is the memory type application, executing the memory type strategy. According to the invention, good system performance can be ensured; current limiting judgment can be carried out in a more targeted manner, and the practicability is high; more importantly, a monitoring server and an intercepting server do not need to be additionally deployed, the queue program is directly utilized for implementation, and resources and time are greatly saved.

Description

technical field [0001] The invention relates to the field of system request processing, in particular to a queue current limiting method and a storage medium. Background technique [0002] The purpose of current limiting is to protect the system by limiting the rate of concurrent access / requests or requests within a time window. Once the limit rate is reached, the service can be denied (directed to an error page or notified that the resource is gone), queued or Waiting (such as seckill, commenting, placing an order), downgrading (returning pocket data or default data, such as inventory on the product details page is in stock by default). [0003] There are limited stream functions in many systems today. However, under normal circumstances, current limiting is only performed on interfaces. For example, perform pressure tests on certain interfaces to know the approximate throughput, and then limit the flow of interface requests. The above is a general practice, and many sys...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/813H04L12/859H04L12/801H04L47/20H04L47/2475
CPCH04L47/20H04L47/2475H04L47/29
Inventor 刘德建林伟郭玉湖
Owner FUJIAN TIANQUAN EDUCATION TECH LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products