Microservice management device, microservice management method, and program

The microservice management device addresses resource wastage by using individual and priority buffers to manage requests, measuring holding times, and discarding or prioritizing based on thresholds, thereby optimizing microservice processing and reducing timeouts.

JP7587184B2Active Publication Date: 2024-11-20NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023504951
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2024-11-20
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

Conventional microservice management techniques fail to consider timeouts, leading to resource wastage when requests are discarded due to congestion.

Method used

A microservice management device that includes individual and priority buffers to manage microservice requests, measuring holding times, and discarding or prioritizing requests based on threshold values to prevent resource waste.

Benefits of technology

Reduces resource wastage by effectively handling timeouts and optimizing microservice request processing to minimize resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007587184000002
    Figure 0007587184000002
  • Figure 0007587184000003
    Figure 0007587184000003
  • Figure 0007587184000004
    Figure 0007587184000004
Patent Text Reader

Abstract

This microservice management device is provided with: individual buffers 30 which, when microservice provision devices 90 are congested, store, for the purpose of retention, microservice requests to execute microservices provided by the microservice provision devices 90; priority buffers 32 which are associated respectively with the individual buffers 30, and which transfer and store, from the individual buffers 30, microservice requests stored in the individual buffers 30 for the purpose of preferentially executing microservices; and a management unit 20 which measures a retention time representing the time that has elapsed since a microservice request was stored, and when the retention time exceeds a threshold value, discards the request if the execution of the microservice included in the request has not been indicated, or causes a priority buffer 32 to store the microservice request if the execution of the microservice included in the request has been indicated.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a technology for providing a service by combining multiple microservices. [Background technology]

[0002] In recent years, mashup services that provide services by combining multiple microservices via WebAPIs (Application Programming Interfaces) have become popular. In a mashup service, if congestion occurs in an intermediate microservice and a request cannot be executed, the request is abandoned midway, and the service resources consumed before the request is abandoned are wasted.

[0003] In order to prevent the waste of service resources, a technique for performing throttling using a token packet algorithm and discarding requests that do not fit into a packet buffer is disclosed, for example, in Non-Patent Document 1. Also, a technique for discarding requests in order of the number of resources consumed is disclosed, for example, in Patent Document 1. Also, Non-Patent Document 2 discloses a technique for storing requests in a shared buffer when a request buffer is about to overflow. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2018-28756 A [Non-patent literature]

[0005] [Non-Patent Document 1] S.Floyd et al., “Adaptive RED: An Algorithm for Increasing the Robustness of RED's Active Queue Management,” AT&T Center for Internet Research at ICSI, Aug 2001. https: / / www.icir.org / floyd / papers / adaptiveRed.pdf [Non-Patent Document 2] Shirai et al., "A study on flow control method to efficiently consume service resources," IEICE Technical Report, vol.120, no.109, ICM2020-13, pp.31-36, July 2020. Summary of the Invention [Problem to be solved by the invention]

[0006] However, the above conventional techniques do not take timeouts into consideration, and therefore have the problem of resources being wasted when a request is discarded due to a timeout.

[0007] The present invention has been made in consideration of this problem, and aims to provide a microservice management device, a method, and a program that can reduce resource waste caused by timeouts. [Means for solving the problem]

[0008] A microservice management device according to one aspect of the present invention receives a request for a service that combines microservices, and manages the operation of a plurality of microservice providing devices that provide the service, and includes: individual buffers that accumulate microservice requests for executing a microservice provided by the microservice providing device when the microservice providing device is congested, for the purpose of reserving the microservice requests; priority buffers that correspond to each of the individual buffers and move and store the microservice requests accumulated in the individual buffers from the individual buffers, for the purpose of preferentially executing the microservices; and a management unit that measures a retention time that indicates the elapsed time since the microservice request was accumulated, and, when the retention time exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer if the microservice included in the request is executed.

[0009] Moreover, a management method according to one aspect of the present invention is a microservice management method performed by the above-mentioned microservice management device, which receives a request requesting a service that combines microservices, and when any of the microservice providing devices that provide the service is congested, accumulates in individual buffers the microservice requests that request the microservices provided by the microservice providing device, and moves the microservice requests that correspond to each of the individual buffers and that have been accumulated in the individual buffers for the purpose of preferentially executing the microservices from the individual buffers to accumulate them in a priority buffer, and when processing of the microservice request is suspended, a management unit measures a suspension time, and when the suspension time exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer if the microservice included in the request is executed. The gist of the present invention is as follows.

