Global flow limiting method and device for application cluster, computer device and storage medium
By setting low-frequency and high-frequency rate limiting modes in the application cluster and automatically switching according to the access volume, the bottleneck problem of centralized counter storage nodes is solved, achieving stability and efficiency of global rate limiting and ensuring the reliability and continuous availability of financial applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2026-03-27
AI Technical Summary
Current flow control technology in the financial industry faces the risk of centralized counter storage nodes becoming bottlenecks and single points of failure, resulting in insufficient stability and reliability of application clusters under sudden traffic surges.
By pre-setting low-frequency and high-frequency rate limiting modes for the target application cluster, the rate limiting mode is automatically switched according to the business access volume. In the low-frequency mode, a centralized counter storage node is used, while in the high-frequency mode, the rate limiting counter is stored and calculated independently on each node.
It enables automatic switching of application clusters between different rate limiting modes, reduces the risks of rate limiting technology, improves stability and computing efficiency in various traffic operation ranges, and ensures the continuous availability of services.
Smart Images

Figure CN116668371B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a global flow limiting method and device of application cluster, computer equipment and nonvolatile computer readable storage medium. BACKGROUND
[0002] At present, with the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to Fintech, and the flow limiting technology is no exception. However, due to the safety and real-time requirements of the financial industry, higher requirements are also put forward for the flow limiting technology.
[0003] At present, the financial structure is rapidly developing in the Internet application, and the user's burst traffic will inevitably impact the application, therefore, how the application of the financial structure deals with the burst traffic, how to effectively protect itself and provide continuous application availability is a major challenge to the application reliability technology.
[0004] At present, the flow limiting technology is one of the methods to ensure the reliability of the application. When the access volume exceeds the capacity of the system, the pre-set response strategy can be quickly executed, or rejected or discarded, so as to protect the application itself from accidental collapse due to access exceeding the system capacity. There are many schemes for implementing flow limiting. If accurate flow limiting is required, a centralized counter storage node is needed to store and calculate the flow limiting counter, and whether the flow limiting counter reaches the set threshold is checked. Once the threshold is reached, the corresponding flow limiting strategy is executed. However, this mode has a disadvantage that the place where the public counter is stored becomes a bottleneck and single point of the entire application cluster, which may cause instantaneous failure of all nodes of the business cluster due to slow execution or sudden collapse of the public counter.
[0005] In summary, how to provide a global flow limiting method and device of application cluster, computer equipment and nonvolatile computer readable storage medium, so that the target application cluster can automatically switch between different multiple target flow limiting modes, while realizing its global flow limiting capability, and reducing the probability of technical risk of flow limiting itself, is a problem that needs to be solved by the technical personnel in the field at present. SUMMARY
[0006] In view of the above shortcomings of the prior art, the purpose of the present application is to provide a global flow limiting method and device of application cluster, computer equipment and nonvolatile computer readable storage medium which can be used in the field of Fintech or other related fields, so as to enable the target application cluster to automatically switch between different multiple target flow limiting modes, while realizing its global flow limiting capability, and reducing the probability of technical risk of flow limiting itself.
[0007] In order to achieve the above object, the present application adopts the following technical solutions:
[0008] A global flow limiting method of application cluster, comprising:
[0009] Pre-setting different target flow limiting modes of the target application cluster;
[0010] Obtaining the service access volume of the target application cluster;
[0011] According to the service access volume, controlling the automatic switching of the flow limiting mode of the target application cluster between the plurality of target flow limiting modes.
[0012] In a further technical solution, the global flow limiting method of application cluster, wherein the pre-set different target flow limiting modes of the target application cluster, wherein the target flow limiting mode includes a low-frequency flow limiting mode and a high-frequency flow limiting mode.
[0013] In a further technical solution, the global flow limiting method of application cluster, wherein the obtaining the service access volume of the target application cluster, wherein the target application cluster includes N nodes.
[0014] In a further technical solution, the global flow limiting method of application cluster, wherein the automatic switching of the flow limiting mode of the target application cluster between the plurality of target flow limiting modes according to the service access volume, comprising:
[0015] When the service access volume is less than or equal to a pre-set low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode;
[0016] When the service access volume is greater than the pre-set low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode.
[0017] In a further technical solution, the global flow limiting method of application cluster, wherein when the service access volume is less than or equal to a pre-set low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode, wherein in the low-frequency flow limiting mode, the target application cluster uses a centralized counter storage node to perform the storage and calculation of the flow limiting counter.
[0018] In a further technical solution, the global flow limiting method of application cluster, wherein when the service access volume is greater than the pre-set low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode, wherein in the high-frequency flow limiting mode, the target application cluster performs the storage and calculation of the flow limiting counter independently in each node.
[0019] A global flow limiting device of application cluster, comprising:
[0020] A setting module for pre-setting different target flow limiting modes of the target application cluster;
[0021] An acquisition module for acquiring the service access volume of the target application cluster;
[0022] A switching module for automatically switching the flow limiting mode of the target application cluster between the different target flow limiting modes according to the service access volume.
[0023] In a further technical solution, the global flow limiting device of application cluster, wherein the pre-set different target flow limiting modes of the target application cluster, wherein the target flow limiting modes include a low-frequency flow limiting mode and a high-frequency flow limiting mode.
[0024] A computer device, wherein the computer device comprises at least one processor; and,
[0025] a memory in communication connection with the at least one processor; wherein,
[0026] The memory has stored a computer program executable by the at least one processor, and the computer program is executable by the at least one processor to implement the global flow limiting method of application cluster as described in any one of the above.
[0027] A non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium stores a computer program, and the computer program is executable by at least one processor to implement the global flow limiting method of application cluster as described in any one of the above.
[0028] Compared with the prior art, the present application provides a global flow limiting method, device, computer device and non-volatile computer readable storage medium of application cluster, wherein the method comprises: pre-setting different target flow limiting modes of the target application cluster; acquiring the service access volume of the target application cluster; and automatically switching the flow limiting mode of the target application cluster between the different target flow limiting modes according to the service access volume. Through the method of the present application, the target application cluster can be automatically switched between different target flow limiting modes, which can realize its global flow limiting capability while reducing the probability of technical risk of flow limiting itself. BRIEF DESCRIPTION OF DRAWINGS
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart illustrating a global rate limiting method for an application cluster, as provided in an embodiment of the present invention.
[0031] Figure 2 for Figure 1 A flowchart illustrating step S300 as described above.
[0032] Figure 3 This is a schematic diagram of the functional modules of a global rate limiting device for an application cluster provided in an embodiment of the present invention.
[0033] Figure 4 This is a schematic diagram of the hardware structure of the computer device provided in an embodiment of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0035] In the description of this invention, the terms "comprising," "including," "having," and "containing" are all open-ended terms, meaning that they include but are not limited to. The terms "one embodiment," "one specific embodiment," "some embodiments," and "for example," etc., refer to specific features, structures, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. The order of steps involved in the various embodiments is used to illustrate the implementation of this application, and the order of steps is not limited and can be adjusted appropriately as needed.
[0036] Various non-limiting embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0037] Currently, with the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech), and rate limiting technology is no exception. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on rate limiting technology.
[0038] At present, the financial structure is rapidly developing in the application of the Internet, and the sudden traffic of the user will inevitably impact the application, therefore, how the application of the financial structure responds to the sudden traffic, how to effectively protect itself and provide continuous application availability is a major challenge to the reliability technology of the application.
[0039] At present, the flow limiting technology is one of the methods for the application to ensure its reliability, when the access volume exceeds the capacity of the system, the pre-set response strategy can be quickly executed, or rejected or discarded, so as to protect the application itself from accidental collapse due to access exceeding the system capacity. There are many schemes for the implementation of flow limiting, if accurate flow limiting is required, a centralized counter storage node is needed to store and calculate the flow limiting counter, and whether the flow limiting counter reaches the set threshold is checked, and once the threshold is reached, the corresponding flow limiting strategy is executed. However, this mode has a disadvantage, that is, the place where the public counter is stored becomes a bottleneck and a single point of the entire application cluster, which may cause instantaneous failure of all nodes of the business cluster due to slow execution or sudden collapse of the public counter.
[0040] In summary, how to provide a global flow limiting method, device, computer equipment and non-volatile computer readable storage medium of application cluster, so that the target application cluster can automatically switch between different multiple target flow limiting modes, while realizing the global flow limiting capability, and can reduce the probability of technical risk of flow limiting itself, is a problem to be solved by the technical personnel in the field at present.
[0041] Therefore, in order to solve the above problems, please refer to Figure 1 The embodiment of the application provides a global flow limiting method of application cluster, wherein the method comprises the steps of:
[0042] S100, different multiple target flow limiting modes of the target application cluster are pre-set;
[0043] S200, the business access volume of the target application cluster is acquired;
[0044] S300, according to the business access volume, the flow limiting mode of the target application cluster is automatically switched between multiple target flow limiting modes.
[0045] Further, the global flow limiting method of application cluster, wherein the step S100, different multiple target flow limiting modes of the target application cluster are pre-set, wherein the target flow limiting mode includes a low-frequency flow limiting mode and a high-frequency flow limiting mode.
[0046] Further, the application cluster global flow limiting method, wherein the step S200, the target application cluster business access volume is acquired, wherein the target application cluster includes N nodes.
[0047] In the embodiment, two different target flow limiting modes of the target application cluster are set in advance, wherein the two target flow limiting modes are low frequency flow limiting mode and high frequency flow limiting mode; it should be understood that the application cluster itself is a multi-node deployment, when the target application cluster includes N nodes, and the single node business access volume threshold is set to 3 (for example), the low frequency threshold of the target application cluster is 3N.
[0048] Further, please refer to Figure 2 , the application cluster global flow limiting method, wherein the step S300, according to the business access volume, the flow limiting mode of the target application cluster is automatically switched between the plurality of target flow limiting modes, including steps:
[0049] S301, when the business access volume is less than or equal to the preset low frequency flow limiting threshold, the target application cluster is controlled to switch into the low frequency flow limiting mode;
[0050] S302, when the business access volume is greater than the preset low frequency flow limiting threshold, the target application cluster is controlled to switch into the high frequency flow limiting mode.
[0051] In the embodiment, after the target application cluster business access volume is acquired, the flow limiting mode of the target application cluster is automatically switched between the low frequency flow limiting mode and the high frequency flow limiting mode according to the business access volume, wherein when the business access volume is less than or equal to the low frequency flow limiting threshold (3N), the target application cluster is controlled to switch into the low frequency flow limiting mode, and when the business access volume is greater than the low frequency flow limiting threshold (3N), the target application cluster is controlled to switch into the high frequency flow limiting mode.
[0052] Further, the application cluster global flow limiting method, wherein the step S301, when the business access volume is less than or equal to the preset low frequency flow limiting threshold, the target application cluster is controlled to switch into the low frequency flow limiting mode, wherein in the low frequency flow limiting mode, the target application cluster uses centralized counter storage node to perform flow limiting counter storage and calculation.
[0053] In the embodiment, in the low-frequency flow limiting mode, the service access volume is small, and the impact on the concentrated flow limiting counter is small, so as to avoid performance bottleneck or problem. In the low-frequency flow limiting mode, the concentrated counter storage node is used for storage and calculation of the flow limiting counter, and the accurate flow limiting requirement in the low-frequency flow limiting mode is met.
[0054] Further, the application cluster global flow limiting method is applied, wherein, in step S302, when the service access volume is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode, wherein, in the high-frequency flow limiting mode, the target application cluster performs independent storage and calculation of the flow limiting counter in each node.
[0055] In the embodiment, in the high-frequency flow limiting mode, the target application cluster does not use the concentrated counter storage node to perform storage and calculation of the flow limiting counter, but performs independent storage and calculation of the flow limiting counter in each node, so that in the high-frequency flow limiting mode, the storage and calculation of the flow limiting counter are performed in each node without external dependence, and the calculation efficiency and performance are guaranteed.
[0056] Further, in the low-frequency flow limiting mode or the high-frequency flow limiting mode, once the flow limiting counter reaches the set threshold, the corresponding flow limiting strategy is performed.
[0057] According to the method embodiment, the application cluster global flow limiting method is provided, different low-frequency flow limiting modes and high-frequency flow limiting modes of the target application cluster are set in advance, the service access volume of the target application cluster is obtained, and the flow limiting mode of the target application cluster is automatically switched between the low-frequency flow limiting mode and the high-frequency flow limiting mode according to the service access volume. When the service access volume is less than or equal to the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode, and when the service access volume is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode. In this way, the target application cluster can be automatically switched between the low-frequency flow limiting mode and the high-frequency flow limiting mode by the method, the global flow limiting capability is realized, the probability of technical risk of flow limiting is reduced, the accurate flow limiting requirement in the low-frequency flow limiting mode is met, the stability in each flow running interval is improved, and the business operation is effectively supported.
[0058] It should be understood that although the present application provides method operation steps as described in the embodiments or flowcharts, more or less operation steps can be included based on conventional or non-inventive labor, and the operation steps are not necessarily executed in the order of the embodiments or flowcharts. The order of steps listed in the embodiments or flowcharts is only one of the many execution orders, and does not represent the only execution order. It should be noted that there is no certain sequence between the above steps, and those skilled in the art can understand from the description of the embodiments of the present application that the above steps can have different execution orders in different embodiments, i.e., can be executed in parallel, can be exchanged, etc. Moreover, at least part of the steps in the embodiments or flowcharts can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation, alternation or synchronization with other steps or sub-steps or stages of other steps.
[0059] Based on the above embodiments, please refer to Figure 3 Another embodiment of the present application also provides a global flow limiting device for application cluster, wherein the device comprises:
[0060] The setting module 11 is configured to pre-set different target flow limiting modes for the target application cluster;
[0061] The acquisition module 12 is configured to acquire the service access volume of the target application cluster;
[0062] The switching module 13 is configured to control the target application cluster to automatically switch the flow limiting mode among the multiple target flow limiting modes according to the service access volume.
[0063] Further, the global flow limiting device for application cluster, wherein the pre-set different target flow limiting modes for the target application cluster, wherein the target flow limiting modes include a low-frequency flow limiting mode and a high-frequency flow limiting mode.
[0064] Further, the global flow limiting device for application cluster, wherein the acquisition of the service access volume of the target application cluster, wherein the target application cluster includes N nodes.
[0065] In the embodiment, two different target flow limiting modes are pre-set for the target application cluster, wherein the two target flow limiting modes are a low-frequency flow limiting mode and a high-frequency flow limiting mode, respectively. It should be understood that the application cluster itself is a multi-node deployment, and when the target application cluster includes N nodes and the service access volume threshold of a single node is set to 3 (for example), the low-frequency threshold of the target application cluster is 3N.
[0066] Further, the application cluster global flow limiting device, wherein the target application cluster is controlled to switch between the low-frequency flow limiting mode and the high-frequency flow limiting mode according to the service access amount, and the control comprises:
[0067] When the service access amount is less than or equal to a preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode.
[0068] When the service access amount is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode.
[0069] In the embodiment, after the service access amount of the target application cluster is obtained, the target application cluster is controlled to switch between the low-frequency flow limiting mode and the high-frequency flow limiting mode according to the service access amount, and when the service access amount is less than or equal to a low-frequency flow limiting threshold (3N), the target application cluster is controlled to switch into the low-frequency flow limiting mode, and when the service access amount is greater than the low-frequency flow limiting threshold (3N), the target application cluster is controlled to switch into the high-frequency flow limiting mode.
[0070] Further, the application cluster global flow limiting device, wherein when the service access amount is less than or equal to a preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode, and in the low-frequency flow limiting mode, the target application cluster uses a centralized counter storage node to store and calculate the flow limiting counter.
[0071] In the low-frequency flow limiting mode, the service access amount itself is small, and the impact on the centralized flow limiting counter is small, so that no performance bottleneck or problem is caused, and in the low-frequency flow limiting mode, the centralized counter storage node is used to store and calculate the flow limiting counter, so that the accurate flow limiting requirement in the low-frequency flow limiting mode is also met.
[0072] Further, the application cluster global flow limiting device, wherein when the service access amount is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode, and in the high-frequency flow limiting mode, the target application cluster stores and calculates the flow limiting counter independently in each node.
[0073] In the high-frequency flow limiting mode, the target application cluster does not use the centralized counter storage node to store and calculate the flow limiting counter, but stores and calculates the flow limiting counter independently at each node. In the high-frequency flow limiting mode, the storage and calculation of the flow limiting counter are performed internally at each node without external dependence, and the calculation efficiency and performance are well guaranteed.
[0074] Further, in the low-frequency flow limiting mode or the high-frequency flow limiting mode, once the flow limiting counter reaches the set threshold, the corresponding flow limiting strategy is executed.
[0075] According to the above device embodiment, the application cluster global flow limiting device provided by the application can automatically switch the flow limiting mode of the target application cluster between the low-frequency flow limiting mode and the high-frequency flow limiting mode according to the business access volume. When the business access volume is less than or equal to the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the low-frequency flow limiting mode. When the business access volume is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into the high-frequency flow limiting mode. In this way, the device of the application can automatically switch the target application cluster between the low-frequency flow limiting mode and the high-frequency flow limiting mode, realize the global flow limiting capability, reduce the probability of technical risk of flow limiting itself, take into account the accurate flow limiting requirement in the low-frequency flow limiting mode, improve the stability in each traffic operation interval, and effectively support the business operation.
[0076] Based on the above embodiment, please refer to Figure 4 Another embodiment of the application further provides a computer device, wherein the computer device 10 comprises:
[0077] a memory 120 and one or more processors 110, Figure 4 In the embodiment, the processor 110 and the memory 120 are connected through a communication bus or other means. Figure 4 In the embodiment, the processor 110 and the memory 120 are connected through a communication bus or other means.
[0078] The processor 110 is configured to complete various control logics of the computer device 10, and can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination thereof. In addition, the processor 110 can also be any conventional processor, microprocessor, or state machine. The processor 110 can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in combination with a DSP core, or any other such configuration.
[0079] The memory 120 is a non-volatile computer readable storage medium, and is configured to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the computer program corresponding to the application cluster global flow limiting method in the embodiments of the present application. The processor 110 is configured to execute various functions of the computer device 10 and data processing by running the non-volatile software programs, instructions, and units stored in the memory 120, that is, to implement the application cluster global flow limiting method in the above method embodiments.
[0080] The memory 120 can include a program storage area and a data storage area, where the program storage area can store application programs required by the operation device and at least one function, and the data storage area can store data created according to the use of the computer device 10, etc. In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 120 can optionally include a memory remotely arranged with respect to the processor 110, and these remote memories can be connected to the computer device 10 through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0081] One or more units are stored in the memory 120, and when executed by the one or more processors 110, the application cluster global flow limiting method in any one of the above method embodiments can be implemented, for example, the method steps S100 to S300 in the above description. Figure 1
[0082] Those skilled in the art can understand that the hardware structure diagram shown in Figure 4 is only a schematic diagram of part of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device can include more components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0083] Based on the above embodiments, the application further provides a non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by at least one processor to implement the application cluster global flow control method in any one of the above method embodiments, for example, to implement the method steps S100 to S300 in the above description. Figure 1
[0084] By way of example, non-volatile storage can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), as external cache memory for a processor. By way of illustration, RAM can be available at many forms, such as synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM) by way of illustration and not limitation. The disclosed memory components or memory of the operational environment described herein are intended to encompass one or more of these and / or any other suitable types of memory.
[0085] Another embodiment of the application provides a computer program product, which includes a computer program stored on a non-volatile computer readable storage medium, and the computer program includes program instructions, which, when executed by a processor, can implement the application cluster global flow control method in any one of the above method embodiments, for example, to implement the method steps S100 to S300 in the above description. Figure 1
[0086] The above described embodiments are merely illustrative, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e. can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0087] Those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on such an understanding, the technical solutions described above essentially or in other words the part that contributes to the related art can be embodied in the form of a software product, and the computer software product can exist in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods of each embodiment or some parts of the embodiments.
[0088] Conditional language such as, among others, "can," "could," "might" or "may," unless specifically stated otherwise, generally are intended to convey that a certain feature, element or process can be included or instrumental in some or all embodiments. Thus, such conditional language generally is not intended to imply that a feature, element or process is required in one or more embodiments or that a feature, element or process is essential to one or more embodiments. The singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise.
[0089] What has been described herein is including the examples of a kind of application cluster's global flow limiting method, device, computer equipment and nonvolatile computer readable storage medium can provide. Certainly, each conceivable combination of elements and / or methods that can not be described for the purpose of describing various features of the present disclosure, but it can be realized that many additional combinations and permutations of the disclosed features are possible. Therefore, it is clear that various modifications can be made to the present disclosure without departing from the scope or spirit of the present disclosure, but all these various modifications should belong to the protection scope of the appended claims of the present application. Furthermore, or in the alternative, other embodiments of the present disclosure can be apparent from consideration of the present specification and drawings, and practice of the present disclosure as presented herein. It is intended that the examples presented in the present specification and drawings be considered illustrative in all respects, rather than limiting. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.
Claims
1. A global throttling method for application clusters, characterized in that, The method comprises the following steps: pre-setting different target flow control modes for a target application cluster; acquiring a service access volume of the target application cluster; controlling the flow control mode of the target application cluster to automatically switch between the different target flow control modes according to the service access volume; the pre-setting different target flow control modes for the target application cluster, wherein the target flow control modes comprise a low-frequency flow control mode and a high-frequency flow control mode; the controlling the flow control mode of the target application cluster to automatically switch between the different target flow control modes according to the service access volume, comprising: controlling the flow control mode of the target application cluster to automatically switch between the low-frequency flow control mode and the high-frequency flow control mode according to the service access volume; when the service access volume is less than or equal to a preset low-frequency flow control threshold, controlling the target application cluster to switch into the low-frequency flow control mode; when the service access volume is greater than the preset low-frequency flow control threshold, controlling the target application cluster to switch into the high-frequency flow control mode; the acquiring the service access volume of the target application cluster, wherein the target application cluster comprises N nodes; when the service access volume is less than or equal to a preset low-frequency flow control threshold, controlling the target application cluster to switch into the low-frequency flow control mode, wherein, in the low-frequency flow control mode, the target application cluster uses a centralized counter storage node to perform storage and calculation of a flow control counter; when the service access volume is greater than the preset low-frequency flow control threshold, controlling the target application cluster to switch into the high-frequency flow control mode, wherein, in the high-frequency flow control mode, the target application cluster performs storage and calculation of a flow control counter independently in each node.
2. A global rate limiting device for application clusters, characterized in that, The method comprises the following steps: a setting module, configured to pre-set different target flow control modes for a target application cluster; an acquiring module, configured to acquire a service access volume of the target application cluster; a switching module, configured to control the flow control mode of the target application cluster to automatically switch between the different target flow control modes according to the service access volume; the pre-setting different target flow control modes for the target application cluster, wherein the target flow control modes comprise a low-frequency flow control mode and a high-frequency flow control mode; the controlling the flow control mode of the target application cluster to automatically switch between the different target flow control modes according to the service access volume, comprising: controlling the flow control mode of the target application cluster to automatically switch between the low-frequency flow control mode and the high-frequency flow control mode according to the service access volume; when the service access volume is less than or equal to a preset low-frequency flow control threshold, controlling the target application cluster to switch into the low-frequency flow control mode; when the service access volume is greater than the preset low-frequency flow control threshold, controlling the target application cluster to switch into the high-frequency flow control mode; the acquiring the service access volume of the target application cluster, wherein the target application cluster comprises N nodes; When the service access volume is less than or equal to a preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into a low-frequency flow limiting mode, wherein in the low-frequency flow limiting mode, the target application cluster uses a centralized counter storage node to perform flow limiting counter storage and calculation; When the service access volume is greater than the preset low-frequency flow limiting threshold, the target application cluster is controlled to switch into a high-frequency flow limiting mode, wherein in the high-frequency flow limiting mode, the target application cluster performs independent flow limiting counter storage and calculation on each node.
3. A computer device, comprising: The computer device comprises at least one processor; and The memory is in communication connection with the at least one processor; wherein The memory has stored thereon a computer program which can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the application cluster global flow limiting method of claim 1 can be implemented.
4. A non-transitory computer readable storage medium, comprising: The non-volatile computer readable storage medium has stored thereon a computer program which can be executed by at least one processor, and when the computer program is executed by the at least one processor, the application cluster global flow limiting method of claim 1 can be implemented.
Citation Information
Patent Citations
Traffic limiting method and system, application server and readable storage medium
CN115225579A