High-availability intelligent micro-service governance system and method

Through intelligent detection and intelligent link tracking mechanism, we dynamically adjust the micro -service governance strategy, solve the problem that the microservices governance is not applicable in high -concurring scene, and realize the high availability and reliability of the system.

CN119363798AInactive Publication Date: 2025-01-24CHONGQING TIANZHIQI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411382816.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing microservice governance methods are not applicable in high concurrency scenarios, which makes it difficult to guarantee system availability, reliability and maintainability. The traditional circuit breaker methods cannot be effectively adjusted when the nodes are actually unavailable, which may lead to a service avalanche.

Method used

The multi -indicator data of the intelligent detection mechanism is used to dynamically collect service nodes, calculate the weight of performance consumption, and automatically adjust the service calling path in a high concurrency environment through the intelligent heavy connection and melting heavy connection mechanism. At the same time, calculate the concurrent peak data of each service node through the intelligent link tracking mechanism, and dynamically adjust the maximum concurrent amount and current limit/relegation strategy.

Benefits of technology

It improves the availability and reliability of the system, avoids waste of resources, ensures the stability and maintainability of the service in the high concurrency environment, and can dynamically adjust the strategy to cope with real -time changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363798A_ABST
    Figure CN119363798A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a high-availability intelligent micro-service governance method, which comprises the following steps of: intelligently detecting and dynamically acquiring multi-index data of each service node, and calculating a performance consumption weight of each service node; when the called service node is abnormal or the service instance is not available, calling a new service node or service instance through an intelligent reconnection mechanism or a fusing reconnection mechanism of intelligent detection; link tracking: calculating concurrency difference supported by each service node in combination with the recorded interface condition of the called service node, generating concurrency data of each service node, and calculating concurrency peak data of a single service; according to single service concurrency peak value data, the maximum concurrency peak value of each service dynamic state is obtained through intelligent detection and calculation; according to the intelligent micro-service management method with an intelligent detection mechanism, high availability of the service is ensured, and the actual highest concurrency of the service can be accurately evaluated, so that the maximum concurrency of the service and overall current limiting and degradation configuration are dynamically adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a highly available intelligent microservice governance system and method. Background Art

[0002] With the rapid development of the Internet industry, the demand for business scenarios such as microservices, high availability, and high concurrency is increasing. The technical architecture has undergone multiple upgrades from traditional vertical monolithic applications to RPC frameworks and then to the current microservice architecture. Microservice architecture is a design pattern for subdividing large and complex systems. It achieves the stability, efficiency, and scalability of the overall architecture through service splitting, business orchestration, and lightweight communication. At present, the architecture has been successfully applied to core systems in the fields of telecommunications, Internet, and finance. For a long time in the future, microservices will represent the mainstream technical direction and will become the first choice for medium and large systems in all walks of life.

[0003] However, the microservice architecture creates a mesh topology relationship between microservices. In this mode, the distributed communication mechanism greatly increases the complexity of function implementation, and is accompanied by problems such as difficulty in positioning and debugging. The stable operation of this architecture is highly dependent on network conditions. Failure of some nodes in the link may affect the global service quality. How to improve the availability, reliability and maintainability of the system is a major challenge in system construction.

[0004] The traditional microservice governance solution is to detect whether the service is available by heartbeat. The problem is that when the service node is abnormal, the service call failure will be prompted by the fuse method, and the caller needs to initiate a request again or multiple times to complete the business call. Each request involves a complete call link such as the service gateway, service discovery, and service node, and the link tracking service records each call log, resulting in a waste of computing resources such as gateways, services, and routing. However, when the heartbeat is normal, the node may be actually unavailable due to CPU and memory overload or network bandwidth reaching the peak. In this case, the traditional fuse method does not adjust the business processing rules accordingly. In a high-concurrency environment, the caller may continue to call the node service, causing the request to be unreachable, or even causing a service avalanche. For the log tracking of nodes between services, although the call log is recorded, the real-time call concurrency is not further calculated, resulting in the inability to accurately evaluate the actual maximum concurrency of the service and the inability to adjust the current limiting, degradation and other strategies of the overall service in a timely manner. Summary of the invention