[0010] In addition, a program according to one aspect of the present invention is a program for causing a computer to function as the microservice management device described above. Effect of the Invention

[0011] According to the present invention, it is possible to reduce the waste of resources caused by timeouts. [Brief description of the drawings]

[0012] [Figure 1] 1 is a block diagram illustrating an example of a functional configuration of a microservice management device according to an embodiment of the present invention. [Diagram 2] 2 is a block diagram showing an example of a functional configuration of a management unit shown in FIG. 1. [Diagram 3] 3 is a diagram illustrating an example of information (records) stored in the service status database illustrated in FIG. 2. FIG. [Figure 4] 2 is a diagram illustrating an example of an operation status of the microservice management device illustrated in FIG. 1. [Diagram 5] 1. FIG. 4 is a diagram illustrating another example of the operation status of the microservice management device illustrated in FIG. [Figure 6] 2 is a diagram illustrating an example of information (records) stored in a shared buffer illustrated in FIG. 1; FIG. [Figure 7] 1. FIG. 4 is a diagram illustrating another example of the operation status of the microservice management device illustrated in FIG. [Figure 8] 2 is a diagram illustrating an example of information (records) stored in an individual buffer illustrated in FIG. 1; FIG. [Figure 9] FIG. 2 is a diagram illustrating the operation of an individual buffer in a hypothetical situation. [Figure 10] FIG. 13 is a diagram illustrating an operation of storing a microservice request in a priority buffer. [Figure 11] FIG. 13 is a diagram illustrating an example of a microservice request being given priority for processing. [Figure 12A] 2 is a flowchart showing processing steps of a management unit shown in FIG. 1; [Figure 12B] 2 is a flowchart showing processing steps of a management unit shown in FIG. 1; [Figure 13] FIG. 1 is a block diagram showing an example of the configuration of a general-purpose computer system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In the drawings, the same reference characters are used to refer to the same parts, and the description will not be repeated.

[0014] Fig. 1 is a block diagram showing an example of a functional configuration of a microservice management device according to an embodiment of the present invention. The microservice management device 100 shown in Fig. 1 is a device that receives a request for a service that combines microservices from a microservice use device 80, and manages a process of providing a mashup service by combining microservice providing devices 90.

[0015] The microservice usage device 80 is an information processing device such as a microcomputer or a tablet. For simplicity, FIG. 1 shows only one microservice usage device 80, but there may be multiple microservice usage devices 80. The microservice management device 100 receives requests from each microservice usage device 80. The requests are, for example, a delivery management service, a sales management service, an inventory management service, and various other services.

[0016] A microservice is a software architecture that manages and operates multiple individually developed microservices in cooperation with each other. Each of the multiple microservice providing devices 90A, 90B, ... provides a microservice, such as an authentication service, a search service, or a download service, in response to a microservice request.

[0017] Microservice A, which is an authentication service, is provided by a microservice providing device 90A. Microservice B, which is a search service, is provided by a microservice providing device 90B. Other microservices C, ..., I, J are provided by corresponding microservice providing devices 90C, 90I, and 90J, respectively.

[0018] The microservice management device 100 includes a request receiving unit 10, a management unit 20, an individual buffer 30, a request transmitting unit 40, a response receiving unit 50, a common buffer 60, and a response transmitting unit 70. The individual buffer 30, the request transmitting unit 40, and the response receiving unit 50 are provided corresponding to the microservice providing devices 90A, 90B, ..., respectively. Hereinafter, when there is no need to specify a microservice, A, B, ... will be omitted and the microservice providing device will be referred to as 90. The same applies to other functional configuration units.

[0019] The request receiving unit 10 receives a request from a microservice use device 80. The request differs depending on the service that the user wants to receive. For example, request (1) is a request that combines microservice requests A, B, I, and J.

[0020] The management unit 20 determines whether or not a congested microservice request is included in the request received by the request receiving unit 10, and manages the operation of each microservice providing device 90. Whether or not a microservice request is included can also be expressed as whether or not it applies.

