A microservice link tracking and performance analysis method, system, device and application
By combining service logs and probes with microservice link tracking and performance analysis methods, the complexity and cost of microservice link monitoring and performance analysis in the prior art are solved, and dynamic monitoring and rapid troubleshooting are achieved. Reduces operation and maintenance complexity and cost.
Patent Information
- Application Number
- CN202111237797.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-10-22
AI Technical Summary
Existing software systems based on microservice architecture cannot dynamically monitor the service links and require manual participation, resulting in system instability, complex operation and maintenance, and high cost and time-consuming in fault analysis and performance optimization.
Provide a microservice link tracking and performance analysis method. By combining service logs and probes, the complete link of requests and responses is analyzed in real time, and the link is comprehensively evaluated, supporting a variety of integration methods, non-invasive, and able to Track the status of microservices in real time and alert them.
It realizes dynamic monitoring and performance analysis of microservice links, reduces operation and maintenance complexity and cost, can quickly locate faults and optimize performance, and ensures smooth operation of services.
Smart Images

Figure CN113946499B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network monitoring services, and in particular relates to a microservice link tracking and performance analysis method, system, device and application. Background Art
[0002] At present, traditional microservice architecture generally achieves the expected goals by having operation and maintenance personnel analyze the performance of the server's memory, network, and disk during fault analysis or performance optimization. This method requires manual intervention, which increases the probability of analysis errors. It also affects service business requests during the analysis period, causing user requests during this period to fail, affecting business operations.
[0003] With the continuous development of information technology, the Internet has become an indispensable tool in life and work. With more and more Internet services, how to effectively and reasonably monitor and optimize various complex network services has always been a problem. Microservice architecture is currently a widely used and widely used software service architecture. Microservices have good interface specifications and convenient service governance methods to improve software development efficiency and usage efficiency.
[0004] Prior art 1: CN202010347906.6 A software continuous integration method based on microservice architecture. The present invention discloses a software continuous integration method based on microservice architecture, which belongs to the field of Internet software development, and is used for the delivery of software development to software testing. It solves the problems of poor efficiency of software continuous integration, easy compilation failure before project delivery and testing, and no automated testing function in the development process of existing software projects, which affects the project release and deployment; it includes the following steps: first, build and configure the Jenkins CI platform, then build a microservice engineering package Job1 on the Jenkins CI platform, label the packaged microservice installation package and upload it to the installation package warehouse, then arrange and store the microservice installation package according to the dimension of the project version, and perform digital verification through the MD5 algorithm, then build a package deployment test environment Job2 with parameters on the Jenkins CI platform, and finally output the test environment release list; so that a high degree of continuous integration can be achieved when the project is delivered and tested, thereby improving the work efficiency of software development and testing.
[0005] Prior art 2: CN201911000437.4 Software authorization verification method, terminal and software authorization system under microservice architecture. The present application discloses a software authorization verification method, terminal and software authorization system under a microservice architecture. The method is applied to any one of a plurality of terminals connected to the software authorization system, and the plurality of terminals are respectively used to implement different functions of software based on a microservice architecture. The method comprises: when a function call instruction is received, calling the software authorization system to verify the stored authorization information; if the software authorization system passes the verification of the authorization information, it is confirmed that the legal authorization is obtained; and executing the operation indicated by the function call instruction. The present application can solve the problem of distributed software authorization verification that is difficult to implement with the current stand-alone authorization verification method.
[0006] Prior Art Three: Research on Service Discovery and Service Reliability Based on Microservice Architecture_Xu Kangming. A system designed based on microservice architecture consists of many small services that communicate with each other through the network. Each service has a separate software development life cycle, and each service depends on each other. Although there are many studies on microservice architecture, there are still some problems. These include excessive service discovery delays and insufficient accuracy; the description of the service quality of a single service is not comprehensive enough; there are many errors in the operation of services in a dynamic environment and they cannot be adjusted in real time. In the modeling research of microservice architecture, the current dependency graph generation scheme has the problems of being inconvenient and low in accuracy; the current service fault tree model does not consider the problem of error tolerance and the actual execution of the system. In the study of service risks, the existing service risk calculation model does not consider the impact of different probabilities of system execution paths on the final calculation results.
[0007] This paper mainly studies service reliability, service discovery, system reliability modeling, system service risk, and service recovery in microservice architecture. The results are summarized as follows:
[0008] (1) The problem of service operation reliability in the microservice architecture is studied. This paper proposes a QoS calculation model with custom parameters for calculating service quality, which can be used to evaluate the service operation status. An adaptive service model is designed based on the service operation status to achieve the goals of service error tolerance and throughput improvement during service operation. In this experimental environment, the QoS calculation model and adaptive service model proposed in this paper increased the success rate of service operation by 3.87% and the throughput by 18.7%.
[0009] (2) This paper studies the service discovery problem in microservice architecture, how to model the dependencies between applications, and how to use these models to analyze the reliability of microservice architecture systems. This paper proposes a solution for automatically generating dependency graphs and improves the service fault tree model, which is then used for system reliability analysis. Experimental results show that the service fault tree model can effectively analyze the reliability of microservice architecture systems. When the improved fault tree model is used to analyze the system failure rate, the accuracy is improved to a certain extent, and the accuracy is increased by 4.53% in the experimental environment.
[0010] (3) Services in the microservice architecture have the characteristics of independent deployment. How to efficiently monitor and manage these services is an important issue. If service failures are only solved during deployment or runtime, it will often lead to a large number of failed tasks. Therefore, the prediction and recovery of service failures are equally important. This paper improves the error recovery scheme based on service risk. By applying the improved scheme, risk services can be removed before a large number of failures occur, thereby avoiding the occurrence of continuous errors. Experimental results show that the improved service risk calculation model and error recovery scheme can improve the robustness of the system and reduce the waste of system resources caused by the error recovery scheme.
[0011] However, software systems based on microservice architecture have the following problems:
[0012] (1) The service link cannot be dynamically monitored and requires manual intervention, which can easily cause system instability and increase the complexity of system operation and maintenance.
[0013] (2) Visualization is poor, and it is often necessary to view service call information through logs.
[0014] (3) It is impossible to determine how many instances each microservice needs to run, resulting in some services being overloaded, affecting the maximum number of concurrent user requests, while some services are underloaded but still occupy resources, increasing IT costs.
[0015] (4) When a service encounters a low-level failure or performance problem, human intervention is required for analysis, which is costly and takes a long time to restore the service to normal, affecting the business and preventing customers from trading, resulting in economic losses.
[0016] Through the above analysis, the problems and defects of the prior art are as follows:
[0017] (1) Existing software systems based on microservice architecture cannot dynamically monitor service links and require manual intervention, which can easily cause system instability and increase the complexity of system operation and maintenance.
[0018] (2) The existing software systems based on microservice architecture have poor visualization.
[0019] (3) Existing software systems based on microservice architecture cannot determine how many instances of each microservice need to run, resulting in some services being overloaded, affecting the maximum number of concurrent user requests, while some services are underloaded but still occupy resources, increasing IT costs.
[0020] (4) When low-level failures or performance issues occur in existing software systems based on microservice architecture, human intervention is required for analysis, which is costly and takes a long time to restore the service to normal, affecting the business process, preventing customers from trading, and causing economic losses.
[0021] The difficulty of solving the above problems and defects is: relatively high.
[0022] The significance of solving the above problems and defects is: under the premise of not affecting the normal business transaction application, the complete link information can be displayed in time, so that the complete link of a request can be visualized, and the faults and problems in the link can be discovered in time, and it can help customers estimate how much hardware resources the application service needs or warn customers when resources are scarce. It can greatly reduce the problem of business application suspension caused by resource failures during normal operation, and ensure that business services can run smoothly for a long time. Summary of the invention
[0023] In view of the problems existing in the prior art, the present invention provides a microservice link tracking and performance analysis method, system, device and application.
[0024] The present invention is implemented as follows: a microservice link tracking and performance analysis method, which is based on a microservice architecture and provides a variety of integration methods for microservices. Microservices can be integrated into this system according to the actual environment and hardware conditions; there is no intrusion into microservices, and microservices can be combined with service logs and probes to analyze the complete link of requests and responses in real time, and conduct a comprehensive evaluation of the link.
[0025] Furthermore, the microservice can be combined with the service log to implement the method including:
[0026] By analyzing the information output in the log, the following information can be output in the log: time, current service information, memory usage, CPU usage, etc. This method is an aspect-oriented programming idea. The complete link information is recorded according to the execution time or sequence mark output in the log, and other indicators are analyzed to record the completed performance monitoring.
[0027] Furthermore, the microservice can be combined with the probe to implement the method including:
[0028] After jdk1.5, javaAgent technology was introduced. JavaAgent is an interceptor before the running method. Using javaAgent and ASM bytecode technology, when JVM loads the class binary file, ASM is used to dynamically modify the loaded class file, and a timer function is added before and after the monitored method to calculate the time-consuming monitoring method. At the same time, the method time-consuming and internal call conditions are put into the processor. The processor uses the first-in-last-out characteristics of the stack to process the method call sequence. After a request is processed, the time-consuming method track and the input parameter map are output to the file, and then the time-consuming business to be captured by the present invention is distinguished according to the key code in the corresponding parameters or time-consuming method track in the map. Finally, the corresponding time-consuming track file is taken down, converted into XML format and parsed, and the code hierarchical structure is displayed through the browser to facilitate time-consuming analysis.
[0029] Furthermore, the microservice link tracking and performance analysis method performs performance analysis on the service, and can push the indicator data of the microservice to the server in real time through the probe, thereby analyzing the request and response of the link in real time, tracking the status of the microservice in real time, and comprehensively evaluating the link.
[0030] Furthermore, the microservice link tracking and performance analysis method specifically includes:
[0031] The first step is to monitor the operating status of microservices and related indicator data of the operating environment;
[0032] The second step is to monitor the complete request link of the microservice and perform record analysis;
[0033] The third step is to judge the analysis results. If they do not meet the set threshold range, an alarm is issued through the alarm microservice.
[0034] Furthermore, the monitoring of the complete request link of the microservice and the recording and analysis have three modes for complete link monitoring of the microservice: log analysis method, introduction of jar package method, and Http method; the link information is sent to the microservice monitoring module end; the microservice monitoring module end evaluates and scores the complete link in real time based on the information, and divides the indicators of the link into real-time quality levels. The Top 5 with slow response will be displayed on the interface, and the indicators that are not within the threshold range will notify the alarm microservice to issue an alarm.
[0035] Furthermore, when using the log analysis method, the user selects the log of the service to be analyzed through the management interface, thereby restoring the complete link information.
[0036] Furthermore, when using the Http method, all requests to the microservice are recorded through the probe and the complete link information is restored.
[0037] Furthermore, by using the jar package method, performance or problem monitoring can be extended to the function level.
[0038] Furthermore, the algorithm for the evaluation score is as follows: it is necessary to obtain the indicator information related to a microservice instance request; under the premise that the response status is 200, requests with a response time of less than 100 milliseconds are satisfactory requests; requests with a response time of more than 100 milliseconds and less than 3 seconds are tolerable requests, and requests with a response time of more than 3 seconds are unsatisfactory requests, and requests with a response status other than 200 are uniformly classified as unsatisfactory requests;
[0039] The evaluation score calculation model is:
[0040] Evaluation score = (number of satisfied requests + (number of dissatisfied requests / 2)) / total number of requests*100;
[0041] Quality grade classification: Based on the inventory data as of the previous day, the quality grade is divided into four response grades: A, B, C, and D;
[0042] Grade A is: the total time taken for all satisfactory responses of an endpoint within one minute / the number of all satisfactory requests. The final calculation result is a response time. Response times that are less than or equal to this response value are classified as Grade A. This grade is marked green on the visual interface.
[0043] B level is: the total time consumption of the top 30 responses that an endpoint can tolerate within one minute / the total number of the top 30 requests that can be tolerated. The final calculation result is a response time. Response times that are less than or equal to this response value are classified as B level. This level is marked in blue on the visual interface;
[0044] The C level is: the total time consumption of the top 70 responses that an endpoint can tolerate within one minute / the total number of the top 70 requests that can be tolerated. The final calculation result is a response time. The response time that is less than or equal to this response value is classified as C level. This level is marked in light red on the visual interface;
[0045] D level: All response times greater than C level are recorded as D level; this level is marked in red on the visual interface.
[0046] Another object of the present invention is to provide a microservice processing device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: based on the microservice architecture, a variety of integration methods are provided for microservices, and microservices can be integrated into the system according to the actual environment and hardware conditions; there is no intrusion on the microservices, and the microservices can be combined with service logs and probes to analyze the complete link of requests and responses in real time, and conduct a comprehensive evaluation of the link.
[0047] Another object of the present invention is to provide a microservice link tracking and performance analysis system for implementing the microservice link tracking and performance analysis method, wherein the microservice link tracking and performance analysis method comprises:
[0048] Microservice operation module, used to monitor the operating status of microservices and related indicator data of the operating environment;
[0049] Microservice monitoring module, used to monitor the complete request link of microservices and perform record analysis;
[0050] The microservice alarm module is used to judge the analysis results. If it does not meet the set threshold range, an alarm is issued through the alarm microservice.
[0051] Another object of the present invention is to provide an application of the microservice link tracking and performance analysis method in a microservice architecture.
[0052] Combining all the above technical solutions, the advantages and positive effects of the present invention are as follows: the present invention is based on the microservice architecture and provides a variety of integration methods for microservices; microservices can be integrated into the system according to the actual environment and hardware conditions without any intrusion into the microservices, and microservices can be combined with service logs and probes to analyze the complete link of requests and responses in real time, and conduct a comprehensive evaluation of the link. The present invention provides reference and optimization of microservices for development and operation and maintenance personnel, provides function-level execution performance analysis, and enables microservices to perform rapid performance analysis and troubleshooting in a production environment with zero impact on the business.
[0053] This system provides a complete method for online environment service link tracking and performance analysis. The system supports three integration methods. During integration, there is no intrusion on microservices, and in the process of monitoring link information, it does not affect the user experience. It can ensure that the link information analysis of the service is met without occupying too much system resources, thereby improving the overall operation and maintenance capabilities of the system and saving IT costs for enterprises.
[0054] At the same time, the system supports the performance analysis function of online environment services, automatically displaying low-performance services, endpoints, and functions without the need for manual intervention, and the entire upgrade process has no obvious impact on system performance.
[0055] The system's microservice expansion and contraction and microservice upgrades are zero-intrusive to microservice business development. Microservice business developers do not need to worry about service expansion and contraction and service upgrades, and all links do not need to add new code or new configuration parameters for these functions. It is friendly to software developers.
[0056] Compared with the prior art, the present invention has the following advantages:
[0057] (1) Zero service failure: All service requests and responses can be monitored.
[0058] (2) Zero-intrusion: All links are zero-intrusive to developers. Developers do not need to worry about the implementation details of microservice scaling and microservice upgrades, and do not need to introduce any code logic related to these functions in code development.
[0059] (3) High real-time performance: All aspects of the system are designed with real-time performance in mind. Complete link information, performance analysis results, scores, and other information can be viewed on the microservice management module page within a few seconds.
[0060] (4) High concurrency support: All aspects of the system take into account the performance bottlenecks that may arise in actual applications, and adopt technologies such as real-time database, microservices, and containerization to smoothly and elastically expand the large amount of data generated by high concurrency, achieving TPS business performance support for a concurrency scale of 100,000. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of the microservice link tracking and performance analysis method provided by an embodiment of the present invention.
[0062] Figure 2 It is a structural diagram of a microservice link tracking and performance analysis system provided by an embodiment of the present invention;
[0063] Figure 2 In: 1. Microservice operation module; 2. Microservice monitoring module; 3. Microservice alarm module. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0065] In view of the problems existing in the prior art, the present invention provides a microservice link tracking and performance analysis method and system, which is described in detail below in conjunction with the accompanying drawings.
[0066] like Figure 1 As shown, the microservice link tracking and performance analysis method provided by the present invention includes the following steps:
[0067] S101: Monitor the operating status of microservices and related indicator data of the operating environment;
[0068] S102: monitor the complete request link of the microservice and perform record analysis;
[0069] S103: By judging the analysis result, if it does not meet the set threshold range, an alarm is issued through the alarm microservice.
[0070] Log-based: By analyzing the information output in the log, the following information can be output in the log: time, current service information, memory usage, CPU usage, etc. This method is an aspect-oriented programming idea. The complete link information is recorded according to the execution time or sequence mark output in the log, and other indicators are analyzed to record the completed performance monitoring.
[0071] Based on the probe: javaAgent technology was introduced after jdk1.5, and javaAgent is an interceptor before running the method. The present invention utilizes javaAgent and ASM bytecode technology. When JVM loads the class binary file, ASM is used to dynamically modify the loaded class file, and a timer function is added before and after the monitored method to calculate the time consumption of the monitored method. At the same time, the method time consumption and internal call status are put into the processor. The processor uses the first-in-last-out feature of the stack to process the method call sequence. When a request is processed, the time-consuming method track and the input parameter map are output to the file, and then the time-consuming business to be captured by the present invention is distinguished according to the corresponding parameters in the map or the key code in the time-consuming method track. Finally, the corresponding time-consuming track file is taken down, converted into XML format and parsed, and the code hierarchy structure is displayed through the browser to facilitate time-consuming analysis.
[0072] Java probe tool features:
[0073] ①Support method execution time-consuming range capture setting, and capture the code running trajectory that appears in the set time-consuming range when the system is running according to the time-consuming range.
[0074] ②Supports the capture of specific code configurations, facilitates the capture of specific configuration methods, and filters out the time-consuming execution of related code.
[0075] ③Support APP layer entry method filtering, configure the method before entry operation for monitoring, which is equivalent to monitoring the time consumption of specific methods and conducting method-specific analysis.
[0076] ④Supports the input method parameter output function, which is convenient for tracking the corresponding input parameters when the time consumption is high.
[0077] ⑤ Provide WEB page display interface time display, code call relationship diagram display, method time percentage display, and suspicious method highlighting function.
[0078] To perform performance analysis on services, the indicator data of microservices can be pushed to the server in real time through probes, so as to analyze the requests and responses of the links in real time, track the status of microservices in real time, such as JVM information, link time consumption, link abnormality, status of other nodes under the same service, etc., and conduct a comprehensive evaluation of the links.
[0079] Ordinary technicians in the industry can also use other steps to implement the microservice link tracking and performance analysis method provided by the present invention. Figure 1 The microservice link tracking and performance analysis method provided by the present invention is only a specific embodiment.
[0080] like Figure 2 As shown, the microservice link tracking and performance analysis provided by the present invention includes:
[0081] The microservice operation module 1 is used to monitor the operating status of the microservice and the relevant indicator data of the operating environment.
[0082] Microservice monitoring module 2 is used to monitor the complete request link of the microservice and perform record analysis.
[0083] The microservice alarm module 3 is used to judge the analysis result, and if it does not meet the set threshold range, an alarm is issued through the alarm microservice.
[0084] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0085] The microservice monitoring module of the present invention has three modes for complete link monitoring of microservices: log analysis mode, introduction of jar package mode, and Http mode. When using the log analysis mode, the user selects the log of the service to be analyzed through the management interface to restore the complete link information. When using the Http mode, all requests for the microservice are recorded and the complete link information is restored through the probe. If the jar package mode is used, it can be extended to function-level performance or problem monitoring. In all of the above three modes, the link information will be sent to the microservice monitoring module end. The microservice monitoring module end will evaluate and score the complete link in real time based on this information, and divide the indicators of the link into real-time quality levels. The Top5 with slow response will be displayed on the interface, and the indicator notification alarm microservice will be alerted for indicators that are not within the threshold range.
[0086] In the present invention, the evaluation scoring algorithm is as follows: it is necessary to obtain the indicator information related to a microservice instance request, such as response time, response status, and TPS number. Under the premise that the response status is 200, requests with a response time of less than 100 milliseconds are satisfactory requests, requests with a response time of more than 100 milliseconds and less than 3 seconds are tolerable requests, and requests with a response time of more than 3 seconds are unsatisfactory requests. Requests with a response status other than 200 are uniformly classified as unsatisfactory requests.
[0087] The evaluation score calculation model is:
[0088] Evaluation score = (number of satisfied requests + (number of dissatisfied requests / 2)) / total number of requests * 100
[0089] Quality grade classification: Based on the inventory data as of the previous day, the quality grade is divided into four response levels: A, B, C, and D.
[0090] Grade A is: the total time taken for all satisfactory responses of an endpoint within one minute / the number of all satisfactory requests. The final calculation result is a response time. Response times that are less than or equal to this response value are classified as Grade A. This grade is marked green on the visual interface.
[0091] Grade B is: the total time consumption of the top 30 responses that an endpoint can tolerate within one minute / the total number of the top 30 requests that can be tolerated. The final calculation result is a response time. Response times that are less than or equal to this response value are classified as Grade B. This grade is marked in blue on the visual interface.
[0092] The C level is: the total time consumed by the top 70 responses that an endpoint can tolerate within one minute / the total number of the top 70 requests that can be tolerated. The final calculation result is a response time. Response times that are less than or equal to this response value are classified as C level. This level is marked in light red on the visual interface.
[0093] D level: All response times greater than C level are recorded as D level. This level is marked in red on the visual interface.
[0094] The quality grade needs to be recalculated daily, and the grade value needs to be continuously corrected to make the score more accurate under massive data.
[0095] Performance analysis: For indicators that trigger alarm thresholds, they are displayed in the form of cards on the visual interface, and the background color of the cards is displayed in light red. Clicking the card will display the request information of each node in the link, such as service name, endpoint name, response time, and display the indicator data of the A-level standard under the same indicator. For more detailed function-level performance analysis, mark the line of code that takes the longest time in the function.
[0096] Conduct real-time analysis of full-link information and service performance, and continuously and automatically optimize the score levels, providing high-quality optimization reference solutions for operation and maintenance and development personnel.
[0097] Microservices: Microservices are an architectural style where a large, complex software application consists of one or more microservices. Each microservice in the system can be deployed independently and is loosely coupled. Each microservice focuses on completing a task and does it well. In all cases, each task represents a small business capability.
[0098] Microservice instance: Each microservice can be provided to the outside by one or more applications. Each application is called an instance of a microservice. Multiple instances generally provide the microservice to the outside through a load balancer in a round-robin manner.
[0099] TPS: Queries Per Second means "query rate per second", which is the number of queries a server can respond to per second. It is a measure of the amount of traffic a specific query server can handle within a specified time. TPS is the abbreviation of Transactions Per Second, which means transactions per second. It is a unit of measurement for software test results.
[0100] It should be noted that the embodiments of the present invention can be implemented by software. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0101] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A microservice link tracking and performance analysis method, characterized in that: The microservice link tracking and performance analysis method is based on the microservice architecture and provides a variety of integration methods for microservices. Microservices can be integrated into the system according to the actual environment and hardware conditions. There is no intrusion into microservices. Microservices can combine service logs and probes to analyze the complete link of requests and responses in real time and conduct a comprehensive evaluation of the link. The implementation method of the microservice being able to combine with the probe includes: After JDK 1.5, JavaAgent technology was introduced. JavaAgent is an interceptor before running methods. By using JavaAgent and ASM bytecode technology, when JVM loads class binary files, ASM is used to dynamically modify the loaded class files, and timer functions are added before and after the monitored methods to calculate the time consumption of the monitored methods. At the same time, the method time consumption and internal call conditions are put into the processor. The processor uses the first-in-last-out feature of the stack to process the method call sequence. When a request is processed, the time-consuming method track and the input parameter map are output to the file, and then the time-consuming business to be captured is distinguished according to the corresponding parameters in the map or the key code in the time-consuming method track; finally, the corresponding time-consuming track file is taken down, converted into XML format and parsed, and the code hierarchical structure is displayed through the browser to facilitate time-consuming analysis; There are three modes for monitoring the complete request link of microservices and recording and analyzing them. The complete link monitoring of microservices is carried out in the following ways: log analysis, introduction of jar package and Http. The link information is sent to the microservice monitoring module. The microservice monitoring module evaluates and scores the complete link in real time based on the information, and divides the link indicators into real-time quality levels. The interface will be displayed for the top 5 with slow response, and the alarm microservice will be notified for indicators that are not within the threshold range. When using the log analysis method, users select the log of the service to be analyzed through the management interface to restore the complete link information. When using the Http method, all requests of the microservice are recorded and the complete link information is restored through the probe. When using the jar package method, the function level performance or problem monitoring can be extended. The evaluation score algorithm is as follows: it is necessary to obtain the indicator information related to a microservice instance request; under the premise that the response status is 200, requests with a response time of less than 100 milliseconds are satisfactory requests; requests with a response time of more than 100 milliseconds and less than 3 seconds are tolerable requests, and requests with a response time of more than 3 seconds are unsatisfactory requests. Requests with a response status other than 200 are uniformly classified as unsatisfactory requests; The evaluation score calculation model is: Evaluation score = (number of satisfied requests + (number of dissatisfied requests / 2)) / total number of requests*100.
2. The microservice link tracking and performance analysis method according to claim 1, characterized in that: The microservice can be combined with the service log to implement the method including: By analyzing the information output in the log, the following information can be output in the log: time, current service information, memory usage, CPU usage, etc. This method is an aspect-oriented programming idea. The complete link information is recorded according to the execution time or sequence mark output in the log, and other indicators are analyzed to record the completed performance monitoring.
3. The microservice link tracking and performance analysis method according to claim 1, characterized in that: The microservice link tracking and performance analysis method performs performance analysis on the service, and can push the indicator data of the microservice to the server in real time through the probe, thereby analyzing the request and response of the link in real time, tracking the status of the microservice in real time, and comprehensively evaluating the link.
4. The microservice link tracking and performance analysis method according to claim 1, characterized in that: The microservice link tracking and performance analysis method specifically includes: The first step is to monitor the operating status of microservices and related indicator data of the operating environment; The second step is to monitor the complete request link of the microservice and perform record analysis; The third step is to judge the analysis results. If they do not meet the set threshold range, an alarm is issued through the alarm microservice.
5. A microservice processing device, characterized in that: The microservice processing device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the microservice link tracking and performance analysis method according to any one of claims 1 to 4.
6. A microservice link tracking and performance analysis system for implementing the microservice link tracking and performance analysis method according to any one of claims 1 to 4, characterized in that: The microservice link tracking and performance analysis system includes: Microservice operation module, used to monitor the operating status of microservices and related indicator data of the operating environment; Microservice monitoring module, used to monitor the complete request link of microservices and perform record analysis; The microservice alarm module is used to judge the analysis results. If it does not meet the set threshold range, an alarm is issued through the alarm microservice.
Citation Information
Patent Citations
Software authorization verification method under micro-service architecture, terminal and software authorization system
CN110826028A
Software continuous integration method based on micro-service architecture
CN111552644A
Machine learning-based intelligent distributed call chain tracking method
CN108205486A
Micro-service link monitoring method, device, equipment and medium
CN112035317A