[0005] The present invention aims to provide a highly available intelligent microservices governance system and method to solve the technical problem that existing microservices governance methods are not suitable for high-concurrency scenarios.

[0006] The basic solution provided by the present invention is: a highly available intelligent microservice governance method, comprising:

[0007] S100: Intelligent detection, dynamically collect multi-index data of each service node, and calculate the performance consumption weight of each service node; the multi-index data includes CPU consumption, memory consumption, bandwidth consumption and concurrent data of a single service node of link tracking;

[0008] S200: When the calling service node is abnormal, reconnect and allocate a highly available service node through the intelligent reconnection mechanism of intelligent detection; when calling an unavailable service instance under the service node, call a new service instance under the service node once through the fuse reconnection mechanism of intelligent detection;

[0009] S300: Link tracking, combining the recorded status of each interface of the called service node, calculating the concurrency difference that each service node can support, generating concurrency data for each service node, and calculating the peak concurrency data of a single service;

[0010] S400: Based on the concurrent peak data of a single service, intelligent detection and calculation are performed to obtain the dynamic maximum concurrent peak of each service to dynamically adjust the service operation data; the operation data includes the maximum concurrent volume and the overall current limiting and degradation configuration.

[0011] The present invention is based on a highly available intelligent microservice governance method and also provides a highly available intelligent microservice governance system to solve the technical problem that existing microservice governance methods are not suitable for high-concurrency scenarios.

[0012] The system includes: the system includes a registration center module, an intelligent detection module and an intelligent link tracking module;

[0013] The registration center module is used for registration services;

[0014] The intelligent link tracking module is used to combine the recorded interface conditions of the called service nodes, calculate the concurrency difference that each service node can support, generate the concurrency data of each service node, and calculate the peak concurrency data of a single service;

[0015] The intelligent detection module is used to dynamically collect multi-index data of each service node and calculate the performance consumption weight of each service node; the multi-index data includes CPU consumption, memory consumption, bandwidth consumption and link tracking data of a single service node; it is also used to reconnect and allocate a highly available service node through an intelligent reconnection mechanism when a service node is called abnormally; it is also used to call a new service instance under the service node once through a fuse reconnection mechanism when an unavailable service instance under the service node is called; it is also used to intelligently detect and calculate the dynamic maximum concurrency peak of each service based on the concurrency peak data of a single service, so as to dynamically adjust the service operation data; the operation data includes the maximum concurrency and the overall current limiting and degradation configuration.

[0016] The working principle and advantages of the present invention are: compared with the prior art, this solution deeply explores the high-concurrency scenario characteristics of microservices, and proposes a new intelligent detection mechanism and intelligent link tracking mechanism for the service node status under the microservice architecture. Through the intelligent detection mechanism, the CPU consumption, memory consumption, bandwidth consumption, and concurrent data of a single node of the link tracking of the node are calculated, and the weight ratio of each node is calculated to obtain the maximum concurrent peak value of each service dynamic, detect the actual availability of the service node, and ensure that the called service is truly available through the intelligent reconnection mechanism: when a single called node is unavailable, it is automatically routed to other available nodes to complete the service call; through the fuse reconnection mechanism: it is guaranteed that one call can meet the business requirements, avoid multiple calls when the service is available, and save resource consumption from the gateway to the service. Through the intelligent link tracking mechanism under the microservice architecture, the concurrency of the called service is tracked, and the peak data of a single service is calculated through an algorithm, providing data support for intelligent detection and calculation of the total peak value of the service, which is used to dynamically adjust the maximum concurrency of the business service and the overall current limiting / downgrading strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of the intelligent microservice governance architecture provided by an embodiment of the present invention;

[0018] Figure 2 A flowchart of a highly available intelligent microservices governance method provided by an embodiment of the present invention;