[0021] Whether the microservice providing device 90 is congested is determined based on whether a microservice request is stored in the individual buffer 30. For example, if a microservice request A occurs while the microservice providing device 90A is executing processing of microservice A, the microservice request is stored in the individual buffer 30A. The microservice requests stored in the individual buffer 30 are executed sequentially when the microservice providing device 90A finishes processing. Therefore, when there is a microservice request stored in the individual buffer 30, it can be determined that the microservice providing device 90 corresponding to that individual buffer 30 is congested.

[0022] 1, the individual buffer 30 is provided corresponding to each microservice providing device 90. When the microservice providing device 90 is congested, the individual buffer 30 accumulates microservice requests for executing a microservice provided by the microservice providing device 90 for the purpose of reserving the microservice requests.

[0023] The request sending unit 40 is provided corresponding to each microservice providing device 90, similar to the individual buffer 30. If the corresponding microservice providing device 90 is not congested, the request sending unit 40 sends the microservice request included in the request to that microservice providing device 90.

[0024] The response receiving unit 50 is provided corresponding to each microservice providing device 90, similar to the request sending unit 40. The response receiving unit 50 receives a response from the corresponding microservice providing device 90. The response includes a result of the microservice request processed by the microservice providing device 90 and information transmitted by the microservice providing device 90. The information includes the processing time required to process the microservice, etc. The processing time will be described in detail later.

[0025] The common buffer 60 accumulates the request when any of the microservice providing devices 90 corresponding to the microservice request included in the request received from the microservice use device 80 is congested. The common buffer 60 also includes a hold time measurement unit 61 that measures a hold time that indicates the time for which the request has been accumulated.

[0026] The response sending unit 70 sends the results of the microservices processed by the multiple microservice providing devices 90 and information sent by the microservice providing devices 90 to the microservice use device 80.

[0027] Each of the individual buffers 30 includes a priority buffer 32. The priority buffer 32 corresponds to each of the individual buffers 30, and moves and stores microservice requests stored in the individual buffers 30 from the individual buffers 30 in order to execute the microservices preferentially. Furthermore, the individual buffers 30 include a hold time measurement unit 31 that measures the hold time of a microservice request when the microservice request is held.

[0028] In addition, the management unit 20 measures the pending time, which indicates the elapsed time since the microservice request was accumulated, and when the pending time exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer 32 if the microservice included in the request is executed.

[0029] As described above, the microservice management device 100 according to the present embodiment is a microservice management device that receives a request for a service that combines microservices and manages the operation of a plurality of microservice providing devices 90 that provide the service, and includes an individual buffer 30 that accumulates a microservice request for executing a microservice provided by the microservice providing device 90 when the microservice providing device 90 is congested in order to reserve the microservice request, a priority buffer 32 that corresponds to each individual buffer 30 and moves and accumulates the microservice request accumulated in the individual buffer 30 from the individual buffer 30 in order to execute the microservice preferentially, and a management unit 20 that measures a reservation time that indicates the elapsed time since the microservice request was accumulated, and when the reservation time exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer 32 if the microservice included in the request is executed. This makes it possible to reduce requests that are discarded during the service.

[0030] In other words, if the pending time exceeds a threshold and the microservice included in the request is not being executed (before service resources are consumed), the request is discarded, thereby preventing the waste of service resources.

[0031] The operation of this embodiment will be described in more detail below with reference to the drawings. Next, the management unit 20 will be described.

[0032] (Management Department) 2 is a block diagram showing an example of a functional configuration of the management unit 20. The management unit 20 includes a service status database (hereinafter, referred to as a service status DB) 21, a buffer control unit 22, and a request processing unit .

[0033] The service status DB 21 stores the provision status and congestion status of a microservice. The provision status of a microservice is, for example, the maximum processing time, the minimum processing time, the average processing time, the presence or absence of congestion (congestion flag), the free space of an individual buffer, and the maximum waiting time of a waiting queue of each microservice providing device 90. This information is obtained from the response of each microservice providing device 90 to a microservice request.

[0034] Depending on the microservice providing device 90, information such as the processing time may not be included in the response. Therefore, the microservice management device 100 may acquire such information from the microservice providing device 90. For example, the processing time can be obtained from the difference between the time when a microservice request is made to the microservice providing device 90 and the time when a response is received from the microservice providing device 90.

