API circuit-break method based on hierarchical dynamic feedback and multi-factor decision
By adopting the API circuit breaker method of hierarchical dynamic feedback and multi-factor decision-making in the microservice architecture, the problem of API level circuit breaker control in the existing technology is solved, API level refined control and flexible circuit breaker management are realized, and the system reliability is improved. controllability and efficiency.
Patent Information
- Application Number
- PCT/CN2023/143190
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-12
- Filing Date
- 2023-12-29
- Publication Date
- 2024-10-24
AI Technical Summary
The existing API circuit breaker mechanism is difficult to achieve circuit breaker control accurate to the API level in microservice architecture. Commonly used decision-making algorithms for the number of failures and failure rates can easily trigger improper circuit breaker, affecting system efficiency.
The API circuit breaker method based on hierarchical dynamic feedback and multi-factor decision-making is adopted. By obtaining the statistical information of the two-level gateway and API in the microservice architecture, a cache memory is built, and the evaluation model is used to decide whether to circuit breaker or restore based on the weight and threshold of the API. Implement API level circuit breaker control.
Distributed caching through hierarchical gateways, combined with asynchronous dynamic feedback and multi-factor decision-making, achieves refined control at the API level, reduces the consumption of circuit breaker judgment, supports flexible circuit breaker and recovery management, and improves the controllability and flexibility of the system.
Smart Images