[0019] Figure 3 A schematic diagram of an optimization mechanism for a highly available intelligent microservice governance method provided by an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of the intelligent link tracking process provided by an embodiment of the present invention;

[0021] Figure 5 A schematic diagram of the flow of the fuse reconnection mechanism provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following is a further detailed description through specific implementation methods:

[0023] The embodiment is basically as shown in the attached Figure 1 Shown: A highly available intelligent microservice governance system, including a registration center module, an intelligent detection module and an intelligent link tracking module.

[0024] like Figure 2 and Figure 3 As shown, based on the above modules, a highly available intelligent microservice governance method is implemented, and the method includes the following steps:

[0025] S100: Intelligent detection, dynamically collect multi-index data of each service node, and calculate the performance consumption weight of each service node; the multi-index data includes CPU consumption, memory consumption, bandwidth consumption and concurrent data of a single service node of link tracking;

[0026] S200: When the called service node is abnormal, reconnect and allocate a highly available service node through the intelligent reconnection mechanism of intelligent detection; when calling an unavailable service instance under the service node, call a new service instance under the service node once through the fuse reconnection mechanism of intelligent detection;

[0027] S300: Link tracking, combining the recorded status of each interface of the called service node, calculating the concurrency difference that each service node can support, generating concurrency data for each service node, and calculating the peak concurrency data of a single service;

[0028] S400: Based on the concurrent peak data of a single service, intelligent detection and calculation are performed to obtain the dynamic maximum concurrent peak of each service, so as to dynamically adjust the operating data of each service; the operating data includes the maximum concurrent volume, overall current limiting and degradation configuration.

[0029] Specifically,

[0030] The registration center module is used by microservices to register their own addresses and port information, and maintains the correspondence between service names and service instances. It is the foundation of microservices. Each service is independent and deeply decoupled from each other. Through the registration center, communication between services becomes simple. The main core functions are:

[0031] 1. Service registration: The client registers its own service to the server by sending a REST request and providing its own metadata, such as IP address, port and other information. After receiving the registration request, the server stores the metadata information in a double-layer memory map in the form of a registered service list.

[0032] 2. Service discovery: When a service consumer calls a service provided by a service provider, it will send a REST request to the server to obtain the corresponding registration service list of the REST request and cache it locally. At the same time, a scheduled task will be started on the local client to regularly pull the latest registration service list information from the server and update it to the local cache to ensure the timeliness of service updates. During the service call process, in order to verify the availability of the service node, the weight of the service node is used as the basis for judgment. The weight of each service node is calculated through the intelligent detection service module, and the weight of all nodes is regularly pushed to the registration center through the message queue for update and storage.

[0033] The intelligent detection module collects multi-indicator data of each service node, calculates the weight ratio of different service nodes based on the multi-indicator data of the service nodes, and provides highly available service nodes for subsequent automatic reconnection and allocation of available nodes.

[0034] Specifically, the multi-index data includes CPU consumption, memory consumption, bandwidth consumption, and concurrent data of a single service node of link tracking.

[0035] Collect multi-indicator data from each service node, use Linux's top command to display the dynamics of the process, and then filter out the CPU usage. 100 minus the CPU usage is the remaining CPU occupancy. Then connect to the MySQL database and output the data to the database. Use crontab for regular statistics to complete the operation of regularly sampling the CPU indicators of each node. Similarly, use the free command to view the memory occupancy rate, use crontab for regular statistics, and then output it to the database. Use the iftop command to view bandwidth usage, where TX represents the sending traffic, RX represents the receiving traffic, TOTAL represents the total traffic, PEAK represents the traffic peak, etc. Use crontab for regular statistics and then output it to the database.

[0036] An interface call is initiated to the link tracking module by sending a REST request. The parameters (mainly CPU, memory, maximum concurrency, etc.) are the unique identifier of the service instance (each service node has one or more service instances). The maximum concurrency of this service instance is obtained through the interface. In order to combine this indicator data with a service instance, a cyclic matching process is performed at the business layer, and the indicator data is added to the successfully matched service instance.

