Dynamically aware rescheduling method and application for large-scale microservice applications

The dynamic topology awareness algorithm analyzes microservice call information, determines performance issues and performs rescheduling, solving the problem of service quality degradation caused by resource contention and fault domains in microservice applications, and achieving automatic reconciliation and performance optimization.

CN114518948BActive Publication Date: 2024-09-24NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210158765.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2024-09-24
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

Under the microservice architecture, the degradation of service quality of microservice applications caused by resource contention or single fault domains cannot be effectively handled, and complex topologies are difficult to sort out and optimize performance manually.

Method used

Use the dynamic topology awareness algorithm to obtain the calling information of microservices, analyze the topology structure, and determine performance problems. If there are any, join the rescheduling task queue for rescheduling. By establishing a mapping table between requests and microservices and calculating the performance evaluation function, the critical path is located. and perform rescheduling.

Benefits of technology

It realizes automatic coordination of microservice applications, promptly locates microservices whose performance is affected, ensures that their performance always tends to the best state, and avoids service quality degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114518948B
    Figure CN114518948B
Patent Text Reader

Abstract

The present invention discloses a method and application of dynamic perception rescheduling for large-scale microservice applications, the method comprising the following steps: obtaining call information of microservice requests; parsing the call information through a dynamic topology perception algorithm, and obtaining the call topology structure of the current microservice; judging whether the current microservice has performance problems according to the call topology structure; if so, adding the current microservice to the rescheduling task queue for rescheduling. The method can obtain the topology structure and real-time operation status of the microservice application based on link analysis, and then obtain the critical path of the microservice application execution request response. The adaptive mechanism timely locates the microservices whose performance is affected by monitoring and analyzing the critical path, and performs rescheduling on the affected microservices in combination with the rescheduling algorithm, thereby realizing automatic reconciliation of microservices and making the performance of microservice applications always tend to the optimal state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microservices and cloud native, and in particular to a method and application of dynamic perception rescheduling for large-scale microservice applications. Background Art

[0002] As a new application architecture model, microservice architecture has become a trend in modern application design due to its support for high scalability and high availability. Microservice architecture divides complex applications into a set of loosely coupled independent services with single functions. These services can be built, deployed, run and maintained independently of other services or the entire application itself without compromising the integrity of the application. Each service with independent functions and deployment is called a microservice. Compared with the traditional monolithic architecture, microservice architecture greatly improves the availability, portability, updatability and scalability of applications.

[0003] However, the microservice architecture emphasizes the componentization and service-oriented nature of business functions. The business system is divided into independent functional components, and the functions of the application are completed by multiple groups of microservices. Each microservice can not only provide services to a single application, but also be reused between multiple applications. Therefore, under the microservice architecture, the number of services has increased significantly, and the calling relationship between services has also become more complex. On the other hand, in order to improve the utilization of cluster resources, cluster users will use cluster resources in the form of multiple users and multiple tasks. The interference between workloads often leads to the degradation of service quality, especially in the mixed deployment environment of online and offline tasks. A large number of offline tasks occupy bandwidth, and resource contention eventually leads to the degradation of the service quality of some online services. Under the microservice architecture, the application completes the response through multi-level calls of multiple microservices. The degradation of the service quality of a single microservice will also have a great impact on the overall response. The complex topological structure of microservice applications is difficult to sort out manually, and performance-limited microservices are difficult to be located in a large microservice system in a timely manner. This is an important problem facing large-scale microservice applications.

[0004] At present, most of the research on dynamic performance optimization of microservice applications focuses on the automatic expansion and contraction mechanism of microservices. Based on the independent expansion capabilities of microservices, these studies use reinforcement learning or performance prediction models to establish resource expansion and contraction rules and determine the number of resources that need to be adjusted to achieve automatic adjustment of affected microservices. However, these methods have certain limitations in dealing with the degradation of microservice quality caused by host performance degradation, application resource contention, and even hardware failure.

[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0006] The purpose of the present invention is to provide a method and application for dynamically aware rescheduling of large-scale microservice applications, so as to solve the problem in the prior art that the service quality of microservice applications cannot be processed due to resource contention or single fault domain.

[0007] To achieve the above objectives, an embodiment of the present invention provides a method for dynamic perception rescheduling of large-scale microservice applications.