[0035] Fig. 3 is a diagram showing an example of information (records) stored in the service status DB 21. The first column from the left in Fig. 3 are items that indicate the provision status of a microservice, and from the third row onwards, for example, maximum processing time, minimum processing time, average processing time, ..., congestion flag, individual buffer vacancy, and maximum waiting time of a queue, etc. The second and subsequent columns show specific examples of the provision status of each of the microservices A, B, C, ....

[0036] 3, a microservice providing device 90I that provides a microservice I is congested and the free space in the individual buffer 30I is 0. In addition, a microservice providing device 90J that provides a microservice J is also congested and the free space in the individual buffer I is 0.

[0037] There is no congestion in the microservice providing devices 90A, 90B, and 90C that provide the microservices A, B, and C. By monitoring (referring to) the service status DB 21 in this manner, the status of each individual buffer 30 can be grasped.

[0038] The buffer control unit 22 monitors the service status DB 21 and selects the microservice requests to be stored in the individual buffer 30 and the requests to be stored in the common buffer. When any of the microservice providing devices 90 corresponding to a microservice request included in a request is congested and there is no free space in the individual buffer, the buffer control unit 22 stores the request in the common buffer 60. In addition, the buffer control unit 22 stores in the individual buffer 30 the microservice requests for which there is free space in the individual buffer 30.

[0039] The request processing unit 23 coordinates microservices for each request content received by the request receiving unit 10 from the microservice use device 80, and stores the microservice requests in the individual buffer 30 and the requests in the common buffer 60. The coordination of microservices is performed based on a scenario (not shown) that specifies which microservices to use and in what order for each request content.

[0040] If the request is for a delivery management service, the request processing unit 23 links, for example, the microservices of authentication service A, search service B, download service I, and billing service J. Thus, the request processing unit 23 links microservice A, microservice B, microservice I, and microservice J (A→B→I→J). Note that the processing order of the microservices is not limited to alphabetical order.

[0041] The request processing unit 23 includes a microservice priority setting unit 24 and a hold time threshold calculation unit 25.

[0042] When the pending time measured by a pending time measurement unit 31, which measures the pending time since a microservice request is put on hold, exceeds a threshold value and some of the microservices included in the request have already been executed, the microservice priority setting unit 24 transfers the pending microservice request to a priority buffer 32 for the purpose of processing it with priority.

[0043] The pending time threshold calculation unit 25 calculates a threshold corresponding to a request based on the processing time of each of the multiple microservice requests that constitute the request. The threshold is obtained, for example, by subtracting the expected processing time of the microservice from a predetermined fixed time. The threshold will be described in detail later.

[0044] (Example of request execution) FIG. 4 is a diagram illustrating an example of an operation of the microservice management device 100 to execute a mashup service of microservices A→B→I→J.

[0045] The request receiving unit 10 receives a request for a service that combines microservices A → B → I → J from the microservice use device 80. When the management unit 20 receives the request, it refers to the service status DB 21. If there is no congestion in the microservice providing devices 90A, 90B, 90I, and 90J, the management unit 20 executes the microservices A → B → I → J in order based on the scenario, as shown by the dashed line in FIG.

[0046] The response sending unit 70 sends the result of the microservice processed by the microservice providing device 90 and information sent by the microservice providing device 90 to the microservice using device 80.

[0047] FIG. 5 is a diagram illustrating the operation when microservices I and J are congested in a request that combines the same microservices A→B→I→J as in FIG.

[0048] In this case, as shown in FIG. 5, the request is accumulated in the common buffer 60 without executing either microservice A or B.

[0049] Fig. 6 is a diagram showing a schematic example of information (records) stored in the shared buffer 60. The first column from the left in Fig. 6 indicates the buffer number, the second column indicates the request ID, the third column indicates the future processing schedule, the fourth column indicates the hold time after the request is put on hold (stored), and the fifth column indicates the hold time threshold. A request combining microservices A→B→I→J is stored with request ID: 000168.

[0050] The pending time of a request is measured by the pending time measurement unit 61. The pending time shown in Fig. 6 is an example in which the pending time is long from the top to the bottom of the buffer with the smallest buffer number.

[0051] The pending time threshold is a threshold for determining whether to further suspend or discard the request. The threshold is, for example, a value obtained by subtracting the expected processing time of the microservice and a predetermined time (α) from the time at which a timeout is detected.

[0052]

number