[0037] In this embodiment, based on the CRITIC weight algorithm, the performance consumption weight ratio of any service node N in the cluster is calculated, and the comparison strength of the indicators and the conflict between the indicators are used to comprehensively measure the objective weight of the indicators. Considering the variability of the indicators while taking into account the correlation between the indicators, it is not that the larger the number, the more important it is. It is necessary to fully utilize the objective attributes of the data itself for scientific evaluation. The comparison strength refers to the size of the difference between the values ​​of the same indicator among the evaluation schemes, which is expressed in the form of standard deviation. The larger the standard deviation, the greater the fluctuation, that is, the greater the value difference between the schemes, the higher the weight will be; the conflict between the indicators is expressed by the correlation coefficient. If there is a strong positive correlation between the two indicators, it means that the smaller the conflict, the lower the weight will be. For the CRITIC weight algorithm, when the standard deviation is constant, the smaller the conflict between the indicators, the smaller the weight; the greater the conflict, the greater the weight; in addition, when the degree of positive correlation between the two indicators is greater, (the closer the correlation coefficient is to 1), the smaller the conflict, which indicates that the information reflected by the two indicators on the pros and cons of the evaluation scheme is more similar.

[0038] Through the CRITIC weight algorithm, the indicators of different service nodes can be imagined as a two-dimensional table data. Assuming that there are m nodes and n indicators, the performance consumption weight ratio of the calculation nodes is as follows:

[0039] (1) Construct the original data matrix X

[0040]

[0041] Each factor is normalized according to the number of options, where X ij Represents the value of the j-th index of the i-th node.

[0042] For positive indicators:

[0043]

[0044] For negative indicators:

[0045]

[0046] Calculate the indicator difference and express it in the form of standard deviation, S j Represents the standard deviation of the jth indicator:

[0047]

[0048] In the CRITIC method, standard deviation is used to represent the difference fluctuation of the internal values ​​of each indicator. The larger the standard deviation, the greater the numerical difference of the indicator, the more information can be reflected, the stronger the evaluation strength of the indicator itself, and more weight should be assigned to the indicator.

[0049] Calculation indicator conflict:

[0050] Expressed in the form of correlation coefficient, r ij Represents the correlation coefficient between evaluation indicators i and j:

[0051]

[0052] The correlation coefficient is used to represent the correlation between indicators. The stronger the correlation with other indicators, the less conflict there is between the indicator and other indicators. The more the same information is reflected, the more repetitive the evaluation content will be. This will weaken the evaluation strength of the indicator to a certain extent, and the weight assigned to this indicator should be reduced.

[0053] Calculate the amount of information:

[0054]

[0055] C j The larger it is, the greater the role of the j-th evaluation index in the entire evaluation index system, and more weight should be assigned to it.

[0056] Calculate weights:

[0057] The objective weight W of the jth indicator j Calculation formula:

[0058]

[0059] The performance consumption weight of a service node can be calculated in the above way. The larger the weight value, the greater the performance consumption of the current node. On the contrary, the smaller the weight value, the smaller the performance consumption of the current node. When reconnecting and allocating, it is considered to be a highly available service node.

[0060] When the called service node is abnormal, intelligent detection reconnects and allocates a highly available service node through an intelligent reconnection mechanism. The intelligent reconnection mechanism relies on the intelligent detection module. When an exception occurs when calling a service node (regardless of whether there are available or unavailable service instances under the service node, the service node can no longer be called), other available service nodes are provided, and based on the service node weight, a highly available service node is automatically allocated and reconnected; in this embodiment, the service node with a small weight is intelligently allocated according to the performance consumption weight and continues to be called to ensure the high availability of the service.

[0061] When an unavailable service instance under the service node is called, intelligent detection allocates a new service instance under the service node through the fuse reconnection mechanism. The fuse reconnection mechanism uses a one-time call method to fuse and reconnect and allocate a new highly available service instance under the service node based on the performance consumption weight of the service node and the multi-indicator threshold of the called service.

