Microservice fault locating method and electronic device
Through the microservice fault location method based on fault characteristics and types, the problem of complexity of fault location in the microservice architecture is solved, fast and accurate fault identification and location are achieved, and fault handling efficiency is improved.
Patent Information
- Application Number
- CN202410935654.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In the microservice architecture, as the number of calling nodes increases, fault location becomes more and more difficult, and it is difficult for existing technology to quickly and accurately identify and locate the fault source.
By responding to microservice fault alarm information, the fault type is determined based on fault characteristics, including performance faults and non-performance faults, and corresponding troubleshooting paths are set according to the fault type and characteristics to gradually determine the microservice fault node.
It achieves rapid and accurate location of microservice faults, reduces the complexity and time of troubleshooting, and improves fault handling efficiency.
Smart Images

Figure CN118467232B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fault location, and in particular to a microservice fault location method and electronic device. Background Art
[0002] At present, the usage rate of microservice architecture is gradually increasing. Compared with monolithic services, microservice architecture is more complex, and calls between functional modules are changed from in-process calls to inter-process calls. With the increase of call nodes, the locations where faults may occur also increase exponentially, making fault location more difficult. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a microservice fault locating method and an electronic device.
[0004] According to the first aspect of the present application, an embodiment of the present application provides a microservice fault locating method, including:
[0005] In response to obtaining microservice fault alarm information, determining fault characteristics based on the fault alarm information;
[0006] Determine the fault type based on the fault characteristics, which includes performance faults and non-performance faults;
[0007] If the fault type is a performance fault, determine the first sub-fault type based on the number of fault alarm information, and determine the microservice fault node based on the first fault troubleshooting path corresponding to the first sub-fault type; the first sub-fault type includes global performance faults and local performance faults;
[0008] If the fault type is a non-performance fault, the microservice fault node is determined based on the second fault troubleshooting path corresponding to the second sub-fault type; the second sub-fault type includes business exception faults and application exception faults.
[0009] Optionally, determining the fault type based on the fault characteristics includes:
[0010] If the fault characteristic shows that the first parameter is abnormal, the fault type is determined to be a performance fault;
[0011] If the fault characteristic shows that the second parameter is abnormal, the fault type is determined to be a non-performance fault;
[0012] Among them, the first parameter includes service response time and the number of fault alarm information; the second parameter includes service volume and service error rate.
[0013] Optionally, determining the first sub-fault type based on the amount of fault alarm information includes:
[0014] If the number of fault alarm information is greater than or equal to the alarm number threshold, determining that the first sub-fault type is a global performance fault;
[0015] If the number of fault alarm information is less than the alarm number threshold, it is determined that the first sub-fault type is a local performance fault.
[0016] Optionally, determining a microservice fault node based on a first fault troubleshooting path corresponding to the first sub-fault type includes:
[0017] If the first sub-fault type is a global performance fault, determine the microservice fault node according to the troubleshooting path of data center network fault, single system host fault, middleware fault, database fault, and key application node fault;
[0018] If the first sub-fault type is a local performance fault, determine the microservice fault node according to the troubleshooting path of single server application traffic failure, application call failure of structured query language SQL, application code failure, CPU or thread failure, memory or Java virtual machine JVM failure, disk or file failure, and network failure.
[0019] Optionally, according to the troubleshooting path of data center network failure, single system host failure, middleware failure, database failure, and key application node failure, the microservice failure node is determined, including:
[0020] Based on the traffic information of the data center, determine whether there is a network failure in the data center;
[0021] If there is no network failure in the data center, determine whether there is a failure in the host in the single system based on the single system host performance information;
[0022] If there is no fault in the host in the single system, determine whether the middleware has a fault based on the middleware information;
[0023] If the middleware is not faulty, determine whether the database is faulty based on the database performance information;
[0024] If there is no fault in the database, determine whether the key application node is faulty based on the business information of the key application node.
[0025] Optionally, according to the troubleshooting path of single server application traffic failure, application to SQL call failure, application code failure, CPU or thread failure, memory or JVM failure, disk or file failure, and network failure, the microservice failure node is determined, including:
[0026] Based on the application traffic information of a single server, determine whether the application traffic of a single server is faulty;
[0027] If there is no fault in the application traffic of a single server, determine whether there is a SQL call fault in the application based on the application's SQL call information;
[0028] If the application does not have SQL call failures, determine whether the application code is faulty based on the application running log;
[0029] If there is no fault in the application code, determine whether the CPU or thread is faulty based on the running information of the server CPU or thread;
[0030] If the CPU or thread is not faulty, determine whether the memory or JVM is faulty based on the running information of the server memory or JVM;
[0031] If there is no fault in the memory or JVM, determine whether the disk or file is faulty based on the running information of the server disk or file;
[0032] If there is no fault in the disk or file, determine whether the network is faulty based on the server network operation information.
[0033] Optionally, determining the microservice fault node based on the second fault troubleshooting path corresponding to the second sub-fault type includes:
[0034] For business exception failures, determine the microservice failure node according to the troubleshooting path of application interface failure, front-end page failure, and client failure;
[0035] For application exception failures, determine the microservice fault node according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure.
[0036] Optionally, the microservice fault node is determined according to the troubleshooting path of application interface fault, front-end page fault, and client fault, including:
[0037] Based on the business error code, determine whether the business interface is faulty;
[0038] If there is no fault in the business interface, determine whether the front-end page is faulty based on the front-end page operation information;
[0039] If there is no fault on the front-end page, determine whether there is a fault on the client based on the client operation data.
[0040] Optionally, the microservice fault node is determined according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure, including:
[0041] Based on the traffic information of multiple data centers, determine whether the traffic distribution of multiple data centers is faulty;
[0042] If there is no fault in the multi-data center traffic distribution, determine whether the single data center traffic distribution is faulty based on the traffic information of the single data center;
[0043] If there is no fault in the single-center traffic distribution, determine whether the traffic of a single server is faulty based on the operation information of the business system;
[0044] If there is no failure in the traffic of a single server, determine whether the database is faulty based on the access information of the server to the database;
[0045] If the database is not faulty, determine whether the memory or JVM is faulty based on the running information of the server memory or JVM.
[0046] According to a second aspect of the present application, an embodiment of the present application provides an electronic device, including:
[0047] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the microservice fault locating method as described in the first aspect or any embodiment of the first aspect.
[0048] The microservice fault locating method and electronic device provided in the embodiment of the present application determine the fault characteristics based on the fault alarm information in response to the acquisition of microservice fault alarm information; determine the fault type based on the fault characteristics, and the fault type includes performance faults and non-performance faults; if the fault type is a performance fault, determine the first sub-fault type based on the number of fault alarm information, and determine the microservice fault node based on the first fault troubleshooting path corresponding to the first sub-fault type; the first sub-fault type includes global performance faults and local performance faults; if the fault type is a non-performance fault, determine the microservice fault node based on the second fault troubleshooting path corresponding to the second sub-fault type; the second sub-fault type includes business abnormality faults and application abnormality faults; in this way, starting from the two major types of faults, performance faults and non-performance faults, the possible causes of the faults are analyzed, and each major type of fault is further subdivided into two sub-fault types, and corresponding fault troubleshooting paths are set, so that the fault can be located quickly and accurately.
[0049] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1A schematic diagram of a process for locating a microservice fault in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a troubleshooting path corresponding to a global performance fault in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a troubleshooting path corresponding to a local performance fault in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a troubleshooting path corresponding to a business abnormality fault in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of a troubleshooting path corresponding to an abnormal application fault in an embodiment of the present application;
[0055] Figure 6 This is a schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0057] The present application embodiment provides a microservice fault location method, such as Figure 1 As shown, including:
[0058] S101, in response to obtaining microservice fault alarm information, determining fault characteristics based on the fault alarm information.
[0059] In this embodiment, the fault alarm information includes the symptom problem of the fault, for example, a large number of services are processed slowly, a small number of services are processed slowly, services cannot be carried out normally, services are interrupted, etc.
[0060] In this embodiment, by analyzing the fault alarm information, the fault characteristics can be determined, and the fault characteristics represent the underlying problems of the fault, such as long service response time, a large amount of fault alarm information, reduced service volume, increased service error rate, etc.
[0061] S102, determining a fault type based on the fault characteristics, where the fault types include performance faults and non-performance faults.
[0062] In this embodiment, performance failures mainly refer to abnormalities in the system response time, number of fault alarm messages, etc. The problematic nodes may be on one or more nodes of the application, database, cache, or network device.
[0063] In this embodiment, non-performance failures mainly refer to situations such as a drop in business volume, an increase in business error rate, unavailable business interfaces, a drop in application traffic due to process interruptions, a drop in business success rate, and an increase in business interface time consumption.
[0064] In this embodiment, corresponding fault feature tables may be set for performance-related faults and non-performance-related faults, respectively, so that once the fault feature is determined, the corresponding fault type may be queried.
[0065] S103: If the fault type is a performance fault, determine a first sub-fault type based on the number of fault alarm information, and determine a microservice fault node based on a first fault troubleshooting path corresponding to the first sub-fault type; the first sub-fault type includes a global performance fault and a local performance fault.
[0066] In this embodiment, performance-related faults include global performance-related faults and local performance-related faults.
[0067] In this embodiment, when a global performance failure occurs, it is usually due to a serious problem in the underlying infrastructure or a serious problem in a single point in the overall system architecture; the problem will be reflected in the customer service feedback of a large number of customer complaints, and large-scale alarms in various business and application monitoring. Local abnormal problems include dimensions such as increased time consumption of some applications or some interfaces, and reduced response rates; the problem is reflected in the customer service feedback of a small number of work orders, a slight decrease in various indicators of the system, and accompanied by a small area of server alarms. Therefore, if the fault type is a performance fault, it can be determined whether it is a global performance fault or a local performance fault by the number of fault alarm information.
[0068] In some embodiments, determining the first sub-fault type based on the amount of fault warning information includes:
[0069] If the number of fault alarm information is greater than or equal to the alarm number threshold, the first sub-fault type is determined to be a global performance fault; if the number of fault alarm information is less than the alarm number threshold, the first sub-fault type is determined to be a local performance fault.
[0070] In this embodiment, by setting the alarm quantity threshold, it is possible to quickly determine whether the fault is a global performance fault or a local performance fault.
[0071] S104: If the fault type is a non-performance fault, determine the microservice fault node based on a second fault troubleshooting path corresponding to a second sub-fault type; the second sub-fault type includes business exception faults and application exception faults.
[0072] In this embodiment, non-performance faults are divided into service abnormality faults and application abnormality faults. The service abnormality faults and application abnormality faults respectively correspond to different second fault troubleshooting paths.
[0073] In this embodiment, for business abnormality type faults and application abnormality type faults, the troubleshooting principle is consistent with the fault recovery principle, that is, first ensure that the recovery function is normal, and then locate and troubleshoot the cause. The troubleshooting ideas can be divided into three points: ① Whether it affects all functions of the module in all channels (such as all functions of the fund module cannot be used), whether to switch multiple data centers; ② The fault assessment only affects a certain business function of a single channel. You can close the business entrance of the problem channel and guide customers to divert to other channels for transactions; ③ Whether there were relevant changes before the fault occurred. If so, emergency rollback can be performed for recovery. Based on the above three ideas, the second troubleshooting path corresponding to business abnormality type faults and application abnormality type faults can be determined respectively.
[0074] In this embodiment, when the fault type is a non-performance fault, business abnormality faults and application abnormality faults can be checked at the same time, and the final microservice fault node is determined based on the troubleshooting results of the business abnormality faults and application abnormality faults.
[0075] The microservice fault locating method provided in the embodiment of the present application determines the fault characteristics based on the fault alarm information in response to obtaining the microservice fault alarm information; determines the fault type based on the fault characteristics, and the fault type includes performance faults and non-performance faults; if the fault type is a performance fault, determines the first sub-fault type based on the number of fault alarm information, and determines the microservice fault node based on the first fault troubleshooting path corresponding to the first sub-fault type; the first sub-fault type includes global performance faults and local performance faults; if the fault type is a non-performance fault, determines the microservice fault node based on the second fault troubleshooting path corresponding to the second sub-fault type; the second sub-fault type includes business abnormality faults and application abnormality faults; in this way, starting from the two major types of faults, performance faults and non-performance faults, the possible causes of the faults are analyzed, and each major type of fault is further subdivided into two sub-fault types, and corresponding fault troubleshooting paths are set, so that the fault can be located quickly and accurately.
[0076] In an optional embodiment, in step S102, the fault type is determined based on the fault characteristics, including: if the fault characteristic shows that the first parameter is abnormal, the fault type is determined to be a performance-related fault; if the fault characteristic shows that the second parameter is abnormal, the fault type is determined to be a non-performance-related fault; wherein the first parameter includes the service response time and the number of fault alarm messages; and the second parameter includes the service volume and the service error rate.
[0077] In this embodiment, the first parameter abnormality may be an increase in response time or an increase in the number of fault alarm messages, and the second parameter abnormality may be a decrease in service volume or an increase in service error rate.
[0078] In this embodiment, by setting the abnormal parameters corresponding to the performance faults and the non-performance faults respectively, it is possible to quickly determine whether it is a performance fault or a non-performance fault based on the fault characteristics.
[0079] In an optional embodiment, in step S103, determining the microservice fault node based on the first fault troubleshooting path corresponding to the first sub-fault type includes:
[0080] If the first sub-fault type is a global performance fault, determine the microservice fault node according to the troubleshooting path of data center network failure, single system host failure, middleware failure, database failure, and key application node failure.
[0081] If the first sub-fault type is a local performance fault, determine the microservice fault node according to the troubleshooting path of single server application traffic fault, application call fault of structured query language (SQL), application code fault, CPU or thread fault, memory or Java virtual machine (JVM) fault, disk or file fault, and network fault.
[0082] In this embodiment, if the first sub-fault type is a global performance fault, the troubleshooting ideas mainly include the following:
[0083] 1. Use the infrastructure monitoring dashboard and resource monitoring dashboard to determine whether there are global problems with the network, storage, and host. If so, proceed to the corresponding solution for confirmation.
[0084] 2. Monitor the market through various types of middleware to determine whether there is a large-scale failure of a certain middleware. If so, switch to the relevant middleware for emergency processing.
[0085] 3. Use the database to monitor the disk and determine whether there are large-scale database cluster failures or CPU surges. If so, switch to the corresponding database emergency processing.
[0086] 4. If no relevant problems are found in the above global checks, turn to application problem analysis to determine whether there is a large-scale failure of an application node on the business-critical link. Use the pre-configured global business monitoring dashboard to check whether all business indicators have problems. If so, it is highly suspected that a key application has a problem. If not, determine the specific affected business point and continue to investigate the business problem at that point.
[0087] 5. Check key application nodes. There are the following ways to check application nodes: a) Determine whether a certain application has a problem through the key application indicators preset in the business monitoring dashboard; b) View the application topology in the distributed link tracking system or enter the tracking ID to view the application with interrupted service or large-scale errors; c) Determine the problematic application through each application monitoring panel one by one.
[0088] Based on the above troubleshooting ideas, it can be determined that the first troubleshooting path for global performance failures is: data center network failure, single system host failure, middleware failure, database failure, and key application node failure.
[0089] In some embodiments, according to the troubleshooting path of data center network failure, single system host failure, middleware failure, database failure, and key application node failure, the microservice failure node is determined, including: based on the traffic information of the data center, determining whether there is a network failure in the data center; if there is no network failure in the data center, based on the single system host performance information, determining whether there is a host failure in the single system; if there is no host failure in the single system, determining whether there is a middleware failure based on the middleware information; if there is no middleware failure, determining whether there is a database failure based on the database performance information; if there is no database failure, determining whether the key application node is faulty based on the business information of the key application node.
[0090] When implementing it, Figure 2 As shown, you can first query the traffic, number of sessions, latency and other information of the data center and compare them with the baseline to determine whether there is a global network problem. If there is a global network problem, perform an abnormal analysis on the network to determine the faulty node and the cause of the fault.
[0091] If there is no global network problem, you can confirm whether there are large-scale host alarms in the current data center, and then query the single system host performance information, such as CPU, memory, disk and other performance information, to confirm whether there is a host failure in the current system. If there is a host failure, switch to the corresponding host performance information for detailed query to confirm the faulty node and the cause of the failure.
[0092] If there is no host failure, you can query the middleware information, such as the connection pool usage, JVM heap memory usage, and other information to confirm whether the middleware as a whole is unavailable. If there is a middleware failure, switch to the corresponding middleware for problem query to confirm the faulty node and the cause of the failure.
[0093] If there is no middleware failure, you can check whether the current database has performance bottlenecks, whether SQL execution consumes too much resources, etc. If these situations exist, perform abnormal analysis on the database to determine the faulty node and the cause of the failure.
[0094] If it is confirmed that there is no fault in the database, the key application nodes with slow transaction times or even no response on the business-critical links can be identified. Then, based on the business information of the key application nodes, the key application nodes can be troubleshooted to determine the faulty nodes and the cause of the fault.
[0095] Based on the above troubleshooting process, the faulty node in the global performance fault can be basically located.
[0096] In some embodiments, according to the troubleshooting path of single server application traffic failure, application call failure to SQL, application code failure, CPU or thread failure, memory or JVM failure, disk or file failure, and network failure, the microservice fault node is determined, including: based on the application traffic information of a single server, determining whether the application traffic of a single server is faulty; if there is no fault in the application traffic of a single server, determining whether there is a SQL call failure in the application based on the application call information to SQL; if there is no SQL call failure in the application, determining whether the application code is faulty based on the application running log; if there is no fault in the application code, determining whether the CPU or thread is faulty based on the running information of the server CPU or thread; if there is no fault in the CPU or thread, determining whether the memory or JVM is faulty based on the running information of the server memory or JVM; if there is no fault in the memory or JVM, determining whether the disk or file is faulty based on the running information of the server disk or file; if there is no fault in the disk or file, determining whether the network is faulty based on the server network running information.
[0097] When implementing it, Figure 3 As shown, you can first confirm whether there is a fault in the application flow of a single server through the transaction volume, response time, response rate, success rate and other information of a single server. If there is a fault, query the load balancing and current limiting settings to confirm the faulty node and the cause of the fault.
[0098] If there is no fault in the application traffic of a single server, you can confirm whether there is an SQL call abnormality based on the sorting information of the SQL running time. If there is an SQL call abnormality, confirm whether the abnormal database process can be deleted. If the abnormal database process can be deleted, delete the abnormal database process. If the abnormal database process cannot be deleted, analyze the database execution plan to confirm the faulty node and the cause of the fault.
[0099] If there is no SQL call exception, query the application running log, analyze the application running log for exception errors, and determine whether the application code is faulty. If there is a fault, determine the faulty node and cause.
[0100] If there is no application code failure, the CPU of a single server can be analyzed through key information such as CPU utilization, average CPU load, and number of context switches. If a CPU or thread failure is confirmed, the abnormal CPU is analyzed to identify the faulty node and cause of the failure.
[0101] If there is no faulty CPU or thread, you can analyze the abnormal memory or JVM of a single server based on the running information of the memory or JVM. If it is confirmed that there is a memory or JVM fault, analyze the abnormal memory or JVM to confirm the faulty node and the cause of the fault. The running information of the memory or JVM includes the remaining memory, used memory, available memory, cache / buffer, virtual memory, resident memory, shared memory of the process (including Java process), the number of page fault exceptions of the process, including primary page fault exceptions and secondary page fault exceptions, etc.
[0102] If there is no memory or JVM failure, it is possible to determine whether the disk or file is faulty based on the operation information of the server disk or file. If there is a fault, a detailed analysis is performed on the abnormal disk or file to determine the faulty node and the cause of the fault. The operation information of the disk or file includes disk utilization, disk throughput, disk response time, disk waiting queue size, etc.
[0103] If there is no disk or file failure, you can use information such as network bandwidth and network delay to determine whether the server network is faulty. If it is a fault, analyze the abnormal network operation information to determine the faulty node and cause of the fault.
[0104] In this embodiment, in the local performance fault analysis, by analyzing the application traffic, log, host, middleware, database, network and other levels, more than 99% of the fault causes can be covered, and the root cause of the fault can basically be located.
[0105] In this embodiment, according to the troubleshooting order from the whole to the part, from the cluster to the single machine, each item of system information can be checked one by one to accurately locate the faulty nodes in the global performance faults and the local performance faults.
[0106] In an optional embodiment, in step S104, determining the microservice fault node based on the second fault troubleshooting path corresponding to the second sub-fault type includes:
[0107] For business exception failures, determine the microservice fault node according to the troubleshooting path of application interface failure, front-end page failure, and client failure.
[0108] For application exception failures, determine the microservice fault node according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure.
[0109] In some embodiments, the microservice fault node is determined according to the troubleshooting path of application interface failure, front-end page failure, and client failure, including: determining whether the business interface is faulty based on the business error code; if the business interface is not faulty, determining whether the front-end page is faulty based on the front-end page operation information; if the front-end page is not faulty, determining whether the client is faulty based on the client operation data.
[0110] When implementing it, Figure 4 As shown, when a business problem occurs, you can query with common business error codes or transaction tracking IDs to see whether it is due to an error at the business rule level.
[0111] If it is not a common business error code, it means that it is not an error at the business rule level. In this case, analyze the keywords of the business error code to determine whether the business interface is faulty. If the business interface is faulty, analyze the business interface message to determine the faulty node and fault cause.
[0112] If there is no fault in the business interface, you can check the error type and error page based on the front-end page running information to determine whether the front-end page is faulty. If the front-end page is faulty, you can determine the fault node and cause of the fault based on the front-end page code.
[0113] If there is no fault on the front-end page, it is possible to determine whether there is a fault on the client based on the client operation log. If there is a fault on the client, determine the fault node and cause for analysis.
[0114] In some embodiments, the microservice fault node is determined according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure, including: based on the traffic information of multiple data centers, determining whether the multi-data center traffic distribution is faulty; if there is no fault in the multi-data center traffic distribution, determining whether the single data center traffic distribution is faulty based on the traffic information of the single data center; if there is no fault in the single center traffic distribution, determining whether the single server traffic is faulty based on the operation information of the business system; if there is no fault in the single server traffic, determining whether the database is faulty based on the access information of the server to the database; if there is no fault in the database, determining whether the memory or JVM is faulty based on the operation information of the server memory or JVM.
[0115] When implementing it, Figure 5 As shown in the figure, when an application problem occurs, the traffic of multiple data centers can be compared with the traffic baseline to determine whether the traffic distribution of multiple data centers has deviated significantly. If there is a significant deviation, it means that there is a problem with the traffic distribution of multiple data centers. Then, the traffic entrance of a single data center and the verification rules of the Web Application Protection System (WAF) can be checked to determine the faulty node and the cause of the fault.
[0116] If there is no fault in the traffic distribution of multiple data centers, check the traffic distribution of each server in a single data center to determine whether the traffic distribution of a single data center is faulty. If there is a fault in the traffic distribution of a single data center, check the traffic entrance and Web Application Protection System (WAF) verification rules of the server in a single data center to determine the faulty node and fault cause.
[0117] If there is no fault in the traffic distribution of a single data center, determine whether the traffic distribution of multiple applications in a single server is faulty. If there is a fault in the traffic distribution of multiple applications in a single server, check the traffic entrance of the application and the Web Application Protection System (WAF) verification rules to determine the faulty node and the cause of the fault.
[0118] If there is no fault in the traffic distribution of multiple applications in a single server, check whether there are any blocking, concurrency, etc. when the server accesses the database to determine whether the database is faulty. If the database is faulty, analyze the faulty database to determine the faulty node and cause of the fault.
[0119] If the database is not faulty, you can determine whether the memory or JVM is faulty. If the memory or JVM is faulty, analyze the abnormal memory or JVM to confirm the faulty node and the cause of the fault.
[0120] In this embodiment, according to the troubleshooting sequence from the whole to the part, from the cluster to the single machine, each system information can be checked one by one to accurately locate the faulty nodes in the business abnormality type faults and application abnormality type faults.
[0121] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0122] Figure 6 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0123] like Figure 6 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0124] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0125] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a microservice fault location method. For example, in some embodiments, the microservice fault location method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the microservice fault location method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the microservice fault location method in any other appropriate manner (e.g., by means of firmware).
[0126] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0128] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0130] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0131] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0133] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0134] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A microservice fault location method, It is characterized in that include: In response to obtaining microservice fault alarm information, determining fault characteristics based on the fault alarm information; Determine a fault type based on the fault characteristics, where the fault type includes performance-related faults and non-performance-related faults; Determining the fault type based on the fault characteristics includes: if the fault characteristics show that the first parameter is abnormal, determining the fault type is a performance fault; if the fault characteristics show that the second parameter is abnormal, determining the fault type is a non-performance fault; wherein the first parameter includes the service response time and the number of fault alarm information; the second parameter includes the service volume and the service error rate; If the fault type is a performance fault, a first sub-fault type is determined based on the number of fault alarm information, and a microservice fault node is determined based on a first fault troubleshooting path corresponding to the first sub-fault type; the first sub-fault type includes a global performance fault and a local performance fault; If the fault type is a non-performance fault, the microservice fault node is determined based on a second fault troubleshooting path corresponding to a second sub-fault type; the second sub-fault type includes business exception faults and application exception faults.
2. The microservice fault location method according to claim 1, It is characterized in that Determining a first sub-fault type based on the amount of fault alarm information includes: If the number of the fault alarm information is greater than or equal to the alarm number threshold, determining that the first sub-fault type is a global performance fault; If the number of the fault alarm information is less than the alarm number threshold, it is determined that the first sub-fault type is a local performance fault.
3. The microservice fault location method according to claim 1, It is characterized in that Determining a microservice fault node based on a first fault troubleshooting path corresponding to the first sub-fault type includes: If the first sub-fault type is a global performance fault, determine the microservice fault node according to the fault troubleshooting path of data center network fault, single system host fault, middleware fault, database fault, and key application node fault; If the first sub-fault type is a local performance fault, determine the microservice fault node according to the troubleshooting path of single server application traffic failure, application call failure of structured query language SQL, application code failure, CPU or thread failure, memory or Java virtual machine JVM failure, disk or file failure, and network failure.
4. The microservice fault location method according to claim 3, It is characterized in that According to the troubleshooting path of data center network failure, single system host failure, middleware failure, database failure, and key application node failure, determine the microservice failure node, including: Based on the traffic information of the data center, determine whether there is a network failure in the data center; If there is no network failure in the data center, determine whether there is a failure in the host in the single system based on the single system host performance information; If there is no fault in the host in the single system, determine whether the middleware has a fault based on the middleware information; If the middleware is not faulty, determine whether the database is faulty based on the database performance information; If there is no fault in the database, determine whether the key application node is faulty based on the business information of the key application node.
5. The microservice fault location method according to claim 3, It is characterized in that According to the troubleshooting path of single server application traffic failure, application SQL call failure, application code failure, CPU or thread failure, memory or JVM failure, disk or file failure, and network failure, the microservice failure node is determined, including: Based on the application traffic information of a single server, determine whether the application traffic of a single server is faulty; If there is no fault in the application traffic of a single server, determine whether there is a SQL call fault in the application based on the application's SQL call information; If the application does not have SQL call failures, determine whether the application code is faulty based on the application running log; If there is no fault in the application code, determine whether the CPU or thread is faulty based on the running information of the server CPU or thread; If the CPU or thread is not faulty, determine whether the memory or JVM is faulty based on the running information of the server memory or JVM; If there is no fault in the memory or JVM, determine whether the disk or file is faulty based on the running information of the server disk or file; If there is no fault in the disk or file, determine whether the network is faulty based on the server network operation information.
6. The microservice fault location method according to claim 1, It is characterized in that Determining the microservice fault node based on the second fault troubleshooting path corresponding to the second sub-fault type includes: For business exception failures, determine the microservice failure node according to the troubleshooting path of application interface failure, front-end page failure, and client failure; For application exception failures, determine the microservice fault node according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure.
7. The microservice fault location method according to claim 6, It is characterized in that Determine the microservice fault node according to the troubleshooting path of application interface failure, front-end page failure, and client failure, including: Based on the business error code, determine whether the business interface is faulty; If there is no fault in the business interface, determine whether the front-end page is faulty based on the front-end page operation information; If there is no fault on the front-end page, determine whether there is a fault on the client based on the client operation data.
8. The microservice fault location method according to claim 6, It is characterized in that Determine the microservice fault node according to the troubleshooting path of multi-data center traffic distribution failure, single data center traffic distribution failure, single server traffic failure, database failure, memory or JVM failure, including: Based on the traffic information of multiple data centers, determine whether the traffic distribution of multiple data centers is faulty; If there is no fault in the multi-data center traffic distribution, determine whether the single data center traffic distribution is faulty based on the traffic information of the single data center; If there is no fault in the single-center traffic distribution, determine whether the traffic of a single server is faulty based on the operation information of the business system; If there is no failure in the traffic of a single server, determine whether the database is faulty based on the access information of the server accessing the database; If the database is not faulty, determine whether the memory or JVM is faulty based on the running information of the server memory or JVM.
9. An electronic device, It is characterized in that include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the microservice fault locating method according to any one of claims 1-8.