[0053] Here, the time to detect a timeout is a fixed value, such as 60 seconds. The expected processing time is the processing time of the microservice used by the request. Alternatively, it is calculated from the waiting queue size of the microservice used by the request. The predetermined time (α) is, for example, the time required for judgment, and is an extra time taking into account the time required for processing by the microservice providing device 90, etc.

[0054] By subtracting the predetermined time (α), it is possible to prevent a timeout occurring midway through processing a request after it has started. In other words, the predetermined time (α) is an extra period for safely determining whether to further reserve or discard the request.

[0055] The pending time threshold of request ID: 000168 is calculated by the pending time threshold calculation unit 25. The pending time threshold calculation unit 25 refers to the service state DB 21 (FIG. 3) and calculates a threshold of, for example, 60 (fixed value)-(2+3+2+3+4+5)-10(α)=31 seconds from the maximum processing times of the microservices A, B, I, and J and the maximum waiting time of the waiting queue.

[0056] Fig. 6(b) shows an example of information stored in the shared buffer 60 after 3 seconds from Fig. 6(a). As shown in Fig. 6(b), the hold times of the requests IDs: 000168 and 000182 match the hold time threshold.

[0057] When the pending time matches the threshold, it is determined whether the request can be processed. In this example, there is free space in the individual buffers 30I and 30J of microservices I and J (Figure 3), so processing of request ID: 000168 begins.

[0058] On the other hand, the request with request ID: 00182, whose pending time matches the threshold, is discarded without being processed because there is no free space in the individual buffer 90I due to the start of processing of request ID: 000168. Even if the request is discarded, none of the microservices that make up the request are being executed. Therefore, the request can be discarded without wasting resources.

[0059] As described above, when any of the microservice providing devices 90 corresponding to the microservice request contained in the request is congested, the received request (the request stored in the common buffer 60) is discarded without wasting resources.

[0060] It should be noted that the shared buffer 60 is not an essential component. Even in a configuration that does not include the shared buffer 60, it is possible to reduce waste of resources caused by timeouts. Next, the operation of the microservice management device 100 in a configuration that does not include the shared buffer 60 will be described.

[0061] FIG. 7 is a diagram illustrating the operation when microservices A, B, I, and J are congested in a request that combines microservices A→B→I→J.

[0062] The management unit 20 determines whether or not a request can be processed based on the congestion status. The congestion status is determined by referring to the service status DB 21 (FIG. 3) in the same manner as described above.

[0063] In the example shown in Fig. 7, the microservice request included in the request is stored in the individual buffer 30A. The stored microservice requests are processed sequentially. During this process, when the time measured by the hold time measurement unit 31A matches the hold time threshold, the microservice request and the request stored in the individual buffer 30A are discarded. Even if the request is discarded, no resources are consumed, so no resource waste occurs.

[0064] Fig. 8 is a diagram showing an example of information (records) stored in the individual buffer 30A. The relationship between rows and columns in Fig. 8 is the same as that in Fig. 6 (shared buffer 60). The method of calculating the threshold value of the reservation time is also the same.

[0065] The row of buffer number 3 (request ID: 000168) shown in Fig. 8 indicates the state in which microservice A is being processed, following the state shown in Fig. 7. Assume that time has passed during the processing of microservice A, and that the pending time after the processing of microservice A has reached the pending time threshold of 27 seconds.

[0066] 9 is a diagram showing a schematic diagram of the operation of the individual buffer 30B in the assumed state. As shown in FIG. 9, under this assumption, microservice A has already been processed. Therefore, if the microservice request for executing microservice B included in the request (request ID: 000168) is discarded at this point, resources will be wasted.

[0067] Therefore, in this embodiment, a microservice request for executing microservice B is stored in the priority buffer 32C. Fig. 10 shows a schematic diagram of the operation of storing a microservice request in the priority buffer 32C.

[0068] Thereafter, microservice requests to execute microservices I and J are accumulated in the priority buffers 32I and 32J and are processed with priority.

[0069] Fig. 11 shows an example of the operation in which microservice I is given priority for processing. In this way, when the retention time exceeds the retention time threshold and some microservices have already been processed, the processing priority is increased and the microservice request is processed.

[0070] As described above, the microservice management device 100 according to this embodiment measures the hold time of the microservice providing device 90 and calculates a threshold value for the hold time for each microservice request. If the hold time exceeds the threshold value, it is determined whether to process or discard the microservice request. If it is determined that there is a possibility that a timeout will occur midway through the processing even if the processing of the microservice is started and discarding the request will not result in a waste of resources, the microservice request is discarded. Furthermore, if it is determined that a waste of resources will occur when processing the microservice request, the priority of the processing of the microservice request is increased.