[0062] The fuse reconnection mechanism is based on the intelligent detection module. When an unavailable service instance is called, the service fuse is optimized, such as Figure 5 As shown, the calling steps are as follows:

[0063] Step 1: Read the relevant thresholds of the circuit breaker configuration, which mainly involve parameters such as CPU, memory, and maximum concurrency. The obtained multi-indicator thresholds are used as parameters to call the weight calculation interface of the intelligent detection module to calculate the multi-indicator threshold weights.

[0064] Step 2: When the interface requests the corresponding service, the number of calls is used as the basis for parameter encapsulation before the request interface arrives. If the number of calls is 0, a unique request id is generated for all interfaces through the CachedUidGenerator algorithm as a request parameter and stored in Redis. The id is used as the key value, and the body content of the current interface is parsed as the value (if it involves an authorization interface, token, cookie and other related information must be added), and the expiration time is 30 seconds. If the number of calls is greater than or equal to 1, the corresponding request parameters are obtained through Redis according to the key, and the body is repackaged to continue to complete the interface request.

[0065] Step 3: When the service instance is found to be unavailable after routing to the corresponding service node, if there are multiple service instances in the service node, the service consumer reads other available instances of the current service node locally, and pulls the performance consumption weights of all service instances through the intelligent detection module, and compares them with the multi-indicator threshold weights in the first step. If the instance weight is closer to the threshold weight, it means that the instance performance consumption is relatively large, and vice versa. The current request is intelligently distributed to the service instance with a smaller weight through the load balancing in the intelligent detection, and the interface is cyclically requested under the set maximum number of fuses.

[0066] The link tracking module generates concurrent model data of the service node through the OpenTracing algorithm, and provides the intelligent detection module with the real concurrent data model of the node.

[0067] In distributed systems, especially microservice systems, an external request often requires multiple internal modules, multiple middleware, and multiple machines to call each other to complete. In order to quickly locate problems in a distributed architecture, the intelligent link tracking in this solution restores a distributed request to a call link, performs log recording, performance monitoring, and centrally displays the call status of a distributed request. For example, the time consumed on each service node, which machine the request specifically reaches, and the request status of each service node. It provides complete call link restoration, call request volume statistics, link topology, application dependency analysis, etc., which can help the intelligent detection module quickly analyze and diagnose performance bottlenecks under the distributed application architecture and improve the development and diagnosis efficiency of microservices.

[0068] Specifically, Figure 4 As shown in the figure, the smart link tracking process is as follows:

[0069] 1. The client application reports the service call data through the JAVA client SDK with integrated link tracking.

[0070] 2. After the data is reported to the link tracking console, the link tracking component performs real-time aggregation calculation and persistence to form monitoring data such as link details, performance overview, and real-time topology. The monitoring data of link tracking is mainly used to track and analyze the complete call path of a request from the source to the end point in a distributed system, including call sequence, time consumption, call status (success or failure), and other information.

[0071] 3. The call chain data can be connected to downstream systems, such as the intelligent detection system to provide call service instance performance analysis, or third-party programs such as zipkin, etc., for offline analysis, alarm and other scenarios. It helps developers understand the interaction process within the system, quickly locate and solve problems, and optimize system performance.

[0072] The main functions of link tracking are as follows:

[0073] 1. Client data collection: Based on the OpenTracing standard, it is fully compatible with mainstream link tracing systems and implements the OpenTracing data model, which mainly includes the following three:

[0074] Trace: A complete request link.

[0075] Span: A calling process (needs a start time and end time).

[0076] SpanContext: Trace's global context information, such as traceId. The thread context safe communication technology of this solution can ensure a complete data record and flow to downstream services. The traceId of this solution uses the extended snowflow algorithm to generate a unique id, and its characteristics are as follows:

[0077] The distributed ID generation algorithm has a total of 64 bits. The first bit is 0, which is the flag bit. In binary numbers, the first bit is 0, which represents a positive number. The next 41 bits are a 13-bit millisecond timestamp, which can be up to September 2039. The next 10 binary bits are workID, which is the server ID, which is expanded to the service name and instance ID hash value. The last 12 bits are the business sequence number, which is expanded to the request interface sequence number.

