Control system and micro service processing method
The control system identifies and removes critical microservices by calculating failure impact and optimizing system configuration, addressing the spread of failures and enhancing recovery and modernization in microservice-based systems.
Patent Information
- Application Number
- JP2023045074
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2043-03-22
AI Technical Summary
In microservice-based control systems, failures in critical microservices can spread to other microservices, causing significant impact and difficulty in isolating and recovering from such failures, with existing technologies failing to address this issue effectively.
A control system that includes a calculation unit to determine the failure impact of each microservice, identifying critical microservices, and a division/integration unit to divide or integrate microservices until no critical ones remain, using failure impact calculation and system requirements to optimize the system configuration.
The system effectively removes critical microservices, reducing the spread of failures and enabling faster recovery and modernization of the system, while ensuring real-time performance and maintainability.
Smart Images

Figure 2024134730000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a control system and a microservice processing method. [Background technology]
[0002] In the past, control systems for controlling the operation of controlled objects were required to be safe, and so were configured to be very large-scale. Such conventional control systems were called monoliths. Monoliths were configured to link a large number of programs and databases to prevent inconsistencies in processing. However, when a failure occurred in part of a control system configured as a monolith, it was difficult to isolate only the failed part from the control system. For this reason, the entire control system was stopped, the failed part was repaired, and operation was confirmed before the control system was restarted. Going through such a procedure takes a long time before the control system can be restarted.
[0003] Therefore, control systems that require stability are configured with a dual primary and secondary system. When a failure occurs in the primary control system, all systems are switched over to the secondary control system. However, the time required to switch from the primary to the secondary control system was long. Also, when updating conventional control systems, it was often necessary to stop the operation of the control system, so the only option was to perform the update during times when it would not interfere with business operations.
[0004] In recent years, instead of a monolithic structure, control systems that separate functions into service units provided by the control system and are configured by connecting multiple MSs (MS: Micro Services) are being considered. If a failure occurs in a control system configured with MSs, it is thought that the time required for switching can be shortened and the impact of the system failure can be reduced, since only the MS where the failure occurred can be switched to another MS. It was also thought that modernization would be possible by individually updating only the MSs that needed to be updated.
[0005] Patent document 1 states that "the occurrence of a service failure is detected by searching for service execution order definition information stored in the service configuration information management unit and determining whether the service execution order between the services indicated by the previous log and the services indicated by the input log matches the service execution order in the service execution order definition information stored in the service configuration information management unit." [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2013-3681 A Summary of the Invention [Problem to be solved by the invention]
[0007] By configuring a control system using MS, it is possible to replace the functions of existing control systems (OT (Operational Technology) assets). In addition, by building general-purpose functions with MS, it is thought that control systems can be provided not only in Japan but also around the world. For this reason, support tools for configuring control systems with MS have been developed. Also, in order to build control systems where real-time performance is important, the construction of control systems with multiple MSs has been considered. Real-time performance is an index that indicates the performance of the response to instructions input into a control system.
[0008] However, it was found that in a control system consisting of multiple MSs, a failure in one MS is likely to spread to other multiple MSs. In this way, an MS with a failure impact level greater than a reference value is called a "critical microservice (hereinafter abbreviated as "critical MS"). When a failure occurs in a critical MS, the failure of the critical MS can have a significant impact on other MSs, expanding the scope of the failure. For example, when another MS sends a message to the critical MS, a buffer overflow can occur because the critical MS cannot receive the message. In addition, an MS that is the destination of a message from the critical MS cannot receive a response message even if it sends a message to the critical MS, so it goes into an idle state.
[0009] For this reason, it has become clear that a microservice-based control system needs to have no critical MS, but in the past, no consideration was given to the critical MS. In addition, the technology disclosed in Patent Document 1 only detects the occurrence of a service failure, and therefore cannot eliminate the effect on other MSs when the MS in which the failure occurred is a critical MS.
[0010] The present invention has been made in consideration of the above circumstances, and aims to remove critical MS from a target system that has been converted into a microservice. [Means for solving the problem]
[0011] The control system of the present invention includes a calculation unit that calculates the failure impact level for each microservice that constitutes a target system, and a split-and-integration unit that defines a microservice whose failure impact level is greater than a reference value as a critical microservice, and performs a split-and-integration process to split critical microservices or integrate multiple microservices until there are no critical microservices in accordance with preset system requirements. Effect of the Invention
[0012] According to the present invention, it is possible to remove critical MS from a target system that has been converted into microservices by dividing critical microservices or by performing a division and integration process that integrates multiple microservices until there are no critical microservices left. Problems, configurations and effects other than those described above will become apparent from the following description of the embodiments. [Brief description of the drawings]
[0013] [Figure 1] 1 is a block diagram showing an example of the overall configuration of a target system and a control system according to an embodiment of the present invention; [Diagram 2] FIG. 1 is a block diagram showing a detailed example of the internal configuration of a target system having a microservice configuration and a control system according to an embodiment of the present invention. [Diagram 3] FIG. 1 is a schematic diagram showing a process flow for optimizing a microservice after a huge program according to an embodiment of the present invention is turned into a microservice. [Figure 4] 11 is a flowchart showing an example of MS division / integration processing according to an embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram illustrating an example of a configuration of system requirements according to an embodiment of the present invention. [Figure 6] FIG. 2 is a diagram showing the contents of availability according to an embodiment of the present invention. [Figure 7] FIG. 13 is a diagram illustrating an example of a switching time_degree conversion table according to an embodiment of the present invention. [Figure 8] FIG. 13 is a diagram showing an example of an importance_degree conversion table according to an embodiment of the present invention. [Figure 9] FIG. 13 is a diagram illustrating an example of a communication degree conversion table according to an embodiment of the present invention. [Figure 10] 4 is an example of a conversion table showing a relationship between a failure impact degree and a method of detecting and determining a critical MS according to an embodiment of the present invention. [Figure 11] 4 is a flow chart illustrating an example of a process for eliminating a critical MS according to an embodiment of the present invention. [Figure 12] FIG. 4 is a diagram showing examples of factors of critical MS in cases 1 to 3 according to one embodiment of the present invention. [Figure 13] FIG. 11 is a diagram illustrating an example of availability setting change in case 1 according to one embodiment of the present invention. [Figure 14] FIG. 13 is a diagram illustrating an example of service importance in case 2 according to an embodiment of the present invention. [Figure 15] FIG. 11 is a diagram illustrating an example of communication in case 3 according to an embodiment of the present invention. [Figure 16] 11 is a flowchart illustrating an example of a trade-off determination process according to an embodiment of the present invention. [Figure 17] FIG. 13 is a diagram illustrating an example of the processing time and the failure impact degree when the trade-off factor of Case 4 according to one embodiment of the present invention is real-time performance. [Figure 18] FIG. 13 is a diagram illustrating an example of maintainability and a failure impact degree when the trade-off factor in Case 5 according to one embodiment of the present invention is maintainability (MS size). [Figure 19] FIG. 13 is a diagram showing an example of a screen display on which a failure impact scope is visualized according to an embodiment of the present invention. [Figure 20] FIG. 11 is a diagram illustrating an example of a failure detection method using a checkpoint data transfer method according to an embodiment of the present invention. [Figure 21] FIG. 1 is a diagram illustrating an example of a failure detection method using a two-way transfer method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings. In this specification and the drawings, components having substantially the same functions or configurations are denoted by the same reference numerals, and duplicated descriptions are omitted. In the following, an example will be described in which the present invention is applied to a control system that controls the configuration of MSs when a target system to be controlled is configured of multiple MSs.
[0015] [One embodiment] FIG. 1 is a block diagram showing an example of the overall configuration of a target system 100 and a control system 200 according to an embodiment of the present invention.
[0016] (Before pre-processing) The target system 100 is a system with a conventional monolithic configuration, and is an example of a system that is the target of pre-processing to be converted into microservices by a system designer 10. Assumed as the target system 100 are control systems in various fields, such as railway control systems, traffic control systems, power control systems, plant control systems, and IT platforms.
[0017] Before the pre-processing for microservices, a conventional huge program 111 and parameters 112 are stored in a memory management unit 110 of the target system 100. The huge program 111 is configured by connecting various programs in a complex manner. In addition, parameters 112 that the huge program 111 refers to during processing are provided in the memory management unit 110. The configuration of these parameters 112 is also huge and complex.
[0018] (After pre-processing) By the pre-processing for conversion to microservices, a huge program 111 and parameters 112 are converted to microservices. Each of the multiple microservices 121 (microservices MS_A to MS_F) converted to microservices has parameters 122. The microservices 121 (microservices MS_A to MS_F) are stored in a memory management unit 120 of the target system 100.
[0019] The microservices 121 (microservices MS_A to MS_F) stored in the memory management unit 120 by the pre-processing are not optimized, and there is a possibility that a critical MS exists. For this reason, the following processing is performed to divide or integrate the microservices 121 that are critical MS. Note that in the processing to divide or integrate the microservices 121, the parameters 122 of the microservices 121 are also appropriately divided or integrated. A target system 100 configured with a plurality of microservices 121 will be described below.
[0020] The control system 200 performs a process of replacing the target system 100, which has a conventional monolith configuration, with a microservice configuration according to this embodiment. For this purpose, microservice rules 224 set by the system designer 10 are registered in the control system 200. The microservice rules 224 include, for example, rules used in the determination process of the flowchart in Fig. 4, which will be described later, as well as system requirements 300 and the like.
[0021] In addition, an MS division / integration program 232 that divides one MS or integrates multiple MSs is registered in the control system 200. The MS division / integration program 232 can divide the large program 111 into multiple microservices or integrate it into one microservice in accordance with the microservice conversion rules 224.
[0022] <Example of internal configuration of target system and control system> FIG. 2 is a block diagram showing a detailed example of the internal configuration of the target system 100 and the control system 200, which are configured using microservices.
[0023] (Example of target system configuration) The target system 100 includes a memory management unit 120, a calculation unit 130, an input unit 140, an output unit 150, and a communication processing unit 160. The memory management unit 110 is omitted from FIG.
[0024] The memory management unit 120 stores and manages a plurality of microservices 121 (microservices MS_A to MS_F) shown in FIG.
[0025] The calculation unit 130 can execute a control program 131. In order to perform calculations for processing required in the target system 100, the control program 131 reads out the necessary microservices 121 from the memory management unit 120, controls the execution of the microservices, and controls the operations of the input unit 140, the output unit 150, and the communication processing unit 160. The calculation unit 130 is composed of, for example, a central processing unit (CPU), a read only memory (ROM), and a random access memory (RAM). The CPU of the calculation unit 130 reads out program codes of software that realize each function according to the present embodiment from the ROM, loads them into the RAM, and executes them. Variables, parameters, etc. that are generated during the calculation processing of the CPU are temporarily written to the RAM of the calculation unit 130, and these variables, parameters, etc. are appropriately read by the CPU.
[0026] The input unit 140 includes, for example, a keyboard, a mouse, etc., and enables the user of the target system 100 to input predetermined operations and give instructions. The output unit 150 is, for example, a liquid crystal display monitor, and displays the results of the processing performed by the calculation unit 130 to the user of the target system 100. The communication processing unit 160 may, for example, be a NIC (Network Interface Card), and various data may be transmitted and received between the control system 200 and the control system 200 via a LAN (Local Area Network), a dedicated line, or the like connected to a terminal of the NIC.
[0027] (Control system configuration example) The control system 200 includes a memory management unit 220, a calculation unit 230, an input unit 240, an output unit 250, and a communication processing unit 260. The control system 200 may be a PC or a server to which the system designer 10 can input operations, or may be a cloud server built on the cloud.
[0028] The calculation unit 230 can execute a failure impact calculation program 231, an MS division / integration program 232, and a control program 233. The calculation unit 230 is configured with, for example, a CPU, a ROM, and a RAM. The CPU of the calculation unit 230 reads out the program code of the software that realizes each function according to this embodiment from the ROM, loads it into the RAM, and executes it. Variables, parameters, etc. generated during the calculation process of the CPU are temporarily written to the RAM of the calculation unit 230, and these variables, parameters, etc. are read out appropriately by the CPU. Each program of the calculation unit 230 reads out the parameters 221, the requirement data 222, the failure impact data 223, and the microservice conversion rules 224 from the memory management unit 220, and performs an optimization process of the microservice according to this embodiment. This optimization process is a process in which the calculation unit 230 performs a division and integration process of the microservice according to the system requirements 300, excluding the critical MS.
[0029] The failure impact calculation program 231 (an example of a calculation unit) calculates the failure impact for each microservice constituting the target system 100. The failure impact is an index of the impact on other microservices when a failure occurs in a microservice. A microservice with a failure impact greater than a reference value is detected as a critical MS. The failure impact calculation program 231 calculates the failure impact using, for example, three elements (switching time, service importance, and communication index). These three elements are, for example, the switching time required to switch a microservice in which a failure has occurred to another microservice, the importance of a service provided by the microservice, and a communication index related to communication of the microservice. The failure impact calculation program 231 calculates the failure impact based on an index (switching time_degree) calculated from the switching time, an index (service importance_degree) calculated from the importance of the service, and an index (communication_degree) calculated from the communication index by using any of the average value, multiplication value, maximum value, and minimum value.
[0030] Switching time is the time required to switch to another microservice when a microservice fails. For example, taking over a microservice on a newly launched server or information processing device is called "switching." The longer the switching time, the greater the impact on the failure impact.
[0031] Service importance indicates the importance of a service. For example, if the service importance is high, when a failure is detected in the microservice that provides the service, the impact on the service is large. Also, if the service importance is medium, the service importance changes depending on the content of the actual processing in the service. For example, when a service is started periodically, a service on the order of seconds has a higher service importance than a service on the order of minutes. Also, in the target system 100, there are processes that do not occur periodically, that is, processes that occur irregularly, and these processes are called events. A service that starts when an event occurs has a lower service importance than a service on the order of minutes. Note that if the content of a service is a diagnostic process, the start of the process is instructed manually or the process starts while other services are stopped, so the impact on other services is small. Therefore, when the content of a service is a diagnostic process, the service importance of this service is the lowest.
[0032] A communication index is an element used when a microservice communicates with other microservices, and is determined, for example, from the communication range, communication type, and communication frequency. The communication range is a value calculated, for example, from the number of communicating MSs / total number of MSs and the number of events, and indicates the number of other microservices connected to a microservice. The communication type is determined by synchronous or asynchronous. Synchronous has a greater impact on the service than asynchronous. Furthermore, the communication frequency is expressed, for example, as the number of communications per second, and the higher the communication frequency, the greater the impact on the service. In the following explanation, the communication index may be referred to as "communication."
[0033] The impact of a failure that occurs in a microservice is calculated as failure impact level (E) using the formula (switching time_level)*(service importance_level)*(communication_level). In the following explanation, the value of an element with "_level" appended is a normalized value in the range of 0 to 1. The failure impact level calculated by the failure impact level calculation program 231 is stored in the memory management unit 220 as failure impact level data 223.
[0034] The MS division / integration program 232 (an example of a division / integration unit) performs a division / integration process of dividing a critical MS or integrating multiple microservices until there is no critical MS, according to a preset system requirement 300 (see FIG. 5 described later). For example, the MS division / integration program 232 performs a division / integration process of further dividing the microservice 121 of the target system 100 shown in FIG. 1 or integrating multiple microservices 121 to generate one microservice, based on the microservice creation rule 224 read from the storage management unit 220. When the MS division / integration program 232 integrates multiple microservices 121, it is possible to reduce the number of microservices and improve the maintainability of the microservices. For this reason, when the MS division / integration program 232 detects a critical MS, it performs the following (1) division or integration process of the critical MS (program division) and (2) parameter reconfiguration (setting file).
[0035] (1) Processing of division or consolidation of critical MS (referred to as "MS division / consolidation") Division: A process to divide an MS when the impact on communication is large. Integration: When real-time performance is reduced by dividing an MS that has a large impact on real-time performance, the process of integrating the MS to satisfy real-time performance. (2) Parameter reset processing - Parameter items to be reset Buffer size, timeout time, and number of retries Reading external disks ·others
[0036] The services that the target system 100 can provide are constructed by combining multiple microservices. A microservice is composed of multiple programs. For this reason, the division / integration process of the MS is performed on a program basis, not on a service basis.
[0037] The control program 233 reads necessary data from the memory management unit 220 and controls the operation of the microservices in order to perform calculations for processing required by the target system 100. The control program 233 also controls the operation of the input unit 240, the output unit 250, and the communication processing unit 260.
[0038] The memory management unit 220 stores and manages parameters 221, requirement data 222, fault impact data 223, and microservices rules 224.
[0039] The parameters 221 include a failure detection time, a retry time, and a retry count.
[0040] The requirement data 222 includes availability data, RT (Real Time) data (hereinafter abbreviated as RT data), and maintainability data.
[0041] The input unit 240 includes, for example, a keyboard, a mouse, etc., and enables the system designer 10 to input predetermined operations and give instructions. The output unit 250 is, for example, a liquid crystal display monitor, and displays the results of the processing performed by the calculation unit 230 to the system designer 10. The communication processing unit 260 may be, for example, a NIC, and may transmit and receive various data to and from the target system 100 via a LAN, a dedicated line, or the like connected to a terminal of the NIC.
[0042] 3 is a schematic diagram showing the flow of processing for optimizing the microservices after the huge program 111 is made into a microservice. The flow of processing will be explained with arrows and numbers in the diagram.
[0043] (1) Preliminary MS division processing Prior to the MS division / integration processing according to this embodiment, the target system 100 undergoes a preliminary MS division process. At this time, a huge monolithic program 111 stored in the memory management unit 110 is divided into a plurality of microservices and stored in the memory management unit 120. This MS division process is a process in which the system designer 10 roughly divides the huge program 111, and detailed requirements are not required.
[0044] (2) Setting system requirements Next, the system designer 10 sets system requirements 300 in the memory management unit 220 as the microservices rules 224 shown in Fig. 1. The system requirements 300 include, for example, availability 310, MS real-time performance 320, and maintainability 330. The availability 310, MS real-time performance 320, and maintainability 330 are all requirements set for each microservice.
[0045] (3) MS division / merging A failure impact calculation program 231 of the control system 200 calculates the failure impact of a microservice. An MS division / integration program 232 divides or integrates the microservices 121 stored in the memory management unit 120 based on the microservices conversion rules 224. The control system 200 can automatically perform the microservices conversion process, but may also be configured to interactively instruct the system designer 10 to execute the process and to confirm the execution result of the process.
[0046] (4) Receiving the division results from the target system 100 to the control system 200 The MS division / integration program 232 receives the division results of the microservices 121 from the target system 100. The division results include the results of the microservices and the requirements of the microservices.
[0047] (5) Confirmation of the division result received by the control system 200 The system designer 10 checks the division results received by the control system 200 .
[0048] (6) Resetting system requirements 300 If the division result indicates that there is an optimal solution, no further processing is required. An optimal solution exists when, as a result of the division and integration processing, there are no critical MSs and all microservices satisfy the system requirements 300. Therefore, if the microservice 121 resulting from the division satisfies the system requirements 300, the system designer 10 ends the processing. On the other hand, if the division result indicates that there is no optimal solution, the system designer 10 resets the system requirements 300 and notifies the control program 233 that the system requirements 300 have been reset.
[0049] (7) Re-instruction for division / integration of MS The system designer 10 inputs an instruction to cause the control system 200 to again divide / integrate the MSs based on the reconfigured system requirements 300. Thereafter, the above-mentioned processes (3) to (5) are executed again.
[0050] Here, the failure impact degree (E) calculated by the failure impact degree calculation program 231 in process (3) will be explained. The failure impact degree (E) is an index showing how the impact of a failure occurring in a microservice affects other microservices, and is defined by the switching time_degree E(to), service importance_degree E(pr), and communication_degree E(cm) in the following formula (1). If the failure impact degree is greater than the reference value (C), it is determined to be a critical MS.
[0051] E = E(to) * E(pr) * E(cm) …(1)
[0052] The impact of a fault is determined by multiplication or maximum value. If any one of the fault impact (E), switching time_degree E(to), service importance_degree E(pr), or communication_degree E(cm) is important, the fault impact (E) is considered to be large. 0≦E≦1 0 ≦ E(to), E(pr), E(cm) ≦ 1
[0053] Switching time_degree E(to) The conversion table described later is used to convert the switching time_degree E(to) so that 0≦(switching time_degree)≦1. Switching time_degree E(to) is determined by, for example, the failure detection time, the message retransmission time, the retry time, the number of retries, or the hard disk read time (shared data read). If the switching time is long, the scope of the impact of the failure will expand.
[0054] ·Importance_degreeE(pr) A conversion table is used to convert the value so that 0 ≦ (service importance_level) ≦ 1. Service importance is determined based on the role of the business. If an important service fails, the scope of the failure will be wider.
[0055] Communication degree E (cm) Conversion is performed using a conversion table so that 0≦(communication_degree)≦1. The communication_degree is converted based on, for example, the number of receiving MSs / total number of MSs, the number of transmitting MSs / total number of MSs, the number of communication target MSs / total number of MSs, the communication frequency, the communication range, the communication mode (synchronous / asynchronous), or the event type.
[0056] Fig. 4 is a flowchart showing an example of the MS division / integration process. The MS division / integration process shown in Fig. 4 shows an example of a microservice processing method performed at the time of system design when dividing the target system 100 into microservices.
[0057] First, the system designer 10 divides the monolithic huge program 111 into microservices before starting this process (S1). Here, the system designer 10 divides the huge program 111 into microservices by desk calculation or by simply running a tool (S1A). Next, the failure impact calculation program 231 of the control system 200 calculates the failure impact (S2).
[0058] The processing described below is roughly divided into processing 400 for eliminating a critical MS and processing 410 for determining the trade-off between real-time performance and maintainability (MS size). In process 400, the MS division / integration program 232 determines whether or not a critical MS has been detected in the microservice divided in step S1 (S3). If it is determined that a critical MS has been detected (YES in S3), the MS division / integration program 232 divides or integrates the critical MS (S4).
[0059] Moreover, the MS division / integration program 232 sets parameters for the microservices divided or integrated in step S4 according to the algorithm (S5). After that, the process moves to step S2 again, and the failure impact calculation program 231 calculates the failure impact (S2), and repeats the process until no critical MS is detected.
[0060] If it is determined that a critical MS has not been detected in the processing of step S3 (NO in S3), the MS division / integration program 232 evaluates the real-time property and MS size of the microservice (S6). Then, the MS division / integration program 232 determines whether or not both the real-time property and the MS size of the microservice are OK (S7). In step S7, if either the real-time property or the MS size is not OK, the microservice is evaluated as not being an optimal MS. Note that real-time property and maintainability (MS size) are in a trade-off relationship in which maintaining ability decreases as real-time property is increased, and maintaining ability decreases as real-time property is decreased.
[0061] If it is determined that neither the real-time capability nor the MS size is OK (NG in S7), the MS division / integration program 232 divides or integrates the microservices (S8). The MS division / integration program 232 also sets parameters for the divided or integrated microservices (S9). After that, the process returns to step S2, where the failure impact calculation program 231 calculates the failure impact (S2) and repeats the process.
[0062] If it is determined that neither the real-time capability nor the MS size is OK despite the process of step S7 being performed a predetermined number of times, the optimal MS has not been found. For this reason, the MS division / integration program 232 notifies the system designer 10 of a warning (S10). The system designer 10 who has been notified of the warning manually resets the system requirements 300 (see FIG. 3) and executes this process again (S11). For example, if the system designer 10 wants to prioritize real-time capability even if it means a larger MS size, it is assumed that the MS size requirement will be relaxed.
[0063] If it is determined in the process of step S7 that both the real-time property and the MS size are OK (OK in S7), the MS division / integration program 232 ends this process.
[0064] <System requirements description> Next, the system requirements 300 will be described in detail.
[0065] FIG. 5 is a diagram showing an example of the configuration of the system requirements 300. As shown in FIG. The system requirements 300 are composed of performance classification, performance item, value, and content items. 3, the performance classification of the system requirement 300 is divided into availability 310, real-time performance 320, and maintainability 330. The MS division / integration program 232 performs division and integration processing so as to satisfy the system requirement 300 in the order of real-time performance, availability, and maintainability.
[0066] In the availability 310, the performance item is "switching time," the value of the switching time is, for example, 5 seconds, and the content of the availability 310 is "MS switching time." In other words, the availability 310 defines the switching time until a failed MS is switched to a normal MS.
[0067] In real-time performance 320, the performance item is "execution time", the execution time value is, for example, 12 milliseconds, and the content of real-time performance 320 is "execution time of mission-critical service." In other words, an MS that requires real-time performance is required to complete processing within the execution time.
[0068] In maintainability 330, the performance item is "MS size", the value of the MS size is, for example, 5kstep, and the content of maintainability 330 is "MS size". In other words, the larger the MS size is, the lower the maintainability is, so it is required to divide or integrate until the MS size is less than 5kstep.
[0069] As described above, if the failure impact (E) calculated from the availability 310, real-timeness 320, and maintainability 330 is greater than the reference value C, it indicates that the microservice is a critical MS. Therefore, the MS division / integration program 232 can eliminate the critical MS by repeating the division / integration process to reduce the value of the failure impact.
[0070] FIG. 6 is a diagram showing the contents of the availability 310. The availability 310 is made up of items of performance classification, parameter, and value.
[0071] The parameters of the availability 310 include an alive message, a retry time, and a retry count. The alive message is a message that is issued at regular intervals to check whether other microservices are operating normally.
[0072] A retry is an attempt to execute the same process again when the processing of a microservice terminates abnormally, etc. For example, when a microservice cannot send an alive message, it will try to send the alive message again after a certain period of time. The retry time is, for example, the time it takes for a microservice to determine whether or not to send an alive message. If a response to an alive message sent to another microservice cannot be received within the retry time, a retry is performed. The retry count is the number of times the microservice will retry. For example, the alive message is set to 3 seconds, the retry time is set to 2 seconds, and the retry count is set to 2. With the values shown in FIG. 6, the fault detection time is calculated as 3 seconds + 2 seconds × 2 times = 7 seconds.
[0073] <Explanation of the elements of failure impact level and the failure impact level conversion table> Next, the elements of the failure impact level and the failure impact level conversion table will be described with reference to FIGS.
[0074] FIG. 7 is a diagram illustrating an example of a switching time_degree conversion table. The conversion table for switching time_degree is composed of the items of microservice (MS), switching time, and switching time_degree. As described above, switching time_degree is set for each microservice within the range of 0≦(switching time_degree)≦1.
[0075] For example, when the switching time of the microservice MS_A is 1 second or less, the switching time_degree is "0.9." When the switching time of the microservice MS_B is 1 to 3 seconds or less, the switching time_degree is "0.7."
[0076] FIG. 8 is a diagram illustrating an example of a conversion table of importance_degree. The importance_level conversion table is composed of the items service, service importance, and microservice. As described above, importance_level is set for each microservice within the range of 0≦(service importance_level)≦1.
[0077] The service items include service_A to service_D. The service importance item stores the service importance for each of services_A to_D. In the microservices section, the microservices that make up Service_A to Service_D are represented by circles.
[0078] For example, the service importance of service_A is 0.9 and is composed of microservices MS_A, MS_B, and MS_F. The service importance of service_B is 0.9 and is composed of microservices MS_B and MS_C. The service importance of service_C is 0.5 and is composed of microservices MS_A, MS_C, MS_D, and MS_F.
[0079] Then, by using the importance_degree conversion table, the microservice importance (average value) can be calculated from the service importance. For example, the importance of microservice MS_A is calculated as (0.9+0.5) / 2=0.7, and the importance of microservice MS_B is calculated as (0.9+0.9) / 2=0.9. Similarly, the importance of microservices MS_C to MS_F is calculated.
[0080] FIG. 9 is a diagram illustrating an example of a communication_degree conversion table. The communication_degree conversion table is composed of the following items: communication range (Com_R), communication frequency (Com_F), communication type (Com_T), and average communication_degree. As described above, the communication_degree is set in the range of 0≦(communication_degree)≦1.
[0081] The communication range (Com_R) is expressed as the number of communicating MSs divided by the total number of MSs. For example, if the communication range is 0 to 1% or less, it is calculated as "0.2", and if it is 1 to 20% or less, it is calculated as "0.4". The communication frequency (Com_F) is calculated as the number of transmissions and receptions per second. For example, if the communication frequency is between 0 and 1 time, it is calculated as "0.2", and if it is between 1 and 30 times, it is calculated as "0.4". The communication type (Com_T) is expressed as synchronous or asynchronous. For example, if it is synchronous, it is calculated as "0.3", and if it is asynchronous, it is calculated as "0.7".
[0082] The communication_degree average value is calculated by the formula {(Com_R)+(Com_F)+(Com_T)} / 3. For example, if the communication range (Com_R) is 0-1% or less, the communication frequency (Com_F) is 0-1 or less, and the communication type (Com_T) is synchronous, the communication_degree average value is calculated as "0.23".
[0083] FIG. 10 is an example of a conversion table showing the relationship between the failure impact level and the method of detecting and determining a critical MS. This table is composed of the following items: MS, failure impact level, critical MS detection judgment, availability, importance, and communication item.
[0084] The MS item stores microservices MS_A to MS_F. Therefore, the value of each item is calculated for each microservice. The failure impact item stores the values of failure impact (E), switching time_degree E(to), service importance_degree E(pr), and communication_degree E(cm) calculated for each microservice.
[0085] The critical MS detection judgment item stores the result of the detection judgment of a critical MS. If the failure impact degree (E) of a microservice is greater than the reference value (C), this microservice is judged to be a critical MS. A circle is stored for microservices judged to be critical MS, and a cross is stored for microservices judged not to be critical MS. For example, microservices MS_A to MS_C are judged to be critical MS.
[0086] In the availability, importance, and communication items, a cross is stored for those microservices that are determined to be critical MS and do not meet the requirements. In Fig. 10, MS_A to MS_C are determined to be critical MS, and microservice MS_A does not meet the availability requirement. Microservice MS_B does not meet the service importance requirement. Microservice MS_C also does not meet the communication requirement.
[0087] On the other hand, microservices MS_D to MS_F are not critical MS. However, microservices MS_D and MS_E do not satisfy real-time performance, as will be described as case 4 in FIG. 16 below. Also, taking service 4 into consideration, MS_F does not satisfy maintainability due to its large MS size, as will be described as case 5 in FIG. 16 below. Note that real-time performance is determined by the type of service, not the microservice. For this reason, even if one microservice satisfies real-time performance, a service composed of multiple microservices may not satisfy real-time performance.
[0088] The average values of communication range (Com_R), communication frequency (Com_F) and communication type (Com_T) are stored on the right side of the communication_degree conversion table shown in Fig. 9, and the multiplication value of switching time_degree E(to), service importance_degree E(pr) and communication_degree E(cm) is stored as the failure impact degree in the conversion table shown in Fig. 10. However, these values may be calculated by various calculation formulas such as taking the average, taking the maximum value or the minimum value.
[0089] Next, the processing performed by the calculation unit 230 of the control system 200 shown in FIG. 2 will be described. 11 is a flowchart showing an example of a process for eliminating a critical MS. Here, the process for eliminating a critical MS is performed based on the result of the failure impact calculation program 231 calculating the failure impact (E) of the critical MS.
[0090] It is assumed that, prior to the processing shown in FIG. 11, the large program 111 is divided into six microservices (MS_A, MS_B, MS_C, MS_D, MS_E, and MS_F) in step S1 shown in FIG. 4.
[0091] Next, in step S2 shown in Fig. 4, the failure impact calculation program 231 calculates the failure impact of six microservices (MS_A, MS_B, MS_C, MS_D, MS_E, MS_F), and it is assumed that the microservices MS_A, MS_B, and MS_C are detected as critical MS in step S3 shown in Fig. 4. The process shown in Fig. 11 is a process that is performed after it is detected in step S3 shown in Fig. 4 that multiple microservices have critical MS.
[0092] In this process, the failure impact calculation program 231 determines the cause of the critical MS. For example, the failure impact calculation program 231 determines whether or not the cause of the critical MS is switching time (S21). Whether or not the cause of the critical MS is switching time is determined, for example, by parameters, timeout, retry interval, and number of retries, and by checkpoint data, by MS size and read time. Checkpoint data is data necessary for a failure occurring in a microservice and for another microservice to take over.
[0093] Even if a microservice is split or merged, the parameters (timeout, retry interval, number of retries) do not change. On the other hand, when a microservice is split, the size of the checkpoint data becomes smaller, so the time to read the checkpoint data also decreases. Conversely, when multiple microservices are merged, the size of the checkpoint data becomes larger, so the time to read the checkpoint data increases.
[0094] If the cause of the criticality MS is the switching time, which is one of the availability determination items (YES in S21: Case 1), the failure impact calculation program 231 resets the parameters of the microservice MS_A (S22).
[0095] Next, the failure impact calculation program 231 calculates the failure impact (S23) and determines whether the failure impact satisfies the reference value, i.e., whether the failure impact (E) is greater than the reference value (C) (S24). If the failure impact does not satisfy the reference value (NO in S24), the failure impact calculation program 231 returns to step S21 again and repeats the process. If the failure impact satisfies the reference value (YES in S24), the failure impact calculation program 231 ends this process.
[0096] In step S21, if the cause of the critical MS is not switching time (NO in S21), the failure impact calculation program 231 judges whether or not the cause of the critical MS is communication (S25). Whether or not the cause of the critical MS is communication is determined based on, for example, the communication range (number of communicating MSs / total number of MSs), the communication frequency (number of communications / second), or the communication form (synchronous, asynchronous).
[0097] If the cause of the critical MS is communication (YES in S25: Case 3), the MS division / integration program 232 divides the microservice. At this time, the MS division / integration program 232 performs the division / integration process based on at least the communication range, communication frequency, and communication form as communication indicators.
[0098] Next, the failure impact calculation program 231 calculates the failure impact (S23) taking into consideration the communication between the sending microservice and the receiving microservice (S26). For example, the MS division / integration program 232 divides the microservice MS_C, which is a critical MS, into microservices MS_C1 and MS_C2. Next, the failure impact calculation program 231 calculates the failure impact of the microservices MS-C1 and MS-C2, and determines whether or not each failure impact (E) is equal to or less than the reference value (C) and satisfies the reference value (S24).
[0099] In step S25, if the cause of the critical MS is not communication (NO in S25: Case 2), the failure impact calculation program 231 notifies the system designer 10 that the cause of the critical MS is service importance (S27), and ends this process.
[0100] Service importance is a fixed value that cannot be changed. A microservice with high service importance generally has a short switching time and a wide communication range. Therefore, when the service importance of a microservice is high, it is desirable to perform the division and integration process taking into account the switching time and communication range. Note that, when the service importance can be changed, the system designer 10 may reset the importance of the microservice MS-B.
[0101] The process shown in Fig. 11 is repeatedly executed until there are no more critical MSs. When there are no more critical MSs, the trade-off judgment process 410 shown in Fig. 4 is executed. However, as described later, there are cases where the critical MSs cannot be completely eliminated and the core parts of the critical MSs remain. In this case, the control program 233 treats the core parts of the critical MSs as equivalent to the critical MSs and multiplexes them, so that the service can be continued even when a failure occurs in the critical MS.
[0102] <Impact of each case> 12 is a diagram showing examples of factors of a critical MS in cases 1 to 3. This diagram is made up of items such as a case, a calculation formula for the failure impact level, processing content, and the relevant MS.
[0103] The case item stores cases 1 to 3 shown in FIG. 11. Cases 1 to 3 are examples of critical MS. An MS whose failure impact level (E) is greater than the reference value (C) of "0.2" is considered to be a critical MS. In order to eliminate a critical MS, it is necessary to improve the maximum index among switching time_level, importance_level, and communication_level.
[0104] The items in the failure impact calculation formula include the calculated failure impact (E), switching time_degree E(to), service importance_degree E(pr), or communication_degree E(cm).
[0105] In the processing content item, processing content for each of cases 1 to 3 is stored. In the corresponding MS item, MS_A corresponding to case 1, MS_B corresponding to case 2, and MS_C corresponding to case 3 are stored.
[0106] In case 1, the microservice MS_A is targeted, and the failure impact degree is improved by resetting the parameter 122 to the switching time_degree (0.9). Therefore, the "resetting of parameters" shown in step S22 of FIG. 11 is stored as the processing content in the processing content item of case 1.
[0107] In case 2, the failure impact level is improved by notifying the system designer 10 of the importance level (0.9) for the microservice MS_B and resetting the parameter 122. Therefore, "notify the system designer 10" and "reset the parameter 122" shown in step S27 of Fig. 11 are stored as processing contents in the processing contents item of case 2.
[0108] In case 3, the MS division / integration program 232 divides the microservice MS_C so as to reduce the communication degree (0.8), thereby improving the failure impact degree. For this reason, the "divide microservice" shown in step S26 of FIG. 11 is stored as the processing content in the processing content item of case 3.
[0109] <Settings for Case 1> In case 1, since the failure impact (E) of the microservice MS_A is greater than the reference value (C), the microservice MS_A is determined to be a critical MS. The parameters for the microservice MS_A are reset by an inquiry with the system designer 10. Then, the parameters are reset by changing the retry time and the number of retries. After that, the failure impact (E) of the microservice MS_A whose parameters have been reset is recalculated.
[0110] Fig. 13 is a diagram showing an example of availability setting change in case 1. The table shown in Fig. 13 is composed of items such as presetting or resetting type of parameter 122 (indicated as "presetting / resetting"), parameter, and failure impact level.
[0111] The parameter items include configurable items (failure detection time, retry time, number of retries) and values. The failure impact level item stores the calculated failure impact level (E), switching time_level E(to), service importance_level E(pr), or communication_level E(cm), similar to the items in the failure impact level calculation formula shown in FIG. 12.
[0112] When the preset parameters 122 include a failure detection time of 1 second, a retry time of 1 second, and a retry count of 0, the calculated failure impact (E) is "0.315." If the reference value (C) for determining a critical MS is "0.2," then the failure impact (E) is greater than the reference value (C), and the microservice is divided.
[0113] On the other hand, when the reconfigured parameters are failure detection time 1 second, retry time 2 seconds, and retry count 2 times, the calculated failure impact (E) is "0.175". Since failure impact (E) < reference value (C), no further division of the microservice will be performed.
[0114] <Settings for Case 2> In case 2, since the failure impact (E) of microservice MS_B is greater than the reference value (C), microservice MS_B is determined to be a critical MS. The parameters for microservice MS_B are reset by inquiring of the system designer 10. At this time, the system designer 10 is inquired of whether the importance can be lowered. If the inquired importance is a service importance, the system designer 10 reconsiders the service importance. For example, the system designer 10 reviews the service importance of service_A and service_B, which are services related to microservice MS_B, and resets the service importance. The system designer 10 then determines the importance of microservice MS_B based on the reset service importance value.
[0115] Fig. 14 is a diagram showing an example of service importance in case 2. The table shown in Fig. 14 is composed of items such as presetting or resetting type of parameter 122 (indicated as "presetting / resetting"), parameter, and failure impact level.
[0116] The parameter items include configurable items (service, MS) and values. The item of failure impact level stores the calculated failure impact level_level (E), switching time level_level E(to), service importance level_level E(pr), or communication level_level E(cm).
[0117] In the preset parameters 122, the value of service_A is "0.9", the value of service_B is "0.9", and the value of the microservice MS_B used in both service_A and service_B is "0.9". In this case, the calculated failure impact (E) is "0.225". If the reference value (C) for determining a critical MS is "0.2", then the failure impact (E) is greater than the reference value (C), and so the parameters 122 are reset.
[0118] On the other hand, in the reset parameters 122, the value of service_A is "0.7", the value of service_B is "0.7", and the value of microservice MS_B used in both service_A and service_B is "0.7". In this case, the calculated failure impact (E) is "0.175". Here, since the failure impact (E) is less than the reference value (C), no further division of the microservice is performed.
[0119] <Settings for Case 3> In case 3, the failure impact degree (E) of the microservice MS_C is greater than the reference value (C), so the microservice MS_C is determined to be a critical MS. Therefore, the MS division / integration program 232 divides the MS microservice MS_C into microservices MS_C1 and MS_C2.
[0120] Fig. 15 is a diagram showing an example of communication in case 3. The table shown in Fig. 15 is composed of items such as presetting or resetting type of parameter 122 (indicated as "presetting / resetting"), MS, parameter, and failure impact level.
[0121] The MS item stores the preconfigured microservice MS_C and the reconfigured microservices MS_C1 and MS_C2. The parameter items include configurable items (communicating MS / all MSs, communication frequency, communication format) and values. The item of failure impact level stores the calculated failure impact level (E), switching time_level E(to), service importance_level E(pr), or communication_level E(cm).
[0122] In the preset parameters, the communication MS / total MS of the microservice MS_C is 40%, the communication frequency is 60 times, and the communication mode is asynchronous. In this case, the calculated failure impact (E) is "0.266". If the reference value (C) for determining a critical MS is "0.2", then the failure impact (E) is greater than the reference value (C), and the microservice is split.
[0123] <Trade-off decision process> Next, the trade-off determination process will be described with reference to FIGS. Figure 16 is a flowchart showing an example of a trade-off judgment process. Here, the real-time characteristics and maintainability of six microservices (MA-A, MA-B, MS-C1, MS-C2, MS-D, MS-E, MS-F) are evaluated. The evaluation priority in this process is real-time characteristics, availability, and maintainability, in that order. Also, if the criteria for each evaluation item are not met, a warning is issued.
[0124] First, the MS division / integration program 232 judges whether or not the factor of the trade-off is real-time performance (S31). When a critical MS is divided, the MS size is reduced and the degree of impact of a failure is reduced. In addition, the processing load for each divided microservice is reduced, so the response to a request made to the microservice is faster and real-time performance is improved. Therefore, the real-time performance of the divided microservices is evaluated first. The evaluation of real-time performance is determined based on whether or not the execution time of the microservice is within a predetermined time. If the execution time of the microservice is within the predetermined time, it is determined that there is no problem with the real-time performance. On the other hand, if the execution time of the microservice is equal to or longer than the predetermined time, it is determined that there is a problem with the real-time performance.
[0125] In step S31, if the factor of the trade-off is real-time performance (YES in S31: Case 4), the failure impact calculation program 231 evaluates the microservice as OK if it satisfies the real-time performance. On the other hand, the MS division / integration program 232 evaluates the microservice as NG if it does not satisfy the real-time performance, and optimizes the parameters 122 of the microservice so that it satisfies the real-time performance. For example, if the relevant part of the critical MS that affects the real-time performance is divided, the MS division / integration program 232 integrates the divided microservices, changes the parameters, returns it to the critical MS, and calculates the real-time time (S32).
[0126] The process in which the MS division / integration program 232 integrates the divided microservices and returns them to the critical MS places more importance on real-time performance than availability. The system designer 10 is notified of the return to the critical MS as a warning. In addition, if the MS size of the critical MS becomes larger than a reference value as a result of integration into the critical MS, the system designer 10 is also notified of a warning. Note that when multiple microservices are integrated into a critical MS, processing becomes heavy and response becomes slow, so that real-time performance is likely to decrease. However, if the number of programs decreases as the size of the microservices increases, program maintenance becomes easier and maintainability improves.
[0127] Next, the failure impact calculation program 231 calculates the failure impact (E) of the integrated microservice (S33), and judges whether the failure impact (E) satisfies the reference value (C), i.e., whether the failure impact (E) is equal to or less than the reference value (C) (S34). If the failure impact (E) does not satisfy the reference value (C) (NO in S34), the process returns to step S31 and the trade-off judgment process is repeated. On the other hand, if the failure impact level (E) satisfies the reference value (C) (YES in S34), the failure impact level calculation program 231 ends this processing.
[0128] In case 4, for example, it is assumed that the factor of the trade-off between microservices MS_D and MS_E is real-time performance. If the relevant part (transaction) that affects real-time performance is divided to create microservices MS_D and MS_E, the MS division / integration program 232 integrates the microservices MS_D and MS_E, and calculates the execution time of the integrated microservice. After that, the failure impact calculation program 231 judges whether the execution time of the integrated microservice is within a predetermined time. In addition, the failure impact calculation program 231 calculates the failure impact of the integrated microservice, and judges whether the failure impact meets a reference value.
[0129] In step S31, if the trade-off factor is not real-time performance (NO in S31), the maintainability of the microservice is evaluated. The maintainability of the microservice is determined by evaluating the size of the microservice and determining whether it is equal to or smaller than a predetermined value. If the MS size is equal to or smaller than the predetermined value, it is determined that there is no problem with maintainability. On the other hand, if the MS size is larger than the predetermined value, it is determined that there is a problem with maintainability.
[0130] Therefore, the failure impact calculation program 231 judges whether or not the factor of the trade-off is the MS size (S35). If the factor of the trade-off is the MS size (YES in S35: Case 5), the failure impact calculation program 231 judges whether or not the MS size is less than a certain value.
[0131] If the failure impact calculation program 231 determines that the MS size of the microservice is less than a certain value, it evaluates it as OK and ends the process. On the other hand, if the failure impact calculation program 231 determines that the MS size of the microservice is equal to or greater than a certain value, it evaluates it as NG and notifies the system designer 10 of a warning. In this case, the failure impact calculation program 231 prioritizes real-timeness and availability at the expense of MS maintainability (S36). After that, the failure impact calculation program 231 ends this process. For this reason, first, real-timeness is prioritized in step S31, and then, if the MS size related to maintainability is a factor in the trade-off in step S35, real-timeness and availability are prioritized. And finally, maintainability is prioritized.
[0132] In case 5, for example, it is assumed that the trade-off factor of microservice MS_F is maintainability. In this case, the MS division / integration program 232 divides the microservice MS_F, which is the trade-off factor. However, as in case 4, if dividing the microservice MS_F affects real-time performance, the microservice is not divided. After that, the failure impact calculation program 231 calculates the failure impact of the divided microservice MS_F, and determines whether the failure impact satisfies a reference value. After that, a warning is notified to the system designer 10.
[0133] In step S35, if the trade-off factor is not the MS size (NO in S35: Case 6), there is no trade-off factor, so the failure impact calculation program 231 ends this process without doing anything.
[0134] 17 is a diagram showing an example of the processing time and the fault impact degree when the trade-off factor in case 4 is real-time performance. Here, a description will be given assuming that a YES determination is made in step S31 in FIG. 16 (case 4).
[0135] The left side of this table is made up of the MS to be calculated and each item of real-time performance, and the right side of the table is made up of the failure impact degree and each item of the MS to be calculated. The target value shown on the left side of the table is a value for judging real-timeness, and is expressed as the total time of the execution time and waiting time of the microservice. In this example, the target value is a total time of 12 ms.
[0136] The real-time performance is calculated for each of the pre-processing time and the reconfiguration processing time. The pre-processing time indicates the execution time, waiting time, and total time of the processes performed by the microservices MS_D and MS_E. The total time shown in the pre-processing time is 15 ms, which exceeds the target value of 12 ms.
[0137] Additionally, the failure impact level shown on the right side of the table stores the values calculated for each of the microservices MS_D and MS_E. For example, the failure impact level (E) of the microservice MS_D is "0.084", and the failure impact level (E) of the microservice MS_E is "0.075", which is smaller than the above-mentioned reference value (C) of "0.2", and satisfies the reference value.
[0138] As shown in Figure 8, service_D is composed of two divided microservices, MS_D and MS_E, and microservices MS_D and MS_E are not critical MS. However, because latency occurs between microservices MS_D and MS_E, the total time exceeds the target value and does not satisfy real-time requirements. For this reason, a process is performed to integrate microservices MS_D and MS_E. When integrating the microservices, the larger values of switching_time_degree, importance_degree, and communication_degree are adopted.
[0139] The reconfiguration processing time stores the processing time calculated for microservice MS_DE, which is the integration of microservices MS_D and MS_E. As a result of the integration of microservices MS_D and MS_E, the waiting time becomes 0 seconds. The total execution time and waiting time of microservice MS_DE is 10 ms, which is within the target value of 12 ms and satisfies the real-time requirement. In addition, the failure impact level (E) of microservice MS_DE is "0.14", which is smaller than the reference value (C) of "0.2", and therefore satisfies the reference value.
[0140] Fig. 18 is a diagram showing an example of maintainability and a failure impact degree when the trade-off factor in case 5 is maintainability (MS size). Here, a description will be given assuming that a YES determination is made in step S35 in Fig. 16 (case 5).
[0141] The table shown at the top of FIG. 18 is composed of the items MS, maintainability, and failure impact. The target value for conservatism is an MS size of 10K steps. The preliminary MS size for the microservice MS_F is 15Kstep, which exceeds the target value. Note that the failure impact level (E) for the microservice MS_F is 0.175, which is smaller than the above-mentioned standard value (C) of 0.2 and satisfies the standard value.
[0142] Therefore, the microservice MS_F, whose MS size is larger than the target value, is divided into microservices MS_F1 and MS_F2, and the maintainability and impact of failures are evaluated again. The reset MS size is 8kstep for microservice MS_F1 and 8kstep for microservice MS_F2, both of which are below the target value for maintainability. In addition, the failure impact (E) is "0.081" for microservice MS_F1 and "0.081" for microservice MS_F2, both of which are below the reference value (C) and satisfy the reference value.
[0143] The table shown at the bottom of Fig. 18 stores the items related to communication of the microservice MS_F before division (communication range (Com_R), communication frequency (Com_F), communication type (Com_T)) and the average communication_degree value. The items related to communication (communication range (Com_R), communication frequency (Com_F), communication type (Com_T)) are stored with values according to the communication_degree conversion table shown in Fig. 9.
[0144] The communication range (Com_R) of the microservice MS_F is “0.2”, the communication frequency (Com_F) is “0.2”, the communication type (Com_T) is “0.3”, and the average communication_degree value is “0.23”. On the other hand, the microservices MS_F1 and MS_F2 communicate with each other, so the values of each item related to communication are large. For example, the communication range (Com_R) of the microservices MS_F1 and MS_F2 is "0.6", the communication frequency (Com_F) is "0.6", the communication form (Com_T) is "0.3", and the average communication degree is "0.5".
[0145] Note that even if the critical MS is divided, if strict system requirements 300 are set, a core part may remain. If a core part remains, it may not satisfy system performance (availability, real-time performance, maintainability). In this case, the system designer 10 is notified that a core part that does not satisfy system performance exists. For example, real-time performance and maintainability may not be satisfied at the same time. In this case, a message is proposed to the system designer 10 from the control system 200 to encourage the system designer 10 to prioritize real-time performance and to tolerate maintainability not being satisfied. Then, the system designer 10 reconfigures the system requirements 300 (availability, real-time performance, maintainability) according to the proposal. The control system 200 divides / integrates microservices and reconfigures parameters according to the reconfigured system requirements 300.
[0146] <Visualized scope of impact of failure> Next, an example of visualizing the scope of the impact of a failure will be described. Fig. 19 is a diagram showing a display example of a screen 50 in which the failure impact range is visualized. This screen 50 is output by the output unit 250 shown in Fig. 2 after the processing of step S7 in Fig. 4, for example, and can be confirmed by the system designer 10.
[0147] The screen 50 has a command input field 51 that allows the system requirements 300 to be reconfigured, a display field 52 for displaying the execution results, and a display field 53 for displaying the failure impact range including the critical MS.
[0148] The command input field 51 includes input fields for availability, real-timeness, and MS size as examples of commands. When the system designer 10 specifies availability, real-timeness, and MS size as commands in the command input field 51 and presses the execute button 51a, the microservices process is automatically executed by the calculation unit 230 shown in FIG.
[0149] After the reconfiguration of the system requirements 300 is input from the command input field 51, the execution result of the splitting and integration process is output. For example, the result of automatically executing the microservices process in accordance with the reconfigured system requirements 300 is displayed in the execution result display field 52. If the execution result is not OK, a warning is notified to the system designer 10. The warning is notified, for example, by displaying a warning message in the display field 52, or by displaying a critical MS in the display field 53.
[0150] Furthermore, when the microservices conversion process is automatically executed, the microservices are visualized and displayed in a display area 53 for the results of the microservices conversion. Here, the failure impact (E) of the microservices MS_A to MS_F and the relationship between the failures of each microservice are visualized and displayed. For example, a failure that occurs in microservice MS_A affects microservice MS_D. Also, a failure that occurs in microservice MS_B affects microservices MS_D and MS_F.
[0151] Here, the failure impact degree (E) of the microservice MS_D is "0.3", which is greater than the reference value (C) of "0.2". Therefore, the microservice MS_D is highlighted as being a critical MS. The system designer 10 can specify whether to further divide the microservice MS_D, which is a critical MS.
[0152] <Description of recovery procedure> Next, we will explain the recovery procedure that is performed when a failure occurs in a microservice. (1) Occurrence of a fault When a microservice fails, the following recovery steps are initiated: (2) Fault detection Next, any failures in the microservices are detected.
[0153] (3) Disaster recovery Next comes the process of recovering from failure, where two approaches are used depending on whether the microservice is critical or non-critical (regular).
[0154] (3-1) Important Microservices If it is an important MS, the control program 233 operates an active MS and a standby MS. As described above, the critical MS is processed so as to be eliminated as much as possible, but there are cases where a critical MS still remains. In this case, the critical MS is divided and the remaining core part (part corresponding to the critical MS) is multiplexed and operated as an important MS in the active and standby systems. Then, when the control program 233 detects that a failure has occurred in the critical MS, it switches the critical MS operating in the active and standby systems from the active system to the standby system to continue the service. An example of this service switching will be described later.
[0155] (3-2) Normal Microservices The normal MS is not duplicated, and the standby MS is not operating. Therefore, when the control program 233 detects that a failure has occurred in a normal microservice that is not operating in the active and standby systems, the control program 233 starts a new microservice that compensates for the function of the microservice that has detected the occurrence of the failure.
[0156] <Fault detection method> Next, a method for detecting failures in important microservices will be described with reference to Figures 20 and 21. As described above, if a critical MS remains in the target system 100, the critical MS is configured in a multiplexed manner. An example of a multiplexed configuration is a duplicated configuration with an active system and a standby system. When a failure is detected in the active critical MS, the service is continued by switching to the standby critical MS using either a checkpoint data transfer method or a two-system transfer method.
[0157] (Checkpoint data transfer method) FIG. 20 is a diagram showing an example of a fault detection method using the checkpoint data transfer method. For example, microservice MS_A communicates with a current critical MS. The fault detection method using the checkpoint data transfer method will be described with numbers indicating the processing order added to the diagram.
[0158] (1) The active critical MS periodically transfers checkpoint data to the standby critical MS. As described above, the checkpoint data is necessary for the standby critical MS to take over processing when, for example, a failure occurs in the microservice MS_A. By receiving the checkpoint data, the standby critical MS takes over communication processing with the microservice MS_A from the active critical MS. In addition, the active critical MS and the standby critical MS confirm their operation by sending Alive messages to each other.
[0159] (2) A failure occurs in the current critical MS. (3) When a failure occurs, the active critical MS cannot communicate with the microservice MS_A. As a result, the standby critical MS cannot receive checkpoint data from the active critical MS. In addition, the standby critical MS cannot receive an Alive message from the active critical MS, and cannot send an Alive message to the active critical MS. As a result, the standby critical MS can detect that a failure has occurred in the active critical MS and can implement a recovery procedure.
[0160] (two-way transfer method) FIG. 21 is a diagram showing an example of a fault detection method using the two-way transfer method. For example, the microservice MS_A communicates with both the active critical MS and the standby critical MS. The fault detection method using the two-way transfer method will be described with numbers indicating the processing order added to the diagram.
[0161] (1) Microservice MS_A sends a message to the active critical MS and the standby critical MS. In the dual-system transfer method, the active critical MS does not need to send checkpoint data to the standby critical MS. The active critical MS and the standby critical MS confirm their operation by exchanging Alive messages.
[0162] (2) A failure occurs in the current critical MS. (3) When a failure occurs, the active critical MS cannot communicate with the microservice MS_A. The standby critical MS cannot receive an Alive message from the active critical MS, and cannot send an Alive message to the active critical MS. Therefore, the standby critical MS can detect that a failure has occurred in the active critical MS and can implement a recovery procedure.
[0163] In the control system 200 according to the embodiment described above, the system designer 10 converts the huge program 111 into microservices through pre-processing. Thereafter, the control system 200 detects the critical MS during system design by determining the requirements for each microservice according to the microservice conversion rules 224. At this time, the control system 200 performs division or integration of the microservices by an algorithm so that the critical MS is eliminated from the microservices of the target system 100. Therefore, in the process of automatically optimizing the many microservices constituting the target system 100, the critical MS is eliminated, and the system design of the microservices is facilitated. Furthermore, by converting the existing target system 100 into microservices, the modernization of each microservice (process of updating old programs) is facilitated. Furthermore, by converting the existing target system 100 into microservices, it is also easy to deploy the microservices in other environments.
[0164] In the control system 200, the failure impact degree is calculated, and the failure impact degree is compared with a reference value to determine whether the microservice is a critical MS. Then, it is expected that the critical MS will be eliminated by dividing or integrating the microservice determined to be a critical MS. If the critical MS is eliminated, even if a failure occurs in the microservice, the failure will not easily affect other microservices. This makes it easier to replace only the microservice in which the failure has occurred, and it is possible to prevent the failure from spreading to the entire microservice. In addition, the connection between the microservice in which the failure has occurred and other microservices is minimized, thereby shortening the time required to recover the microservice in which the failure has occurred.
[0165] Furthermore, the priorities of the system requirements 300 of the microservices are given in the order of real-timeness, availability, and maintainability. Since the microservices are divided or integrated according to this priority, the performance of the microservices is guaranteed.
[0166] In addition, a microservice whose real-time time is equal to or greater than a certain value is integrated with another microservice, so that the real-time time becomes less than the certain time and the real-time requirement is satisfied. Therefore, the division or integration process of microservices by the control system 200 is useful for providing microservices to the target system 100, which requires real-time performance.
[0167] Also, microservices are divided or integrated, taking into consideration the trade-off between real-timeness and MS size. Therefore, microservices are generated that have real-timeness less than a certain time period and MS size less than a certain value. As a result, the target system 100 is configured with microservices that satisfy the requirements preset by the system designer 10.
[0168] Furthermore, when a critical MS is detected, information about the critical MS is visualized and displayed on the screen 50. The system designer 10 can change the settings of the system requirements 300, including availability, real-time performance, or MS size, while checking the screen 50. Then, the results of the microservice division or integration process performed again based on the system requirements 300 whose settings have been changed are displayed on the screen 50. This makes it easy for the system designer 10 to check whether the system requirements 300 whose settings have been changed are appropriate.
[0169] It should be noted that the present invention is not limited to the above-described embodiments, and various other applications and modifications are possible without departing from the gist of the present invention as set forth in the claims. For example, each of the above-mentioned embodiments describes the configuration of the control system 200 in detail and specifically in order to explain the present invention in an easily understandable manner, and is not necessarily limited to having all of the configurations described. In addition, it is possible to replace part of the configuration of the embodiment described here with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. In addition, it is also possible to add, delete, or replace part of the configuration of each embodiment with another configuration. In addition, the control lines and information lines shown are those that are considered necessary for the explanation, and not all control lines and information lines in the product are necessarily shown. In reality, it can be considered that almost all components are connected to each other. [Explanation of symbols]
[0170] 10...system designer, 50...screen, 100...target system, 120...memory management unit, 121...microservice, 122...parameter, 200...control system, 220...memory management unit, 221...parameter, 222...requirements data, 223...failure impact data, 224...microservices rules, 230...calculation unit, 231...failure impact calculation program, 232...MS division / integration program, 233...control program
Claims
1. A calculation unit that calculates the failure impact level for each microservice that constitutes the target system; A division and integration unit that performs a division and integration process of dividing the critical microservice or integrating a plurality of the microservices according to a preset system requirement until the critical microservice is eliminated, and determining that the microservice has a failure impact degree greater than a reference value as a critical microservice. Control system.
2. The calculation unit calculates the failure impact level based on an index calculated from a switching time required to switch the microservice in which a failure has occurred to another microservice, an index calculated from the importance of a service provided by the microservice, and an index calculated by taking an average value, a multiplication value, a maximum value, or a minimum value from a communication index related to communication of the microservice. The control system of claim 1 .
3. The system requirements include real-time performance, availability, and maintainability. The division and integration unit performs the division and integration process so as to satisfy the system requirements in the order of real-time performance, availability, and maintainability. The control system of claim 2.
4. The real-time property and the maintainability are in a trade-off relationship in which the maintainability decreases as the real-time property is increased, and the maintainability decreases as the real-time property is decreased. The control system of claim 3.
5. The division and integration unit performs the division and integration process based on at least a communication range, a communication frequency, and a communication form as the communication indicators. The control system of claim 3.
6. The division and integration unit optimizes parameters of the microservice so as to satisfy the real-time requirement when the microservice does not satisfy the real-time requirement. The control system of claim 3.
7. A screen having a display field indicating a failure impact scope including the critical microservice and an input field in which the system requirements can be reconfigured is output, After the reconfiguration of the system requirements is inputted from the input field, the execution result of the division and integration process is outputted. The control system of claim 3.
8. A control unit for controlling the operation of the microservice, When the control unit detects that a failure has occurred in the critical microservice of the active system among the critical microservices operating in the active system and the standby system, the control unit switches the critical microservice from the active system to the standby system to continue the service, and when the control unit detects that a failure has occurred in the microservice that is not operating in the active system or the standby system, the control unit starts a new microservice that supplements the function of the microservice. The control system of claim 3.
9. If the critical microservice remains in the target system, the critical microservice is configured in a multiplexed manner, and when a failure is detected in the critical microservice of the active system, the service is continued by switching to the critical microservice of the standby system using either a checkpoint data transfer method or a two-system transfer method.
5. The control system of claim 4.
10. A step of calculating the failure impact degree for each microservice constituting the target system; The microservice having the failure impact degree greater than a reference value is designated as a critical microservice, and the critical microservice is divided or a plurality of the microservices are integrated according to a preset system requirement until the critical microservice is eliminated. Microservice processing methods.
Citation Information
Patent Citations
Detection alarm method, equipment and server
CN110445650A
Microservice splitting device and microservice splitting program
JP2021009589A
Service operation management device
JP2013003681A