[0008] In one or more embodiments of the present invention, the method includes: obtaining call information of all microservice requests; parsing the call information through a dynamic topology awareness algorithm and obtaining the topology structure of the current microservice; judging whether the current microservice has a performance problem based on the topology structure; if so, adding the current microservice to the rescheduling task queue for rescheduling.

[0009] In one or more embodiments of the present invention, the calling information is parsed by a dynamic topology awareness algorithm to obtain the calling topology structure of the current microservice, including: dividing the calling information into different request groups according to the request ID; traversing the calling information in the request group to establish a mapping table between requests and microservices; establishing an adjacency matrix of microservice dependencies according to the mapping table; and merging adjacency matrices with the same dependencies to obtain the topology structure of the current microservice.

[0010] In one or more embodiments of the present invention, the method further includes: when acquiring new call information, merging the adjacency matrix established by the new call information into the original adjacency matrix to obtain the topological structure of the microservice of the new call information.

[0011] In one or more embodiments of the present invention, the method further includes: setting a timeout period according to the mapping table; and when the time of adding the microservice dependency exceeds the timeout period, deleting the dependency from the topology structure.

[0012] In one or more embodiments of the present invention, judging whether the current microservice has a performance problem according to the calling topology structure includes: judging whether the downstream service of the root node microservice in the topology structure is empty; if so, outputting the critical path; if not, adding the downstream service to the critical path list, and executing the critical path perception algorithm in reverse order of the serial calls of the downstream service.

[0013] In one or more embodiments of the present invention, judging whether the current microservice has a performance problem according to the call topology structure further includes: calculating a performance evaluation function of the microservice according to the P99 response delay and the average response delay of the critical path; judging whether the performance evaluation function is greater than a preset threshold; and if so, adding the microservice to a microservice rescheduling task queue.

[0014] In one or more embodiments of the present invention, judging whether the current microservice has a performance problem based on the call topology structure also includes: when the average response delay of the critical path increases by more than two times, adding the microservice and the corresponding downstream service to the microservice rescheduling task queue.

[0015] In another aspect of the present invention, a device for dynamic perception and rescheduling of large-scale microservice applications is provided, which includes an acquisition module, a parsing module, a judgment module and a rescheduling module.

[0016] The acquisition module is used to obtain the call information of the microservice request.

[0017] The parsing module is used to parse the call information through a dynamic topology awareness algorithm and obtain the call topology structure of the current microservice.

[0018] The judgment module is used to judge whether the current microservice has a performance problem according to the calling topology structure.

[0019] The rescheduling module is used to add the current microservice to the rescheduling task queue for rescheduling.

[0020] In one or more embodiments of the present invention, the parsing module is further used to: when acquiring new call information, merge the adjacency matrix established by the new call information into the original adjacency matrix to obtain the topological structure of the microservice of the new call information.

[0021] In one or more embodiments of the present invention, the parsing module is further used to: set a timeout period according to the mapping table; and when the time of adding the microservice dependency exceeds the timeout period, delete the dependency from the topology structure.

[0022] In one or more embodiments of the present invention, the judgment module is also used to: determine whether the downstream service of the root node microservice in the topology structure is empty; if so, output the critical path; if not, add the downstream service to the critical path list, and execute the critical path perception algorithm in reverse order of the serial calls of the downstream service.

[0023] In one or more embodiments of the present invention, the judgment module is also used to: calculate the performance evaluation function of the microservice based on the P99 response delay and the average response delay of the critical path; determine whether the performance evaluation function is greater than a preset threshold; if so, add the microservice to the microservice rescheduling task queue.

[0024] In one or more embodiments of the present invention, the judgment module is further used to: when the average response delay of the critical path increases more than twice, add the microservice and the corresponding downstream service to the microservice rescheduling task queue.

[0025] In another aspect of the present invention, an electronic device is provided for implementing the method of the present invention, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method of dynamic-aware rescheduling for large-scale microservice applications as described above.

[0026] In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for dynamic-aware rescheduling for large-scale microservice applications are implemented as described.