[0078] The core data collection events include:

[0079] cs (Client Send): The client sends a request, starting the life cycle of a request.

[0080] sr (Server Received): The server accepts the request and processes it; sr-cs = network delay = service call time.

[0081] ss (Server Send): The server has completed processing and is ready to send to the client; ss-sr = request processing time on the server.

[0082] cr (Client Received): The client receives the response from the server and the request ends; cr-sr = total request time.

[0083] 2. Data analysis on the server side: Distributed call chain query and diagnosis: Track all microservice user requests in the distributed architecture and aggregate them into distributed call chains. Real-time application performance aggregation: By tracking user requests across the entire application, the individual services and resources that make up the application are aggregated in real time.

[0084] The core service node performance analysis algorithm in this solution has the following characteristics:

[0085] The first step is to use an approximation algorithm to calculate the maximum connection of the node service. The least squares approximation algorithm is as follows:

[0086]

[0087] in is the arithmetic mean of the t values. It can also be solved as follows:

[0088]

[0089] In this solution, the total input interface time is the total number of interface requests tr*single interface time (cr). When (cr) is greater than 200ms, the request is considered a low-performance request. By multiplying the growth of the number of requests tr and the time consumed after the growth:

[0090] tr*(cr)(tr*tr)(cr*rcr)

[0091] Calculate the increase in request latency caused by the increase in the number of available interfaces:

[0092]

[0093] The second step is to calculate the actual delay of the instance interface by weight as follows:

[0094]

[0095] Considering that the execution strategies and time consumption of different interfaces may be different, the weighting factor parameter k is defined using the upper-layer input parameters. Finally, the parameter input of the client link tracking collected by the input parameters in a given time period is used to output the growth line of the instance performance.

[0096] 3. Downstream docking scenario: The collected links can be directly used for log analysis and can be connected to downstream analysis platforms such as intelligent detection systems.

[0097] This embodiment provides a highly available intelligent microservice governance system and method, which deeply explores the characteristics of high-concurrency scenarios of microservices, and proposes an intelligent detection mechanism and intelligent link tracking mechanism for the status of service nodes under a new microservice architecture. Through the intelligent detection mechanism, the data of the CPU consumption, memory consumption, bandwidth consumption, and link tracking of a single node of the node are used to calculate the weight ratio of each node, and the maximum concurrent peak value of each service is obtained. The actual availability of the service node is detected to ensure the real availability of the called service through the intelligent reconnection mechanism: when a single called node is unavailable, it is automatically routed to other available nodes to complete the service call; through the fuse reconnection mechanism: it is guaranteed that one call can meet the business requirements, avoid multiple calls when the service is available, and save resource consumption from the gateway to the service. Through the intelligent link tracking mechanism under the microservice architecture, the concurrency of the called service is tracked, and the peak data of a single service is calculated through an algorithm to provide data support for intelligent detection and calculation of the total peak value of the service, which is used to dynamically adjust the maximum concurrency of the business service and the overall current limiting / degradation strategies.

[0098] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field are aware of all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement the scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for the ordinary technicians in the relevant field to implement this application. It should be pointed out that for the technicians in this field, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent.

Claims

1. A highly available intelligent microservice governance method, characterized in that: include: S100: Intelligent detection, dynamically collect multi-index data of each service node, and calculate the performance consumption weight of each service node; the multi-index data includes CPU consumption, memory consumption, bandwidth consumption and concurrent data of a single service node of link tracking; S200: When the calling service node is abnormal, reconnect and allocate a highly available service node through the intelligent reconnection mechanism of intelligent detection; when calling an unavailable service instance under the service node, call a new service instance under the service node once through the fuse reconnection mechanism of intelligent detection; S300: Link tracking, combining the recorded status of each interface of the called service node, calculating the concurrency difference that each service node can support, generating concurrency data for each service node, and calculating the peak concurrency data of a single service; S400: Based on the concurrent peak data of a single service, intelligent detection and calculation are performed to obtain the dynamic maximum concurrent peak of each service to dynamically adjust the service operation data; the operation data includes the maximum concurrent volume and the overall current limiting and degradation configuration.