Figure CN2023143190_24102024_PF_FP_ABST
Abstract
Description
An API circuit breaker method based on hierarchical dynamic feedback and multi-factor decision-making Technical Field
[0001] The present invention belongs to the field of IT and software development technology, and specifically relates to an API fusing method based on hierarchical dynamic feedback and multi-factor decision-making. Background Art
[0002] The API gateway serves as the unified entrance to the entire system under the microservice architecture. It is responsible for managing all request traffic in the system and forwarding all API requests to the back-end server. It generally has several core functions such as unified access, protocol adaptation, traffic monitoring and fault tolerance, and security protection. The circuit breaker mechanism is a microservice link protection mechanism to deal with the avalanche effect. When a microservice in the call link is unavailable or the response time is too long, the service will be downgraded, and the call to the microservice of the node will be fused, and the error response information will be quickly returned.
[0003] The gateway is responsible for API forwarding for all products in all resource pools on the platform. If circuit breaking is to be performed accurately at the API level, the amount of statistical data in a single cache is large, and each request must be queried in the cache, affecting the gateway's forwarding efficiency. If the resource pool + product is used as a circuit breaker service object, and one or two high-frequency APIs in the service frequently fail, the commonly used failure count and failure rate decision algorithm is likely to trigger circuit breaking, which is not as expected.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to provide an API fusing method based on hierarchical dynamic feedback and multi-factor decision-making, which can more reasonably decide whether to fuse the entire product service in the resource pool by setting different weights of the API.
[0006] The technical solutions adopted by the present invention are as follows:
[0007] An API circuit breaker method based on hierarchical dynamic feedback and multi-factor decision-making, including:
[0008] Obtain a two-level gateway in the microservice architecture, the two-level gateway including a national gateway and a resource pool gateway;
[0009] Obtain statistical information for each API, including the number of API failures within the sliding window, the failure rate of the API within the sliding window, the circuit breaker weight of each API, the circuit breaker flag, and the circuit breaker recovery time. The circuit breaker flag includes "broken" and "normal";
[0010] Building a cache memory based on the statistical information of the API, wherein the cache memory includes a first buffer memory and a second buffer memory;
[0011] The total weight of the APIs that have been blown in a single business logic layer in the first buffer memory is updated based on the statistical information, and then input into the evaluation model, and the trigger instruction is determined based on the output result of the evaluation model, wherein the trigger instruction includes triggering the circuit breaker or triggering the circuit breaker recovery.
[0012] In a preferred solution, health monitoring is maintained between the national gateway and the resource pool gateway, and after two consecutive failures in health monitoring, the resource pool network is determined to be unreachable, and the first buffer memory updates the circuit breaker flag and the fuse recovery time;
[0013] Among them, the updated circuit breaker flag is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
[0014] In a preferred solution, when a new API request is added, the target business logic layer to which the API belongs is obtained, and the total weight of the APIs that have been fused in a single business logic layer, the total fuse weight threshold in a single business logic layer, the circuit breaker flag, and the fuse recovery time are queried in the first buffer memory;
[0015] If the total weight threshold of the circuit breaker in the single business logic layer is zero, and the circuit breaker recovery time is after the current time, it means that the API is within the circuit breaker period, and the national gateway directly rejects the API. Otherwise, the API is forwarded to the corresponding resource pool gateway.
[0016] In a preferred solution, the total weight threshold of the circuit breaker in the single business logic layer is zero, and the circuit breaker recovery time is before the current time, indicating that the circuit breaker has expired but no update has been performed, and the update of the first buffer memory is immediately triggered asynchronously, and then the API is forwarded to the corresponding resource pool gateway.
[0017] In a preferred solution, before the resource pool gateway receives the API request, it queries the second buffer memory according to the routing rules to obtain the corresponding number of API failures within the sliding window time, the failure rate of the API within the sliding window time, the circuit breaker weight of a single API, the circuit breaker flag and the circuit breaker recovery time.
[0018] In a preferred solution, after the API request is read, the total weight threshold of the circuit breaker and the circuit breaker recovery time in a single business logic layer in the second buffer memory are obtained, and if the total weight threshold of the circuit breaker in the single business logic layer is zero and the circuit breaker recovery time is after the current time, the resource pool gateway directly rejects the API; otherwise, the API is forwarded to the corresponding business logic layer.
[0019] In a preferred solution, the total weight threshold of the circuit breaker in the single business logic layer is zero, and the circuit breaker recovery time is before the current time, indicating that the circuit breaker has expired but no update has been performed, and the number of API failures within the sliding window time and the API failure rate within the sliding window time of the corresponding routing rule in the second buffer memory are immediately updated.
[0020] In a preferred embodiment, when the second buffer memory is updated, an API failure number threshold and an API failure rate threshold are obtained, and compared with the API failure number and the API failure rate within the sliding window time, respectively. When the API failure number within the sliding window time is greater than the API failure number threshold and the API failure rate within the sliding window time is greater than the API failure rate threshold, the circuit breaker flag and the fuse recovery time in the second buffer memory are updated;
[0021] Among them, the updated circuit breaker flag is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
[0022] In a preferred embodiment, the step of determining a trigger instruction according to an output result of the evaluation model includes:
[0023] Get the circuit breaker weight of a single API with the circuit breaker flag set to "fuse", and mark it as the parameter to be evaluated;
[0024] Calling an evaluation function from the evaluation model;
[0025] Input the parameters to be evaluated into the evaluation model to obtain the total weight of the APIs that have been blown in a single business logic layer;
[0026] If the total weight of the APIs that have been fused in the single business logic layer is greater than or equal to the total weight threshold of the fused APIs in the single business logic layer, a trigger instruction for fused APIs is generated;
[0027] If the total weight of the APIs that have been fused in the single business logic layer is less than the total weight threshold of the fused circuit in the single business logic layer, a trigger instruction for triggering the restoration of the fused circuit is generated, and the circuit breaker flag is updated to normal.
[0028] The present invention also provides an API fusing system based on hierarchical dynamic feedback and multi-factor decision-making, which is applied to the above-mentioned API fusing method based on hierarchical dynamic feedback and multi-factor decision-making, including:
[0029] A first acquisition module, which is used to acquire two levels of gateways in the microservice architecture, wherein the two levels of gateways include a national gateway and a resource pool gateway;
[0030] A statistics module is used to obtain statistical information for each API, including the number of API failures within the sliding window, the failure rate of the API within the sliding window, the circuit breaker weight of a single API, the circuit breaker flag, and the circuit breaker recovery time, where the circuit breaker flag includes circuit breaker and normal;
[0031] A second acquisition module, the second acquisition module is used to build a cache memory based on the statistical information of the API, the cache memory including a first buffer memory and a second buffer memory;
[0032] An evaluation module is used to update the total weight of the APIs that have been blown in a single business logic layer in the first buffer memory based on statistical information, then input it into the evaluation model, and determine the trigger instruction based on the output result of the evaluation model, wherein the trigger instruction includes triggering the circuit breaker or triggering the circuit breaker recovery.
[0033] The technical effects achieved by the present invention are:
[0034] The present invention realizes the circuit breaking control of API level by distributing multiple caches through hierarchical gateways, and then combines asynchronous dynamic feedback and multi-factor decision-making to conduct a comprehensive analysis of statistical data from different dimensions at different stages of API forwarding. By setting different weights of APIs, a more reasonable decision is made whether to fuse the entire product service in the resource pool. Combined with the multi-factor decision-making algorithm, the number of elements in a single cache is controlled, and the consumption of the gateway for circuit breaking judgment can be basically ignored. The communication between gateways can sense the downtime of services in the resource pool and blow the circuit in advance. In addition to supporting API-level control, the occurrence and recovery of circuit breaking can also be more flexibly managed and controlled through the combination of multiple weights and thresholds, taking into account the realization of refined control, flexibility and controllability. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] FIG1 is a flow chart of the method provided by the present invention. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0038] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it constitute a separate or selective embodiment that is mutually exclusive of other embodiments.
[0039] As shown in FIG1 , the present invention provides an API circuit breaker method based on hierarchical dynamic feedback and multi-factor decision-making, including:
[0040] S1. Obtain the two-level gateways in the microservice architecture, which include the national gateway and the resource pool gateway.
[0041] S2. Obtain statistical information for each API, including the number of API failures within the sliding window, the failure rate of the API within the sliding window, the circuit breaker weight of each API, the circuit breaker flag, and the circuit breaker recovery time. The circuit breaker flag includes "broken" and "normal";
[0042] S3. Building a cache memory based on the statistical information of the API, the cache memory including a first buffer memory and a second buffer memory;
[0043] S4. Update the total weight of the APIs that have been blown in a single business logic layer in the first buffer memory based on the statistical information, then input it into the evaluation model, and determine the trigger instruction based on the output result of the evaluation model, where the trigger instruction includes triggering the circuit breaker or triggering the circuit breaker recovery.
[0044] As described in the above steps S1-S4, with the rapid development of the Internet, application programming interfaces (APIs) have become an indispensable part of modern software development. APIs allow communication and data exchange between different software systems, thereby achieving efficient system integration. However, due to network delays, server failures and other reasons, API calls may fail, resulting in performance degradation or even crash of the entire system. In order to solve this problem, an API fuse mechanism came into being. In this embodiment, a two-level gateway is first constructed in the microservice architecture. The two-level gateway includes a national gateway and a resource pool gateway, and then statistical information of each API is obtained. The statistical information includes the current time, the sliding window duration, the fuse reply time, the number of API failures within the sliding window time, and the number of times the API fails within the sliding window time. The failure rate of the API, the circuit breaker weight of a single API, the circuit breaker flag, the total weight of the APIs that have been blown in a single business logic layer, the total circuit breaker weight threshold in a single business logic layer, the API failure count threshold and the API failure rate threshold are input into the cache memory. In this embodiment, the cache memory includes a first buffer memory and a second buffer memory. The first buffer memory and the second buffer memory correspond to the national gateway and the resource pool gateway respectively. After obtaining the newly added API request, the trigger instruction is output through the evaluation model to determine the output of the trigger instruction. Combined with the multi-factor decision algorithm, the number of elements in a single cache is controlled, and the consumption of the gateway for circuit breaker judgment can be basically ignored. The communication between gateways can sense the downtime of the service in the resource pool and blow the circuit in advance.
[0045] In a preferred embodiment, health monitoring is maintained between the national gateway and the resource pool gateway, and after two consecutive failures of health monitoring, the resource pool network is determined to be unreachable, and the first buffer memory updates the circuit breaker flag and the fuse recovery time;
[0046] Among them, the updated circuit breaker flag is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
[0047] In this implementation, the purpose of continuous health monitoring is to ensure that the resource pool network can be monitored in real time, so that the call request to the API can be accurately read. After the circuit breaker flag is updated to the fuse state, the fuse recovery time will be offset based on the current time according to the sliding window duration, and the offset result will be calibrated as the fuse recovery time.
[0048] Secondly, when a new API request is added, the target business logic layer to which the API belongs is obtained, and the total weight of the APIs that have been fused in a single business logic layer, the total fuse weight threshold in a single business logic layer, the circuit breaker flag, and the fuse recovery time are queried in the first buffer memory;
[0049] If the total weight threshold of the circuit breaker in a single business logic layer is zero, and the circuit breaker recovery time is after the current time, it means that the API is within the circuit breaker period. The national gateway directly rejects the API. Otherwise, the API is forwarded to the corresponding resource pool gateway.
[0050] In addition, the total weight threshold of the circuit breaker in a single business logic layer is zero, and the circuit breaker recovery time is before the current time, indicating that the circuit breaker expires but the update is not executed, and the update of the first buffer memory is immediately triggered asynchronously, and then the API is forwarded to the corresponding resource pool gateway.
[0051] In this embodiment, when a new API request is added, the target business logic layer to which the API corresponds is first determined, and the total weight of the APIs that have been blown in a single business logic layer, the total blown weight threshold in a single business logic layer, the circuit breaker flag, and the blown recovery time are queried and recorded from the first buffer memory, and it is determined whether the total blown weight threshold in a single business logic layer is zero. When the value is zero, the national gateway directly rejects the API, otherwise it will be sent to the resource pool gateway.
[0052] In a preferred embodiment, before the resource pool gateway receives the API request, it queries the second buffer memory according to the routing rules to obtain the corresponding number of API failures within the sliding window time, the failure rate of the API within the sliding window time, the circuit breaker weight of a single API, the circuit breaker flag and the circuit breaker recovery time.
[0053] Secondly, after the API request is read, the total weight threshold of the circuit breaker and the circuit breaker recovery time in the single business logic layer in the second buffer memory are obtained. If the total weight threshold of the circuit breaker in the single business logic layer is zero and the circuit breaker recovery time is after the current time, the resource pool gateway directly rejects the API. Otherwise, the API is forwarded to the corresponding business logic layer.
[0054] Secondly, the total weight threshold of the circuit breaker in a single business logic layer is zero, and the circuit breaker recovery time is before the current time, indicating that the circuit breaker has expired but no update has been performed, and the number of API failures within the sliding window time and the API failure rate within the sliding window time of the corresponding routing rule in the second buffer memory are immediately updated.
[0055] In this embodiment, before the resource pool gateway receives the API request, it will query the second buffer memory to obtain the corresponding number of API failures within the sliding window time, the API failure rate within the sliding window time, the circuit breaker weight of a single API, the circuit breaker flag and the circuit breaker recovery time. The determination process of the total circuit breaker weight threshold in a single business logic layer is consistent with the determination process of the national gateway, and will not be repeated here.
[0056] In a preferred embodiment, when the second buffer memory is updated, an API failure count threshold and an API failure rate threshold are obtained, and the API failure count and the API failure rate within the sliding window time are compared respectively. When the API failure count within the sliding window time is greater than the API failure count threshold and the API failure rate within the sliding window time is greater than the API failure rate threshold, the circuit breaker flag and the fuse recovery time in the second buffer memory are updated;
[0057] Among them, the updated circuit breaker flag is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
[0058] In this embodiment, when both the national gateway and the resource pool gateway reject the API request, the API will be forwarded to the specific business logic layer, and when the number of API failures within the sliding window time is greater than the API failure number threshold, and the API failure rate within the sliding window time is greater than the API failure rate threshold, the circuit breaker flag and the circuit breaker recovery time in the second buffer memory are updated to achieve the purpose of flexibly managing the occurrence and recovery of circuit breaking.
[0059] In a preferred embodiment, the step of determining a trigger instruction based on the output result of the evaluation model includes:
[0060] S401. Obtain the circuit breaker weight of a single API with the circuit breaker flag set to "broken," and mark it as a parameter to be evaluated.
[0061] S402, calling the evaluation function from the evaluation model;
[0062] S403: Input the parameters to be evaluated into the evaluation model to obtain the total weight of the APIs that have been blown in a single business logic layer;
[0063] If the total weight of the APIs that have been fused in a single business logic layer is greater than or equal to the total weight threshold of the fused APIs in a single business logic layer, a trigger instruction for fused APIs is generated.
[0064] If the total weight of the APIs that have been fused in a single business logic layer is less than the total weight threshold of the fused circuit in a single business logic layer, a trigger instruction for restoring the fused circuit is generated, and the circuit breaker flag is updated to normal.
[0065] As described in steps S401-S403 above, when the evaluation model is executed, the circuit breaker weight of a single API marked as a circuit breaker is first calibrated as a parameter to be evaluated, and then the parameter to be evaluated is output to the evaluation function, where the expression of the evaluation function is: Where TW represents the total weight of the APIs that have been fused in a single business logic layer, n represents the number of parameters to be evaluated, and W iRepresents the parameter to be evaluated. After the total weight of the APIs that have been fused in a single business logic layer is output, it will be compared with the total weight threshold of the fused weight of the single business logic layer to determine whether to trigger the reply fused weight and issue the fused weight instruction.
[0066] The present invention also provides an API fusing system based on hierarchical dynamic feedback and multi-factor decision-making, which is applied to the above-mentioned API fusing method based on hierarchical dynamic feedback and multi-factor decision-making, including:
[0067] A first acquisition module, which is used to acquire two levels of gateways in the microservice architecture, wherein the two levels of gateways include a national gateway and a resource pool gateway;
[0068] A statistics module is used to obtain statistical information for each API, including the number of API failures within the sliding window, the failure rate of the API within the sliding window, the circuit breaker weight of a single API, the circuit breaker flag, and the circuit breaker recovery time, where the circuit breaker flag includes circuit breaker and normal;
[0069] A second acquisition module, the second acquisition module is used to build a cache memory based on the statistical information of the API, the cache memory including a first buffer memory and a second buffer memory;
[0070] An evaluation module is used to update the total weight of the APIs that have been blown in a single business logic layer in the first buffer memory based on statistical information, then input it into the evaluation model, and determine the trigger instruction based on the output result of the evaluation model, wherein the trigger instruction includes triggering the circuit breaker or triggering the circuit breaker recovery.
[0071] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0072] The foregoing is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained herein shall, unless otherwise specified or limited, be implemented in accordance with conventional means in the art.
Claims
1. An API circuit breaker method based on hierarchical dynamic feedback and multi-factor decision-making, characterized by: include: Obtain a two-level gateway in a microservice architecture, wherein the two-level gateway includes a national region gateway and a resource pool gateway; Obtain statistical information for each API, including the number of API failures within the sliding window, the API failure rate within the sliding window, the circuit breaker weight of a single API, the circuit breaker flag, and the circuit breaker recovery time, where the circuit breaker flag includes circuit breaker and normal; Building a high-speed cache memory according to the statistical information of the API, wherein the high-speed cache memory includes a first buffer memory and a second buffer memory; The total weight of the APIs that have been blown in a single business logic layer in the first buffer memory is updated based on the statistical information, and then input into the evaluation model, and the trigger instruction is determined based on the output result of the evaluation model, wherein the trigger instruction includes triggering the blown circuit or triggering the blown circuit recovery.
2. According to claim 1, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: The national gateway and the resource pool gateway maintain health monitoring, and after the health monitoring fails twice in succession, it is determined that the resource pool network is unreachable, and the first buffer memory updates the circuit breaker flag and the fuse recovery time; Among them, the updated circuit breaker mark is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
3. According to claim 1, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: When a new API request is added, the target business logic layer to which the API belongs is obtained, and the total weight of the APIs that have been blown in a single business logic layer, the total weight threshold of the blown APIs in a single business logic layer, the circuit breaker flag, and the blown recovery time are queried in the first buffer memory; If the total weight threshold of the circuit breaker in the single business logic layer is zero, and the circuit breaker recovery time is after the current time, it means that the API is within the circuit breaker period, and the national gateway directly rejects the API. Otherwise, the API is forwarded to the corresponding resource pool gateway.
4. According to claim 3, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: The total weight threshold of the fuse in the single business logic layer is zero, and the fuse recovery time is before the current time, indicating that the fuse expires but the update is not executed, and the update of the first buffer memory is immediately triggered asynchronously, and then the API is forwarded to the corresponding resource pool gateway.
5. According to claim 1, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: Before receiving the API request, the resource pool gateway queries the second buffer memory according to the routing rules to obtain the corresponding number of API failures within the sliding window time, the API failure rate within the sliding window time, the circuit breaker weight of a single API, the circuit breaker flag and the circuit breaker recovery time.
6. According to claim 5, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: After the API request is read, the total weight threshold of the circuit breaker and the circuit breaker recovery time in the single business logic layer in the second buffer memory are obtained. If the total weight threshold of the circuit breaker in the single business logic layer is zero and the circuit breaker recovery time is after the current time, the resource pool gateway directly rejects the API. Otherwise, the API is forwarded to the corresponding business logic layer.
7. According to claim 6, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: The total weight threshold of the circuit breaker in the single business logic layer is zero, and the circuit breaker recovery time is before the current time, indicating that the circuit breaker has expired but no update has been performed, and the number of API failures within the sliding window time and the API failure rate within the sliding window time of the corresponding routing rule in the second buffer memory are immediately updated.
8. According to claim 7, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: When the second buffer memory is updated, an API failure number threshold and an API failure rate threshold are obtained, and the API failure number and the API failure rate within the sliding window time are compared respectively. When the API failure number within the sliding window time is greater than the API failure number threshold and the API failure rate within the sliding window time is greater than the API failure rate threshold, the circuit breaker flag and the fuse recovery time in the second buffer memory are updated; Among them, the updated circuit breaker mark is blown, and the blown recovery time is obtained by offsetting the current time according to the sliding window length.
9. According to claim 1, an API fuse method based on hierarchical dynamic feedback and multi-factor decision-making is characterized by: The step of determining a trigger instruction according to the output result of the evaluation model comprises: Get the circuit breaker weight of a single API with the circuit breaker flag set to circuit breaker, and mark it as the parameter to be evaluated; Calling an evaluation function from the evaluation model; Input the parameters to be evaluated into the evaluation model to obtain the total weight of the APIs that have been blown in a single business logic layer; If the total weight of the fused APIs in the single business logic layer is greater than or equal to the weight of the single business logic layer The total weight threshold of the circuit breaker generates a trigger instruction to trigger the circuit breaker; If the total weight of the APIs that have been blown in the single business logic layer is less than the total weight threshold of the single business logic layer blown, a trigger instruction for triggering the restoration of the blown circuit is generated, and the circuit breaker flag is updated to normal.
10. An API fusing system based on hierarchical dynamic feedback and multi-factor decision-making, applied to the API fusing method based on hierarchical dynamic feedback and multi-factor decision-making according to any one of claims 1 to 9, characterized in that: include: A first acquisition module, the first acquisition module is used to acquire a two-level gateway in the microservice architecture, the two-level gateway including a national region gateway and a resource pool gateway; A statistics module, which is used to obtain statistical information of each API, including the number of failures of the API within the sliding window time, the failure rate of the API within the sliding window time, the circuit breaker weight of a single API, the circuit breaker flag, and the circuit breaker recovery time, wherein the circuit breaker flag includes circuit breaker and normal; A second acquisition module, the second acquisition module is used to build a high-speed cache memory according to the statistical information of the API, and the high-speed cache memory includes a first buffer memory and a second buffer memory; An evaluation module is used to update the total weight of the APIs that have been blown in a single business logic layer in the first buffer memory based on statistical information, and then input it into the evaluation model, and determine the trigger instruction based on the output result of the evaluation model, wherein the trigger instruction includes triggering the blown circuit or triggering the blown circuit recovery.
Citation Information
Patent Citations
Service fusing method based on sliding time window
CN111552587A
Load balancing system based on dynamic weight
CN112217894A
Dynamic weight service routing method based on API (Application Program Interface) gateway
CN114666336A
Service calling control method and device for preventing micro-service avalanche and storage medium
CN114996041A
API fusing degradation implementation method and system based on back-end error code
CN115065588A
Cited By
Distributed application full-link hierarchical monitoring method and system
CN122507591A