[0027] Compared with the prior art, the method and application of dynamic perception rescheduling for large-scale microservice applications according to the implementation mode of the present invention can obtain the topological structure and real-time operating status of the microservice application based on link analysis, and obtain the critical path of the microservice application execution request response by parsing the topological structure and operating status information of the microservice application. The adaptive mechanism timely locates the microservices whose performance is affected by monitoring and analyzing the critical path, and rescheduling the affected microservices in combination with the rescheduling algorithm, thereby realizing automatic coordination of microservices and ensuring that the performance of the microservice application always tends to the optimal state. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a general flow chart of a method for dynamic perception rescheduling of large-scale microservice applications according to an embodiment of the present invention;

[0029] Figure 2 It is a flow chart of a dynamic topology perception algorithm of a method for dynamic perception and rescheduling of large-scale microservice applications according to an embodiment of the present invention;

[0030] Figure 3 is a flowchart of a critical path extraction algorithm of a method for dynamic perception rescheduling of large-scale microservice applications according to an embodiment of the present invention;

[0031] Figure 4is a dynamic performance perception flow chart of a method for dynamic perception and rescheduling of large-scale microservice applications according to an embodiment of the present invention;

[0032] Figure 5 is a structural diagram of a device for dynamic perception and rescheduling of large-scale microservice applications according to an embodiment of the present invention;

[0033] Figure 6 1 is a hardware structure diagram of a computing device for dynamic perception and rescheduling of large-scale microservice applications according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.

[0035] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0036] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0037] Example 1

[0038] like Figures 1 to 4 As shown, a method for dynamic perception rescheduling for large-scale microservice applications in an embodiment of the present invention is introduced, and the method includes the following steps.

[0039] In step S101, the call information of the microservice request is obtained.

[0040] Use the distributed tracing system to monitor the calls in the microservice application, record a "request / response" process of the upstream and downstream services as a call, and calculate the time consumption of each call based on the time it takes for the request to reach the microservice and the time it takes to send its response back to the caller. Each call represents that the microservice completes an independent function.

[0041] A service request contains several calls, so all calls contain the same request ID, and each call has a different call ID. In addition, since the microservice topology is a directed acyclic graph, the call information also needs to include the direction of the call, which is described by the ID of the upstream call in the call information. It can be seen that the call information itself is a nested relationship, and part of the upstream call duration is composed of downstream calls.

[0042] The dynamic perception system restores the service path involved in a request by calling information, and restores the topological structure of the microservice in combination with the dynamic topology perception algorithm. It locates the key path that affects the application performance based on the key path extraction algorithm, and further determines the key nodes that affect the application performance through the dynamic performance perception algorithm. When performance degradation or single fault domain problems occur, dynamic rescheduling response is made to effectively ensure the overall performance of the microservice application.

[0043] In step S102, the call information is parsed by a dynamic topology awareness algorithm, and the call topology structure of the current microservice is obtained.

[0044] like Figure 2 As shown, service execution path restoration is performed based on the call information generated by a large number of requests. All call information within a certain period of time is periodically pulled from the database. Therefore, call classification needs to be performed first. In the classification stage, the call information is classified according to the request ID to form multiple different groups divided by requests; request analysis is performed on each group.

[0045] In the request analysis phase, all call information is first traversed, a mapping table between calls and service names is established, and a secondary traversal is performed based on the mapping table. The service name corresponding to the upstream call is queried during the traversal to obtain the dependency relationship between microservices. Through request analysis, an adjacency matrix describing the microservice dependency relationship can be established. The adjacency matrices obtained from all request analyses are aggregated, and the adjacency matrices with the same dependency relationship are merged, and finally the topological structure of the microservice application can be obtained.

[0046] In addition, this embodiment adds the size of the request data packet to the call relationship, and in the aggregation stage of request analysis, accumulates the data packet sizes in the call information, and calculates the accumulated sum to obtain the average load on the call within the time period.

[0047] Analyzing the entire process, the time complexity of the call classification and request analysis phases is O(n), but due to the huge scale of the call information and the certain effectiveness of the call relationship itself, this embodiment processes both the call classification and request analysis phases in the form of parallel tasks. In addition, in order to reduce the pressure of maintaining the topology of the microservice application and reduce the overhead of each call analysis, after completing the initialization of the topology structure, the coordinator will add the newly acquired call information to the adjacency matrix in an incremental form according to the "call-response" relationship. For invalid dependencies, the time of adding the dependency is additionally maintained in the microservice dependency attributes. By setting the timeout time, the invalid dependency can be deleted from the microservice topology, and the newly appearing call dependency will refresh the time attribute of the microservice dependency. In addition, in order to avoid the frequent changes in the service topology caused by the dynamic nature of the topology, which causes the jitter of the microservice system, the response mechanism of the dynamic topology perception strategy is executed in the form of a scheduled task.