2. A highly available intelligent microservice governance method according to claim 1, characterized in that: The intelligent reconnection mechanism is to automatically allocate to a service node with a small weight based on the performance consumption weight of the service node.

3. A highly available intelligent microservice governance method according to claim 1, characterized in that: The fuse reconnection mechanism uses a one-time call method to fuse and reconnect to call a new service instance under the service node based on the performance consumption weight of the service node and the multi-indicator threshold weight of the called service.

4. A highly available intelligent microservice governance method according to claim 1, characterized in that: In S100, the weight of each service node is calculated based on the CRITIC weight algorithm, wherein the service node with a smaller weight is a highly available service node.

5. A highly available intelligent microservice governance method according to claim 1, characterized in that: In S400, the steps of fuse-breaking and reconnecting to call a new service instance under the service node include: Step 1: Get the multi-indicator thresholds of the circuit breaker configuration, and use them as parameters to call the weight calculation interface of the intelligent detection to calculate the multi-indicator threshold weights; Step 2: When the interface requests the corresponding service node, the number of calls is used as the basis for determining the parameter encapsulation before the request interface arrives; Step 3: When an unavailable service instance is found when routing to the corresponding service node, if there are multiple service instances on the service node, obtain the instance weight of each service instance, and intelligently distribute the current request to the new service instance according to the preset method by comparing the instance weight and the multi-indicator threshold weight. Perform a cyclic request on the interface under the set maximum number of fuses.

6. A highly available intelligent microservice governance method according to claim 5, characterized in that: In step 2, if the number of calls is 0, a unique request id is generated for all interfaces through the CachedUidGenerator algorithm as a request parameter and stored in Redis. The id is used as the key value, the body content of the current interface is parsed as the value, and the expiration time is set.

7. A highly available intelligent microservice governance method according to claim 6, characterized in that: If the number of calls is greater than or equal to 1, the corresponding request parameters are obtained through Redis according to the key, and the body is repackaged to continue to complete the interface request.

8. A highly available intelligent microservice governance method according to claim 5, characterized in that: In step 3, the preset method is that if the instance weight is closer to the multi-indicator threshold weight, it means that the corresponding service instance has a large performance consumption. Through intelligent detection, the current request is intelligently allocated to the service instance with a small instance weight.

9. A highly available intelligent microservice governance method according to claim 1, characterized in that: In S400, the intelligent detection initiates an interface call to the link tracking by sending a REST request, obtains the maximum concurrency of the service instance through the interface, performs a cyclic matching process at the business layer, and increases the indicator data for the successfully matched service instance.

10. A highly available intelligent microservices governance system, characterized in that: A highly available intelligent microservice governance method applied to any one of claims 1-9; the system comprises a registration center module, an intelligent detection module and an intelligent link tracking module; the registration center module is used for registering services; The intelligent link tracking module is used to combine the recorded interface conditions of the called service nodes, calculate the concurrency difference that each service node can support, generate the concurrency data of each service node, and calculate the peak concurrency data of a single service; The intelligent detection module is used to dynamically collect multi-index data of each service node and calculate the performance consumption weight of each service node; the multi-index data includes CPU consumption, memory consumption, bandwidth consumption and link tracking data of a single service node; it is also used to reconnect and allocate a highly available service node through an intelligent reconnection mechanism when a service node is called abnormally; it is also used to call a new service instance under the service node once through a fuse reconnection mechanism when an unavailable service instance under the service node is called; it is also used to intelligently detect and calculate the dynamic maximum concurrency peak of each service based on the concurrency peak data of a single service, so as to dynamically adjust the service operation data; the operation data includes the maximum concurrency and the overall current limiting and degradation configuration.

Citation Information

Cited By

  • High-concurrency communication service platform and method

    CN120455524A