Method for evaluating health of micro-service system and related device
By analyzing and configuring the weights of microservices in a microservice system, the problem of accurately assessing the health of a microservice system in existing technologies is solved, and a more accurate health assessment is achieved.
Patent Information
- Application Number
- CN202210874744.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-07-25
AI Technical Summary
Existing technologies cannot comprehensively consider the impact of each microservice on the overall microservice system, making it difficult to accurately assess the health of the microservice system.
By analyzing each microservice, we can obtain dependency analysis results, failure frequency, and functional information. We can then configure weights for weighted summation, classify them into levels, measure the level ratios, and assess the health of the microservice system.
It enables accurate assessment of the health of microservice systems, taking into account the differences between various microservices and improving the accuracy of the assessment.
Smart Images

Figure CN115168224B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to the technical field of microservices, and in particular to a method and related equipment for assessing the health of a microservice system. Background Technology
[0002] In monitoring a microservice system composed of multiple microservices, the severity of failures varies because each microservice has a different impact on the overall microservice system.
[0003] In the relevant methods for assessing the health of microservice systems, it is difficult to assess the overall health of the microservice system based on the currently running microservices without comprehensively considering the impact of each microservice on the overall microservice system.
[0004] Therefore, a solution is needed that can comprehensively consider the different impacts of various microservices to determine a more accurate health status. Summary of the Invention
[0005] In view of this, the purpose of this application is to propose a method and related equipment for assessing the health of a microservice system.
[0006] To achieve the above objectives, this application provides a method for assessing the health of a microservice system, which is applied to a microservice system including multiple microservices and application monitoring tools.
[0007] The method includes:
[0008] By analyzing each of the microservices, the analysis information of the microservice is obtained;
[0009] Based on the analysis information, determine the extent of the impact on the overall microservice system when the microservice fails;
[0010] All the microservices are divided into multiple levels based on the degree of impact.
[0011] The current health of the microservice system itself is determined by measuring the proportion of the microservices at each of the aforementioned levels.
[0012] Furthermore, by analyzing each of the microservices, analytical information for each microservice is obtained, including:
[0013] For each of the aforementioned microservices, perform the following operations:
[0014] The dependencies between this microservice and other microservices are analyzed to obtain the dependency analysis results;
[0015] Determine the failure frequency of the microservice based on the acquired historical data;
[0016] Determine the function performed by the microservice;
[0017] The obtained dependency analysis results, failure frequency, and functionality are persistently stored as analysis information.
[0018] Furthermore, the dependencies between this microservice and other microservices are analyzed, yielding dependency analysis results, including:
[0019] Collect the workflow of each task being executed between the microservices, and determine the topology between the microservices based on the workflow;
[0020] Based on the topology, determine the number of other microservices that depend on this microservice and the number of threads occupied by these other microservices;
[0021] The dependency analysis results are obtained by combining the number of other microservices and the number of threads.
[0022] Furthermore, based on the analysis information, the extent of the impact on the overall microservice system when the microservice fails is determined, including:
[0023] Configure fault frequency weights for the fault frequencies;
[0024] Configure dependency weights for the dependency analysis results;
[0025] Configure function weights for the aforementioned functions;
[0026] The failure frequency, the dependency analysis results, and the function are summed according to the frequency weight, the dependency weight, and the function weight to obtain a value indicating the degree of influence of the microservice.
[0027] Furthermore, based on the degree of impact, all the microservices are divided into multiple levels, including:
[0028] For each of the microservices, perform the following operation:
[0029] If the value of the impact level of the microservice is greater than or equal to the preset criticality threshold, the microservice is classified as a critical service.
[0030] If the value of the impact level of the microservice is less than the preset criticality threshold, the microservice is classified as a non-critical service.
[0031] Furthermore, by measuring the proportion of microservices at each of the aforementioned levels, the current health of the microservice system itself is determined, including:
[0032] The level of each microservice is determined by intercepting requests to each of the current microservices.
[0033] If the proportion of microservices that respond to critical services is greater than or equal to a preset first health threshold, the current health of the microservice system itself is assessed as the first level.
[0034] If the proportion of microservices responding to critical services is less than a preset first health threshold and greater than or equal to a preset second health threshold, the current health of the microservice system itself is assessed as level two.
[0035] If the proportion of microservices responding to critical services is less than a preset second health threshold, the current health of the microservice system itself is assessed as level three.
[0036] Furthermore, intercepting requests from each of the aforementioned microservices includes:
[0037] Based on the configured application performance monitoring tool, the probes of the application performance monitoring tool are used to perform end-to-end performance monitoring on the specified microservice in order to intercept requests from the microservice.
[0038] Based on the same inventive concept, this application also provides a microservice system health assessment device, applied to a microservice system, which includes multiple microservices and application monitoring tools;
[0039] The device includes: an analysis module, an impact level determination module, a level classification module, and a health level determination module;
[0040] The analysis module is configured to obtain analysis information of each microservice by analyzing each of the microservices.
[0041] The impact determination module is configured to determine the impact of a failure of the microservice on the overall microservice system based on the analysis information.
[0042] The level classification module is configured to divide all the microservices into multiple levels according to the degree of impact.
[0043] The health determination module is configured to determine the current health of the microservice system itself by measuring the proportion of the microservices at each of the aforementioned levels.
[0044] Based on the same inventive concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the microservice system health assessment method as described in any of the above.
[0045] Based on the same inventive concept, this application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the microservice system health assessment method described above.
[0046] As can be seen from the above, the microservice system health assessment method and related equipment provided in this application are based on the analysis of each microservice in the microservice system to obtain the degree of influence of each microservice on the overall microservice system. It can be seen that the determination of the degree of influence of each microservice is essentially a comprehensive consideration of the differences of each microservice, and the determination of the differences from the analysis information, so as to specifically determine the degree of influence of each microservice.
[0047] Furthermore, the microservices are categorized according to their impact and their relative importance is measured by weights. This allows the health assessment to comprehensively consider the impact of different microservices, resulting in a more accurate health assessment. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 A flowchart illustrating a method for assessing the health of a microservice system according to an embodiment of this application;
[0050] Figure 2 This is a schematic diagram of the structure of a microservice system health assessment device according to an embodiment of this application;
[0051] Figure 3 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0053] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0054] As described in the background section, the existing methods for assessing the health of microservice systems are still insufficient to meet the monitoring needs of the overall microservice system in practical applications.
[0055] In the process of implementing this application, the applicant discovered that the main problem with the relevant microservice system health assessment method is that, in the monitoring of a microservice system composed of multiple microservices, the severity of failures varies because each microservice has a different impact on the overall microservice system.
[0056] In other words, when a certain microservice is critical to the entire microservice system, such as the registry service, its failure will affect the operation of the entire microservice system and may even cause the microservice system to crash. However, other microservices, such as the file server, will not affect the operation of the overall microservice system after failure, but will only affect the upload and download functions.
[0057] It can be seen that without comprehensively considering the impact of each microservice on the overall microservice system, it is difficult to assess the health of the overall microservice system based on the currently running microservices.
[0058] Based on this, one or more embodiments in this application provide a method for assessing the health of a microservice system, which assesses the overall health of the microservice system based on the differences between individual microservices.
[0059] The embodiments of this application are described in detail below with reference to the accompanying drawings.
[0060] refer to Figure 1 This application discloses a method for assessing the health of a microservice system, which is applied to a microservice system and includes the following steps:
[0061] Step S101: By analyzing each of the microservices, the analysis information of the microservice is obtained.
[0062] In the embodiments of this application, an existing microservice system is used, which includes: multiple microservices and application monitoring tools.
[0063] As a concrete example, this microservice system can be built on the Skywalking framework, which is an open-source system framework that logically has four parts: probes, platform backend, storage objects, and user interface.
[0064] Furthermore, the operating environment of this microservice system can be a Java runtime environment, and in some embodiments, it can also run on a Java Virtual Machine.
[0065] In this embodiment, the microservices in the microservice system can be, for example, a service registration and discovery component that provides registry center services, a web server that provides services for handling web client requests such as browsers, a file server that provides upload and download services, and a gateway that provides network interconnection services, etc.
[0066] In this embodiment, it can be run in the Java Virtual Machine as a plugin and by loading an application performance monitoring tool.
[0067] Based on this, information related to all plugins, i.e. all microservices, can be collected and analyzed using the Skywalking framework.
[0068] Furthermore, by analyzing each microservice, we can obtain the dependency analysis results, failure frequency, and functionality of that microservice.
[0069] Specifically, the process of analyzing the dependencies between various microservices includes:
[0070] In this embodiment, based on the existing microservice system, the workflow for each microservice when performing various tasks is determined.
[0071] Each workflow represents the logical rules by which the microservice organizes itself in relation to other microservices when performing tasks.
[0072] Furthermore, the obtained workflow can be exported as a JSON (Object Spectrum) file. This JSON file specifically describes the topology of the workflow. It can be seen that the workflow can specifically determine the calling logic and interaction logic between each microservice when executing tasks.
[0073] Furthermore, based on this topology, the dependencies between this microservice and other microservices can be determined under this task. In other words, when a microservice performs its task, it must rely on the services provided by other microservices to complete the task performed by the microservice.
[0074] Based on the aforementioned topology, for a given microservice, other microservices that depend on that microservice can be specifically identified.
[0075] Furthermore, the number of other microservices that depend on this microservice and the number of threads occupied by these other microservices can be specifically determined.
[0076] As can be seen, the number of other microservices that depend on this microservice indicates the number of microservice systems affected when this microservice fails.
[0077] Furthermore, the number of threads used by other microservices can indicate the impact of a failure of that microservice on the overall microservice system.
[0078] As can be seen, the number of microservices affected mentioned above is considered in this embodiment to reflect the local impact of each microservice; the number of threads of the affected microservice system is considered in this embodiment to reflect the overall impact of the microservice system.
[0079] Based on this, it is necessary to further integrate the local and overall effects, and use the integrated result as the result of dependency analysis.
[0080] In this embodiment, the number of affected microservices and the number of threads in the affected microservice system can be integrated by setting local impact factor weights and overall impact factor weights.
[0081] Specifically, the value of the dependency analysis result can be calculated using the following formula:
[0082]
[0083] Where I represents the value of the calculated dependency analysis result, I1 represents the number of microservices affected, and I2 represents the number of threads affected. φ represents the weight of the local impact factor, and φ represents the weight of the overall impact factor.
[0084] In this embodiment, the weights of the local impact factor and the overall impact factor can be determined based on the impact of the two on the entire microservice system from the historical data obtained in advance, or they can be set according to the specific actual situation.
[0085] In this embodiment, as described above, the analysis of each microservice also includes determining the failure frequency of that microservice.
[0086] Specifically, historical data on the microservice's execution of various tasks over a historical period can be obtained. This historical data can be used to determine the number of failures of the microservice during that historical period, and further, the failure frequency of the microservice can be obtained.
[0087] In this embodiment, as described above, the analysis of each microservice also includes determining the functions performed by each microservice.
[0088] Specifically, as mentioned above, each microservice can be set up as a plugin in the Skywalking framework. Therefore, based on the loading of application performance monitoring tools, the specific functions performed by the corresponding microservices can be determined through the APIs (Application Programming Interfaces) of each plugin.
[0089] Furthermore, it is necessary to quantify the importance of the functions it performs in order to perform the calculations for the following steps.
[0090] In this embodiment, the determination can be based on the specific tasks run by the microservice system, the overall framework of the microservice system, or other specific circumstances.
[0091] For example, if the function performed by the microservice is service registration and discovery, it can be considered an important function, and its importance level can be set to 1. If the function performed by the microservice is to provide upload and download services, it can be considered an unimportant function, and its importance level can be set to 0.1.
[0092] Furthermore, for each microservice, the aforementioned dependency analysis results, failure frequency, and executed functions can be used together as the analysis information for that microservice.
[0093] Furthermore, the analysis information is persistently stored in the corresponding memory object.
[0094] Step S102: Determine the degree of impact on the overall microservice system when the microservice fails based on the analysis information.
[0095] In the embodiments of this application, based on the dependency analysis results, failure frequency and functions performed by each microservice obtained from the above analysis, the impact of the microservice on the overall microservice system can be further evaluated.
[0096] Specifically, for this microservice, weights can be assigned to dependency analysis results, failure frequency, and functional configuration, respectively, and the impact of this microservice on the overall microservice system can be measured through these weights.
[0097] Specifically, dependency weights are configured for dependency analysis results, failure frequency weights are configured for failure frequencies, and function weights are configured for functions.
[0098] Furthermore, the impact of this microservice on the overall microservice system is calculated using the weighted summation method shown below:
[0099] F=I×α+J×β+K×γ
[0100] Where F represents the degree of impact, J represents the failure frequency, and K represents the degree of importance of the function performed by the microservice.
[0101] Step S103: Divide all the microservices into multiple levels according to the degree of impact.
[0102] In the embodiments of this application, for each microservice, based on the importance value calculated above, the microservices set in the microservice framework can be divided into multiple levels to distinguish each microservice from its criticality.
[0103] Specifically, a critical threshold can be set for each microservice, and this critical threshold can be compared with the importance value of each microservice to divide all microservices into two levels.
[0104] Furthermore, when the importance value of any microservice is greater than or equal to the aforementioned criticality threshold, the microservice can be classified as a critical service.
[0105] Furthermore, if the importance value of any microservice is less than the aforementioned criticality threshold, then the microservice can be classified as a non-critical service.
[0106] It can be seen that microservices classified as critical services are those that have a significant impact on the overall microservice system when they fail, while microservices classified as non-critical services are those that have a relatively small impact on the overall microservice system when they fail.
[0107] In some other embodiments, multiple thresholds can be set to divide each microservice into more granular levels.
[0108] Step S104: Determine the current health of the microservice system itself by measuring the proportion of the microservices at each level.
[0109] In the embodiments of this application, based on the levels of each microservice obtained above, the overall microservice system can be evaluated for health in real time.
[0110] Specifically, application performance monitoring tools in a microservice framework can monitor each microservice through probes. In particular, for any request sent by a microservice, the application performance monitoring tool can identify the microservice that sent the request after the probe intercepts the current request.
[0111] Furthermore, based on the level of the microservice determined in the above steps, the current level of the microservice can be determined.
[0112] In this embodiment, the microservice system can run one or more microservices at any given time. Therefore, the task requests of the microservices currently being intercepted can also be multiple. In other words, the levels of the multiple microservices currently running can be determined.
[0113] Furthermore, based on the level of all currently running microservices, the current health of the overall microservice system can be determined by identifying the ratio of critical to non-critical services.
[0114] Furthermore, corresponding thresholds can be set for the ratio of critical services to non-critical services. For example, a critical service ratio of 60% can be set as the first health threshold, and a critical service ratio of 90% can be set as the second health threshold.
[0115] Furthermore, based on the first and second health thresholds set above, the current health status of the microservice system can be assessed.
[0116] Specifically, the health of a microservice system can be assessed into three different levels based on the two health thresholds mentioned above.
[0117] Specifically, when the proportion of microservices classified as critical services is less than a preset first health threshold, the current health of that microservice system can be assessed as Level 1.
[0118] When the proportion of microservices classified as critical services is greater than or equal to the preset first health threshold and less than or equal to the preset second health threshold, the current health of the microservice system can be assessed as level two.
[0119] When the proportion of microservices classified as critical services exceeds the preset second health threshold, the current health of the microservice system can be assessed as level three.
[0120] It can be seen that if there are more microservices at the critical service level, the overall microservice system will be more affected and at higher risk when encountering microservice failures; while if there are more microservices at the non-critical service level, the overall microservice system will be less affected and at lower risk when encountering microservice failures.
[0121] In some embodiments, based on the proportion of critical services, different scores can be assessed for different health levels and displayed in the Skywalking framework's user interface.
[0122] Specifically, the proportion of critical services can be directly used as the health assessment score, and different colors can be displayed according to different health levels when showing this score.
[0123] Specifically, when the proportion of critical services is less than 60%, their scores can be displayed in blue; when the proportion of critical services is between 60% and 90%, their scores can be displayed in orange; and when the proportion of critical services is greater than 90%, their scores can be displayed in red, so that users of the microservice system can intuitively and in real time know the current health status of the microservice system.
[0124] As can be seen, the microservice system health assessment method of the embodiments of this application is based on analyzing each microservice in the microservice system to obtain the degree of influence of each microservice on the overall microservice system. It can be seen that judging the degree of influence of each microservice is essentially a comprehensive consideration of the differences of each microservice, and the difference is determined from the analysis information to specifically determine the degree of influence of each microservice.
[0125] Furthermore, the microservices are categorized according to their impact and their relative importance is measured by weights. This allows the health assessment to comprehensively consider the impact of different microservices, resulting in a more accurate health assessment.
[0126] It should be noted that the method of the embodiments of this application can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of the embodiments of this application, and the multiple devices will interact with each other to complete the method described.
[0127] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0128] Based on the same inventive concept, and corresponding to the methods of any of the above embodiments, the embodiments of this application also provide a device for evaluating the health of a microservice system.
[0129] refer to Figure 2 The microservice system health assessment device is applied to a microservice system, which includes multiple microservices and application monitoring tools; the device includes: an analysis module 201, an impact degree determination module 202, a level classification module 203, and a health determination module 204.
[0130] The analysis module 201 is configured to obtain analysis information of each of the microservices by analyzing them.
[0131] The impact determination module 202 is configured to determine the impact of a failure of the microservice on the overall microservice system based on the analysis information.
[0132] The level division module 203 is configured to divide all the microservices into multiple levels according to the degree of influence.
[0133] The health determination module 204 is configured to determine the current health of the microservice system itself by measuring the proportion of the microservices at each of the aforementioned levels.
[0134] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.
[0135] The apparatus described above is used to implement the corresponding microservice system health assessment method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0136] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the microservice system health assessment method as described in any of the above embodiments.
[0137] Figure 3 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0138] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0139] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this application are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0140] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0141] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0142] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0143] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this application, and not necessarily all the components shown in the figures.
[0144] The apparatus described above is used to implement the corresponding microservice system health assessment method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0145] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the microservice system health assessment method as described in any of the above embodiments.
[0146] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0147] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the microservice system health assessment method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0148] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0149] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0150] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0151] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
Claims
1. A method for assessing the health of a microservice system, characterized in that, Applied to microservice systems, which include multiple microservices and application monitoring tools; The method includes: By analyzing each of the microservices, the analysis information of the microservice is obtained; Based on the analysis information, determine the extent of the impact on the overall microservice system when the microservice fails; All the microservices are divided into multiple levels based on the degree of impact. The current health of the microservice system itself is determined by measuring the proportion of the microservices at each of the aforementioned levels. The step of analyzing each of the microservices to obtain analysis information for each microservice includes: For each of the aforementioned microservices, perform the following operations: The dependencies between this microservice and other microservices are analyzed to obtain the dependency analysis results; Determine the failure frequency of the microservice based on the acquired historical data; Determine the function performed by the microservice; The obtained dependency analysis results, failure frequency, and functionality are persistently stored as analysis information. The step of determining the impact of a microservice failure on the overall microservice system based on the analysis information includes: Configure fault frequency weights for the fault frequencies; Configure dependency weights for the dependency analysis results; Configure function weights for the aforementioned functions; The failure frequency, the dependency analysis results, and the function are summed according to the frequency weight, the dependency weight, and the function weight to obtain a value indicating the degree of influence of the microservice.
2. The method according to claim 1, characterized in that, The process of analyzing the dependencies between this microservice and other microservices to obtain dependency analysis results includes: Collect the workflow of each task being executed between the microservices, and determine the topology between the microservices based on the workflow; Based on the topology, determine the number of other microservices that depend on this microservice and the number of threads occupied by these other microservices; The dependency analysis results are obtained by combining the number of other microservices and the number of threads.
3. The method according to claim 1, characterized in that, The process of categorizing all microservices into multiple levels based on the degree of impact includes: For each of the microservices, perform the following operation: If the value of the impact level of the microservice is greater than or equal to the preset criticality threshold, the microservice is classified as a critical service. If the value of the impact level of the microservice is less than the preset criticality threshold, the microservice is classified as a non-critical service.
4. The method according to claim 3, characterized in that, The process of determining the current health of the microservice system by measuring the proportion of microservices at each of the aforementioned levels includes: The level of each microservice is determined by intercepting requests to each of the current microservices. If the proportion of microservices responding to critical services is less than a preset first health threshold, the current health of the microservice system itself is assessed as level one. If the proportion of microservices classified as critical services is greater than or equal to a preset first health threshold and less than or equal to a preset second health threshold, the current health of the microservice system itself is assessed as level two. If the proportion of microservices classified as critical services exceeds a preset second health threshold, the current health of the microservice system itself is assessed as level three.
5. The method according to claim 4, characterized in that, The interception of requests from each of the current microservices includes: Based on the configured application performance monitoring tool, the probes of the application performance monitoring tool are used to perform end-to-end performance monitoring on the specified microservice in order to intercept requests from the microservice.
6. A device for assessing the health of a microservice system, characterized in that, The apparatus is applied to the method of claim 1, wherein the apparatus is applied to a microservice system, the microservice system comprising multiple microservices and application monitoring tools; The device includes: an analysis module, an impact level determination module, a level classification module, and a health level determination module; The analysis module is configured to obtain analysis information of each microservice by analyzing each of the microservices. The impact determination module is configured to determine the impact of a failure of the microservice on the overall microservice system based on the analysis information. The level classification module is configured to divide all the microservices into multiple levels according to the degree of impact. The health determination module is configured to determine the current health of the microservice system itself by measuring the proportion of the microservices at each of the aforementioned levels.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Micro-service monitoring method, device and equipment and computer readable storage medium
CN111176955A
Micro-service health degree evaluation method and device
CN112491585A