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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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 ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com