[0071] Through the above operations, it is possible to reduce the waste of resources caused by timeouts.

[0072] (Microservices Management Methods) Fig. 12 is a flowchart showing the processing steps of the management unit 20. A microservice management method performed by the microservice management device 100 according to this embodiment will be described with reference to Fig. 12A and Fig. 12B. Note that the microservice management device 100 will be described as an example having a shared buffer 60.

[0073] When the microservice management device 100 starts operating, the request receiving unit 10 receives a request from the microservice use device 80 requesting a service that combines microservices.

[0074] Depending on whether congestion has occurred in the microservice providing device 90 corresponding to the microservice request included in the received request, the management unit 20 determines whether to store the request in the common buffer 60 or in the individual buffer 30 (step S1). If congestion has occurred at the time of receiving the request, the request is stored (accumulated) in the common buffer 30 (common buffer in step S1).

[0075] The management unit 20 determines whether the request can be processed based on the congestion status of the microservice providing device 90 (step S2). If it determines that the congestion has disappeared and processing is possible (YES in step S3), the microservice requests included in the request are executed sequentially. The mashup service shown in FIG. 4 above is executed (step S4).

[0076] If it is determined that congestion exists and processing is not possible (NO in step S3), the hold time threshold calculation unit 25 of the management unit 20 calculates the hold time threshold shown in formula (1) (step S5). Then, it is checked whether the hold time measured by the hold time measurement unit 61 exceeds the calculated threshold (step S6).

[0077] The processes in steps S5 and S6 are executed for each request, and if there is a request whose retention time exceeds the threshold (YES in step S7), the request is discarded (step S8).

[0078] By repeating the processes of steps S2 to S8, the requests stored in the shared buffer 30 are processed in order, and requests whose holding time exceeds the threshold are discarded in order. By operating in this manner, no resources are wasted.

[0079] When a request is received, if congestion does not occur in the microservice providing device 90 corresponding to the microservice request included in the request, the management unit 20 stores the request in the individual buffer 30 (individual buffer in step S1).

[0080] The management unit 20 determines whether the request can be processed based on the congestion state of the microservice providing device 90 (step S9). If it determines that there is no congestion and that the request can be processed (YES in step S10), the management unit 20 sequentially executes the microservice requests included in the request (step S11).

[0081] If it is determined that congestion exists and processing is not possible (NO in step S10), the hold time threshold calculation unit 25 of the management unit 20 calculates the hold time threshold shown in formula (1) (step S12). Then, it is checked whether the hold time measured by the hold time measurement unit 31 exceeds the calculated threshold (FIG. 13, step S12).

[0082] If the retention time measured by the retention time measurement unit 31 of the individual buffer 30 corresponding to the microservice providing device 90 does not exceed the threshold value (NO in step S14), the processes in steps S9 to S14 are repeated to sequentially process the microservice requests that can be processed.

[0083] If the holding time exceeds the threshold value (YES in step S14), the management unit 20 checks the congestion status of the microservice providing device 90 corresponding to the microservice request to be used (step S15).

[0084] Then, it is determined whether any of the microservice requests included in the request has been processed (step S16). If it has not been processed (NO in step S16), the request is discarded (step S17).

[0085] If any of the microservice requests included in the request has already been processed (YES in step S16), then it is checked whether congestion has occurred in the microservice providing device 90 that provides the microservice to be used (step S18).

[0086] If congestion occurs in the microservice providing device 90 to be used (YES in step S18), the microservice request to be used is stored in the corresponding priority buffer 32 (step S19). The microservice request stored in the priority buffer 32 is processed with priority.

[0087] If congestion is not occurring in the microservice providing device 90 to be used (NO in step S18), the processing of the microservice to be used is started (step S20).

[0088] As described above, the microservice management method performed by the microservice management device 100 according to the present embodiment receives a request for a service that combines microservices, and when any of the microservice providing devices 90 that provide the service is congested, the microservice request that requests the microservice provided by the microservice providing device 90 is stored in the individual buffer 30, and the microservice request corresponding to each individual buffer 30 and stored in the individual buffer 30 for the purpose of preferentially executing the microservice is moved from the individual buffer 30 to be stored in the priority buffer 32, and the management unit 20 measures the hold time when the processing of the microservice request is put on hold, and when the hold time exceeds a threshold, discards the request if the microservice included in the request is not executed, or causes the microservice request to be stored in the priority buffer 32 if the microservice included in the request is executed. This makes it possible to reduce waste of resources caused by timeouts.