[0048] In step S103, it is determined whether the current microservice has a performance problem based on the call topology structure.

[0049] Dynamic performance perception of microservice applications includes two parts: critical path analysis and dynamic performance perception. Critical path analysis is used to locate the main service paths that affect the service quality of microservice applications. Through the critical path analysis algorithm, the scope of performance perception can be effectively narrowed to achieve more efficient dynamic performance perception.

[0050] The calling relationship is divided into three categories: (1) Serial calling mode: The characteristic of serial calling is that the upstream microservice calls one or more downstream microservices in sequence in a serial manner. When the microservice with the highest order completes the request and returns, the subsequent microservices are called. Only when all downstream microservices complete the request and return, the upstream microservice continues to execute; (2) Parallel calling mode: The characteristic of parallel calling is that the upstream microservice calls multiple downstream microservices simultaneously or within a period of time. The execution and return of the downstream microservices do not interfere with each other. When all downstream microservices have completed execution and returned, the upstream microservice completes execution and returns; (3) Asynchronous calling mode: The characteristic of asynchronous calling is that when the upstream microservice calls the downstream microservice, it can continue to execute without waiting for the downstream microservice to complete execution and return.

[0051] like Figure 3As shown, the critical path resolution algorithm starts from the root node of the topology structure (i.e., the most upstream service), obtains the downstream services called by the service by checking the topology structure, and recursively calls the critical path resolution algorithm to analyze the critical path of the last microservice returned in the serial call mode. When the node to be searched is empty, the recursive algorithm returns part of the critical path. After the analysis of the home timeline service is completed, the previous microservice (i.e., the text service) with a serial execution relationship with the home timeline service will be analyzed in the same way to obtain part of the critical path of the service. Finally, all the partial critical paths are combined to form a complete critical path.

[0052] This implementation method divides the monitoring data into multiple time slices for recording and analysis. In order to reduce the overhead caused by monitoring, in each time slice, the critical path delay is first analyzed. The algorithm is designed for two scenarios: First, for packet loss, request failure, timeout and other phenomena caused by unstable network environment, the algorithm compares the response delay of P99 (delay data ranked 99th in percentage) and the response delay of P50 (average response time) of the critical path to obtain a performance evaluation function. The performance evaluation function is used to quantify the service quality. When the performance evaluation function is greater than the set threshold, it is judged that the microservice application is abnormal and the performance is degraded. Another scenario is for the increase in transmission delay due to bandwidth limitation, or the increase in processing delay due to computing resources limitation. The algorithm analyzes the average response delay P50. When its overall increase exceeds two times, it means that most users' requests are affected, that is, the service is considered to be affected. For the affected service, the service and its downstream services are added to the scheduling queue, and new working nodes are allocated to them by rescheduling, so that the performance of the entire application tends to be normal.

[0053] like Figure 4 As shown in the figure, in order to reduce the monitoring overhead, only the latency of the critical path is analyzed. Only when an exception occurs in the critical path, the nodes on the path are analyzed in sequence. This is because the call latency of the critical path determines the response latency of the entire application. Of course, in some cases, there is a scenario where the critical path is replaced: the total response time on a certain call path exceeds the total response time of the critical path. For this scenario, the critical path resolution algorithm can still handle it, because the total response latency of the application has also changed at this time, which can also trigger the response mechanism of the algorithm and add the abnormal service and downstream service to the scheduling queue.

[0054] In addition, due to the volatility of response latency, the data obtained in each different time slice during the monitoring process may be quite different. In order to prevent occasional delay increases from triggering a rescheduling response, resulting in frequent reconstruction of microservice containers and service jitter, a sliding average algorithm is added to calculate the request latency within a certain period of time and predict the long-term trend of latency changes.

[0055] Sliding average algorithm: delay t =β·delay t-1 +(1-β)·delay.

[0056] The sampling delay obtained in the current time slice period is recorded as delay, and delay t It represents the sliding average delay of the current time slice period. The value of this delay is jointly determined by the sampling operator and the current sampling delay. The existence of β controls the number of time slices involved in the sliding average calculation. In this embodiment, β = 0.9, that is, the past 10 performance evaluation functions are evaluated. The service quality evaluation function is also evaluated by sliding average. Condition is the performance evaluation function measured at the current moment. Condition t is the sliding average obtained previously. In the last part of the algorithm, when it is determined that the performance of a microservice is dynamically affected, the dynamic response strategy is used to eliminate the impact on the microservice by adjusting the node deployment location.

[0057] In step S104, the current microservice is added to the rescheduling task queue for rescheduling.

[0058] For the located performance-constrained microservices, rescheduling is performed in the form of queues; for the microservices whose performance is not affected, no rescheduling is performed to reduce the impact of the rescheduling process on the microservice application.

[0059] According to the embodiments of the present invention, the method and application of dynamic perception rescheduling for large-scale microservice applications can dynamically analyze the topological structure of the microservice application, dynamically monitor the performance of the microservice application, and dynamically rescheduling respond to performance degradation or single fault domain problems, thereby effectively ensuring the overall performance of the microservice application.

[0060] like Figure 5 As shown, a device for dynamically aware rescheduling of large-scale microservice applications according to a specific embodiment of the present invention is introduced.

[0061] In an embodiment of the present invention, the apparatus for dynamically perceiving and rescheduling large-scale microservice applications includes an acquisition module 501 , a parsing module 502 , a determination module 503 and a rescheduling module 504 .

[0062] The acquisition module 501 is used to obtain the call information of the microservice request.

[0063] The parsing module 502 is used to parse the call information through a dynamic topology awareness algorithm and obtain the call topology structure of the current microservice.

[0064] The judgment module 503 is used to judge whether the current microservice has a performance problem according to the call topology structure.

[0065] The rescheduling module 504 is used to add the current microservice to the rescheduling task queue for rescheduling.

[0066] The parsing module 502 is also used to: divide the call information into different request groups according to the request ID; traverse the call information in the request group to establish a mapping table between the request and the microservice; establish an adjacency matrix of the microservice dependency relationship according to the mapping table; and merge the adjacency matrices with the same dependency relationship to obtain the topological structure of the current microservice.

[0067] The parsing module 502 is also used to: when acquiring new call information, merge the adjacency matrix established by the new call information into the original adjacency matrix to obtain the topological structure of the microservice of the new call information.

[0068] The parsing module 502 is further used to: set a timeout period according to the mapping table; and when the time for adding the microservice dependency exceeds the timeout period, delete the dependency from the topology structure.

[0069] The judgment module 503 is also used to: judge whether the downstream service of the root node microservice in the topology structure is empty; if so, output the critical path; if not, add the downstream service to the critical path list, and execute the critical path perception algorithm in reverse order of the serial call of the downstream service.

[0070] The judgment module 503 is also used to: calculate the performance evaluation function of the microservice according to the P99 response delay and the average response delay of the critical path; judge whether the performance evaluation function is greater than a preset threshold; if so, add the microservice to the microservice rescheduling task queue.

[0071] The judgment module 503 is also used to: when the average response delay of the critical path increases by more than two times, add the microservice and the corresponding downstream service to the microservice rescheduling task queue.

[0072] Figure 6 FIG. 6 shows a hardware structure diagram of a computing device 60 for dynamically aware rescheduling of large-scale microservice applications according to an embodiment of the present specification. Figure 6As shown, the computing device 60 may include at least one processor 601, a memory 602 (e.g., a non-volatile memory), a memory 603, and a communication interface 604, and the at least one processor 601, the memory 602, the memory 603, and the communication interface 604 are connected together via a bus 605. The at least one processor 601 executes at least one computer-readable instruction stored or encoded in the memory 602.

[0073] It should be understood that the computer executable instructions stored in the memory 602, when executed, cause at least one processor 601 to perform the above combined operations in various embodiments of this specification. Figure 1-6 Describes the various operations and functions.

[0074] In the embodiments of the present specification, the computing device 60 may include, but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, and the like.