[0089] The microservice management device 100 can be realized by a general-purpose computer system shown in Fig. 13. For example, in a general-purpose computer system including a CPU 90, a memory 91, a storage 92, a communication unit 93, an input unit 94, and an output unit 95, the CPU 90 executes a predetermined program loaded on the memory 91, thereby realizing each function of the microservice management device 100. The predetermined program can be recorded on a computer-readable recording medium such as an HDD, an SSD, a USB memory, a CD-ROM, a DVD-ROM, or an MO, or can be distributed via a network.

[0090] The present invention is not limited to the above embodiment, and modifications are possible within the scope of the gist of the present invention. For example, an example has been shown in which the threshold for determining the hold time is calculated by the hold time threshold calculation unit 25, but the present invention is not limited to this example. The threshold may be a fixed value. Furthermore, the calculation method is not limited to the above example. The most recent average value may be used, or the average value during the busy hours may be used.

[0091] In addition, the common buffer 60 and the individual buffer 30 have been described as determining whether or not requests can be processed in the order in which they were stored in the respective buffers, but requests with long or short pending times may be given priority for processing.

[0092] In addition, although an example has been shown in which the process of linking multiple microservices is performed by referring to a scenario in the request processing unit, the present invention is not limited to this example. If a microservice request is explicitly included in a request, a scenario is not necessary.

[0093] Thus, the present invention naturally includes various embodiments not described herein. Therefore, the technical scope of the present invention is defined only by the invention-specifying matters related to the scope of the claims appropriate from the above description. [Explanation of symbols]

[0094] 10: Request receiving unit 20: Management Department 30: Individual buffer 40: Request sending section 50: Response receiver 60: Common buffer 70: Response sending part 80: Microservices-based device 90: Microservices provider 100: Microservice management device

Claims

1. A microservice management device that receives a request for a service that combines microservices and manages operations of a plurality of microservice providing devices that provide the service, An individual buffer that stores microservice requests for executing a microservice provided by the microservice providing device when the microservice providing device is congested, in order to reserve the microservice requests; a priority buffer corresponding to each of the individual buffers, which moves the microservice requests stored in the individual buffers from the individual buffers and stores the microservice requests in order to execute the microservices preferentially; a management unit that measures a pending time that indicates an elapsed time since the microservice request was accumulated, and when the pending time exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer if the microservice included in the request is executed; A microservice management device comprising:

2. A common buffer that accumulates the request when any of the microservice providing devices corresponding to the microservice request included in the received request is congested. The microservice management device according to claim 1 .

3. The common buffer includes: a hold time measuring unit that measures the hold time that indicates the time that the request has been stored; The microservice management device according to claim 2 .

4. The management unit A microservice priority setting unit that migrates the pending microservice request to the priority buffer in order to prioritize processing when the pending time exceeds a threshold and some of the microservices included in the request have been executed; a hold time threshold calculation unit that calculates the threshold corresponding to the request based on the processing time of each of the microservice requests that constitute the request; The microservice management device according to claim 1 , further comprising:

5. The holding time threshold calculation unit The threshold value is calculated by subtracting the expected processing time for processing the request and the predetermined time from a predetermined fixed time. The microservice management device according to claim 4 .

6. A microservice management method performed by a microservice management device, receiving a request for a service that combines microservices, and if any of the microservice providing devices that provide the services is congested, storing a microservice request that requests the microservice provided by the microservice providing device in an individual buffer; The microservice requests corresponding to each of the individual buffers and stored in the individual buffers for the purpose of preferentially executing the microservices are moved from the individual buffers to a priority buffer, and stored in the priority buffer; The management unit measures a time period during which the processing of the microservice request is suspended, and when the time period exceeds a threshold, discards the request if the microservice included in the request is not executed, or accumulates the microservice request in the priority buffer if the microservice included in the request is executed. Microservices management methodology.

7. A program for causing a computer to function as the microservice management device according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • API provision system and API provision method

    JP2017016408A

  • API provision device and API request control method

    JP2018028756A