[0075] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-6 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0076] According to the method and application of dynamic perception rescheduling for large-scale microservice applications according to the implementation mode of the present invention, it is possible to obtain the topological structure and real-time operating status of the microservice application based on link analysis, and obtain the critical path of the microservice application execution request response by parsing the topological structure and operating status information of the microservice application. The adaptive mechanism timely locates the microservices whose performance is affected by monitoring and analyzing the critical path, and rescheduling the affected microservices in combination with the rescheduling algorithm, thereby realizing automatic coordination of microservices and ensuring that the performance of the microservice application always tends to the optimal state.

[0077] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0081] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A method for dynamic perception rescheduling of large-scale microservice applications, characterized in that: The method comprises: Get the call information of all microservice requests; The call information is parsed by a dynamic topology awareness algorithm, and the call topology structure of the current microservice is obtained, specifically including: dividing the call information into different request groups according to the request ID; traversing the call information in the request group to establish a mapping table between the request and the microservice; establishing an adjacency matrix of the microservice dependency relationship according to the mapping table; and merging the adjacency matrices with the same dependency relationship to obtain the topology structure of the current microservice; Determine whether the current microservice has a performance problem according to the topology structure; if so, add the current microservice to the rescheduling task queue for rescheduling; Judging whether the current microservice has a performance problem according to the calling topology structure includes: judging whether the downstream service of the root node microservice in the topology structure is empty; if so, outputting the critical path; if not, adding the downstream service to the critical path list, and executing the critical path perception algorithm in reverse order of the serial call of the downstream service; Judging whether the current microservice has a performance problem according to the call topology structure, further comprising: calculating a performance evaluation function of the microservice according to the P99 (delay data ranked 99th in percentage among all requests) response delay and average response delay of the critical path; judging whether the performance evaluation function is greater than a preset threshold; if so, adding the microservice to a microservice rescheduling task queue; Judging whether the current microservice has a performance problem according to the call topology structure also includes: when the average response delay of the critical path increases by more than two times, adding the microservice and the corresponding downstream service to a microservice rescheduling task queue.

2. The method for dynamic perception rescheduling for large-scale microservice applications according to claim 1, characterized in that: The method further comprises: When new call information is obtained, the adjacency matrix established by the new call information is merged into the original adjacency matrix to obtain the topological structure of the microservice of the new call information.

3. The method for dynamic perception rescheduling for large-scale microservice applications as claimed in claim 2, characterized in that: The method further comprises: Setting a timeout period according to the mapping table; and When the adding time of the microservice dependency exceeds the timeout period, the dependency is deleted from the topology structure.

4. A device for dynamic perception and rescheduling of large-scale microservice applications, characterized in that: The device comprises: The acquisition module is used to obtain the call information of the microservice request; A parsing module is used to parse the call information through a dynamic topology awareness algorithm and obtain the call topology structure of the current microservice, specifically including: dividing the call information into different request groups according to the request ID; traversing the call information in the request group to establish a mapping table between the request and the microservice; establishing an adjacency matrix of microservice dependencies according to the mapping table; and merging adjacency matrices with the same dependency to obtain the topology structure of the current microservice; A judgment module is used to judge whether the current microservice has a performance problem according to the call topology structure; Judging whether the current microservice has a performance problem according to the calling topology structure includes: judging whether the downstream service of the root node microservice in the topology structure is empty; if so, outputting the critical path; if not, adding the downstream service to the critical path list, and executing the critical path perception algorithm in reverse order of the serial call of the downstream service; Judging whether the current microservice has a performance problem according to the call topology structure, further comprising: calculating a performance evaluation function of the microservice according to the P99 (delay data ranked 99th in percentage among all requests) response delay and average response delay of the critical path; judging whether the performance evaluation function is greater than a preset threshold; if so, adding the microservice to a microservice rescheduling task queue; Judging whether the current microservice has a performance problem according to the call topology structure, further comprising: when the average response delay of the critical path increases by more than two times, adding the microservice and the corresponding downstream service to a microservice rescheduling task queue; The rescheduling module is used to add the current microservice to the rescheduling task queue for rescheduling.

5. An electronic device, characterized in that: include: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, causes the at least one processor to execute the method for dynamic-aware rescheduling for large-scale microservice applications as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for dynamic-aware rescheduling for large-scale microservice applications as described in any one of claims 1 to 3.