Method, device and equipment for calling micro-service application

By using a proxy to create application instances in microservice applications, the problem of call failures was solved, call reliability was improved, and real-time scaling was achieved.

CN115934292BActive Publication Date: 2026-11-24ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211735561.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-11-24
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

If the target application instance does not exist during the invocation process of a microservice application, the invocation will fail, reducing the reliability of the invocation.

Method used

The application requests the creation of an instance of the first application through the agent of the second application, and the instance creation is performed in an asynchronous or synchronous manner to ensure that the call request can be processed in a timely manner.

Benefits of technology

It improves the reliability of microservice application calls, enables proactive real-time scaling even without instances, and avoids call failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934292B_ABST
    Figure CN115934292B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and device for invoking microservice applications. The method includes: obtaining a call request from a second application to a first application, wherein the first application and the second application are microservice applications; if no application instance of the first application exists, requesting the creation of an application instance of the first application through a proxy program corresponding to the second application; and processing the call request through the application instance. This improves the reliability of microservice application invocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and device for invoking microservice applications. Background Technology

[0002] A microservice application platform can include multiple microservice applications, which can call each other.

[0003] In related technologies, microservice applications may have multiple application instances or no application instance at all. In practical applications, when the first microservice application calls the second microservice application, if the second microservice application does not have an application instance, the microservice application platform will report an error and terminate the call process from the first microservice application to the second microservice application, resulting in low reliability of microservice application calls. Summary of the Invention

[0004] This application provides a method, apparatus, and device for invoking microservice applications, which improves the reliability of microservice application invocation.

[0005] In a first aspect, embodiments of this application provide a method for invoking a microservice application, including:

[0006] Obtain the call request from the second application to the first application, where the first application and the second application are microservice applications;

[0007] If no application instance of the first application exists, request the creation of an application instance of the first application through the agent program corresponding to the second application.

[0008] The call request is processed through the application instance.

[0009] In one possible implementation, requesting the creation of an application instance of the first application via a proxy program includes:

[0010] Determine the configuration method, which may be asynchronous or synchronous.

[0011] According to the configuration method described, the agent program requests the creation of an application instance of the first application.

[0012] In one possible implementation, the configuration method is the asynchronous method; according to the configuration method, requesting the creation of an application instance of the first application through the proxy program includes:

[0013] The proxy program generates a no-instance event corresponding to the first application, and the no-instance event includes the identifier of the first application and the number of instances required.

[0014] The no-instance event is published through the agent program;

[0015] After the activator receives the no-instance event, it requests the creation of an application instance of the first application through the activator.

[0016] In one possible implementation, generating an instance-free event corresponding to the first application through the agent program includes:

[0017] Determine the first number of call requests to the first application obtained within a preset time period;

[0018] The required number of instances is determined based on the first quantity;

[0019] The no-instance event is generated based on the identifier of the first application and the required number of instances.

[0020] In one possible implementation, the configuration method is the synchronization method; according to the configuration method, requesting the creation of an application instance of the first application through the proxy program includes:

[0021] Determine the first number of call requests to the first application obtained within a preset time period;

[0022] The required number of instances is determined based on the first quantity;

[0023] The agent program sends an instance creation request to the activator, the instance creation request including the identifier of the first application and the required number of instances;

[0024] The activator requests the creation of an application instance for the first application.

[0025] In one possible implementation, before requesting the creation of an application instance of the first application via the agent, the method further includes:

[0026] Add the call request to the blocking queue;

[0027] Processing the call request through the application instance includes:

[0028] After confirming that the application instance has been successfully created, the call request is retrieved from the blocking queue;

[0029] The call request is processed through the application instance.

[0030] In one possible implementation, the method further includes:

[0031] Obtain the first call data of the second application to the first application collected by the agent program;

[0032] Based on the first call data, determine the number of target application instances of the first application;

[0033] Update the application instance of the first application based on the target application instance number.

[0034] In one possible implementation, the first call data includes the actual number of requests made by the second application to the first application per unit time within a preset time period; determining the target application instance number of the first application based on the first call data includes:

[0035] If the actual number of requests per unit time is 0, then the number of target application instances is determined to be 0;

[0036] If the actual number of requests per unit time is greater than 0, then obtain the current number of application instances of the first application and the expected number of requests per unit time for a single application instance, and determine the target number of application instances based on the actual number of requests per unit time, the current number of application instances and the expected number of requests per unit time.

[0037] In one possible implementation, determining the target number of application instances based on the actual number of requests per unit time, the current number of application instances, and the expected number of requests per unit time includes:

[0038] The average number of requests per unit time is determined based on the actual number of requests per unit time and the current number of application instances.

[0039] The target number of application instances is determined based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances.

[0040] In one possible implementation, obtaining the first call data of the second application to the first application collected by the agent program includes:

[0041] The data collector obtains at least one call data from the memory corresponding to the second application, which shows that the second application calls at least one application. The at least one call data is collected by the agent program.

[0042] Based on the identifier of the first application, the first call data is obtained in the data collector through the indicator converter.

[0043] Secondly, embodiments of this application provide a device for invoking a microservice application, comprising: a first acquisition module, a creation module, and a processing module, wherein,

[0044] The first acquisition module is used to acquire the call request from the second application to the first application, wherein the first application and the second application are microservice applications;

[0045] The creation module is used to request the creation of an application instance of the first application through the agent program corresponding to the second application if no application instance of the first application exists.

[0046] The processing module is used to process the call request through the application instance.

[0047] In one possible implementation, the creation module is specifically used for:

[0048] Determine the configuration method, which may be asynchronous or synchronous.

[0049] According to the configuration method described, the agent program requests the creation of an application instance of the first application.

[0050] In one possible implementation, the creation module is specifically used for:

[0051] The proxy program generates a no-instance event corresponding to the first application, and the no-instance event includes the identifier of the first application and the number of instances required.

[0052] The no-instance event is published through the agent program;

[0053] After the activator receives the no-instance event, it requests the creation of an application instance of the first application through the activator.

[0054] In one possible implementation, the creation module is specifically used for:

[0055] Determine the first number of call requests to the first application obtained within a preset time period;

[0056] The required number of instances is determined based on the first quantity;

[0057] The no-instance event is generated based on the identifier of the first application and the required number of instances.

[0058] In one possible implementation, the creation module is specifically used for:

[0059] Determine the first number of call requests to the first application obtained within a preset time period;

[0060] The required number of instances is determined based on the first quantity;

[0061] The agent program sends an instance creation request to the activator, the instance creation request including the identifier of the first application and the required number of instances;

[0062] The activator requests the creation of an application instance for the first application.

[0063] In one possible implementation, the microservice application invocation device further includes: an adding module.

[0064] The adding module is used to add the call request to the blocking queue;

[0065] The processing module is specifically used for:

[0066] After confirming that the application instance has been successfully created, the call request is retrieved from the blocking queue;

[0067] The call request is processed through the application instance.

[0068] In one possible implementation, the microservice application invocation device further includes: a second acquisition module, a determination module, and an update module, wherein,

[0069] The second acquisition module is used to acquire the first call data of the second application to the first application collected by the agent program;

[0070] The determining module is used to determine the number of target application instances of the first application based on the first call data.

[0071] The update module is used to update the application instance of the first application according to the number of target application instances.

[0072] In one possible implementation, the determining module is specifically used for:

[0073] If the actual number of requests per unit time is 0, then the number of target application instances is determined to be 0;

[0074] If the actual number of requests per unit time is greater than 0, then obtain the current number of application instances of the first application and the expected number of requests per unit time for a single application instance, and determine the target number of application instances based on the actual number of requests per unit time, the current number of application instances and the expected number of requests per unit time.

[0075] In one possible implementation, the determining module is specifically used for:

[0076] The average number of requests per unit time is determined based on the actual number of requests per unit time and the current number of application instances.

[0077] The target number of application instances is determined based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances.

[0078] In one possible implementation, the second acquisition module is specifically used for:

[0079] The data collector obtains at least one call data from the memory corresponding to the second application, which shows that the second application calls at least one application. The at least one call data is collected by the agent program.

[0080] Based on the identifier of the first application, the first call data is obtained in the data collector through the indicator converter.

[0081] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0082] The memory stores computer-executed instructions;

[0083] The processor executes computer execution instructions stored in the memory, causing the processor to execute the microservice application invocation method described in any of the first aspects.

[0084] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the microservice application invocation method described in any of the first aspects.

[0085] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the microservice application invocation method shown in any of the first aspects.

[0086] This application provides a method, apparatus, and device for invoking microservice applications. The server can obtain a call request from a second application to a first application. If no application instance of the first application exists, it can request the creation of an application instance of the first application through a proxy program corresponding to the second application, and then process the call request through the application instance. Since the server can determine whether an application instance of the first application exists after obtaining the call request, and can immediately create one if it does not exist, and can create the application instance of the first application through a proxy program, it does not require modification of the microservice application platform's program code. This proactively and in real-time expands the application instance of the first application from zero to multiple instances, improving the reliability of microservice application invocation. Attached Figure Description

[0087] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0088] Figure 1 A schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application;

[0089] Figure 2 A flowchart illustrating a method for invoking a microservice application, provided as an exemplary embodiment of this application;

[0090] Figure 3 A flowchart illustrating another method for invoking a microservice application provided as an exemplary embodiment of this application;

[0091] Figure 4 A schematic diagram illustrating a method for invoking a microservice application, provided as an exemplary embodiment of this application;

[0092] Figure 5 A flowchart illustrating another method for invoking a microservice application, provided as an exemplary embodiment of this application;

[0093] Figure 6A A schematic diagram illustrating another method for invoking a microservice application provided as an exemplary embodiment of this application;

[0094] Figure 6B A schematic diagram illustrating the process of another microservice application invocation method provided as an exemplary embodiment of this application;

[0095] Figure 7 A schematic diagram of the structure of a microservice application invocation device provided as an exemplary embodiment of this application;

[0096] Figure 8 A schematic diagram of the structure of another microservice application invocation device provided as an exemplary embodiment of this application;

[0097] Figure 9 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation

[0098] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0099] Figure 1 This is a schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 1This includes a client and a microservice application platform. The client can contain an application program, while the microservice application platform includes multiple microservice applications. The client can use its application to call the microservice applications within the platform for task processing. Multiple microservice applications within the platform can call each other. For example, the microservice application platform can include microservice application 1, microservice application 2, microservice application 3, ..., microservice application k. Microservice application 1 can call microservice application 2 and microservice application 3, and microservice application 2 can call microservice application 3 and microservice application k, and so on.

[0100] Applications can call microservices within a microservices application platform. For example, if the application is a payment system, microservice application 1 can be a payment service, microservice application 2 can be an authentication service, and microservice application 3 can be a balance service. In this case, the payment software can call the payment service, and the payment service can call the authentication service and the balance service.

[0101] In related technologies, microservice applications may have multiple application instances or no application instance at all. In practical applications, when the first microservice application calls the second microservice application, if the second microservice application does not have an application instance, the microservice application platform will report an error and terminate the call process from the first microservice application to the second microservice application, resulting in low reliability of microservice application calls.

[0102] In this embodiment, the server can obtain a call request from a second application to a first application and determine whether an application instance of the first application exists. If it does not exist, the server can request the creation of an application instance of the first application through the proxy program corresponding to the second application, and process the call request through the application instance. Since an application instance of the first application can be created immediately after obtaining the call request if it does not exist, the reliability of microservice application calls is improved.

[0103] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.

[0104] Figure 2 This is a flowchart illustrating a method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to [link / reference]. Figure 2 The method may include:

[0105] S201. Obtain the call request from the second application to the first application.

[0106] The execution entity in this application embodiment can be a server or a microservice application invocation device set on the server. The microservice application invocation device can be implemented by software or by a combination of software and hardware. The microservice application invocation device can be a processor in the server. For ease of understanding, the following description uses a server as the execution entity.

[0107] A microservice application platform can be set up on the server, and the microservice application platform can include multiple microservice applications.

[0108] The first application and the second application can both be microservice applications. There can be a calling relationship between the first application and the second application. For example, if the first application is an authentication service and the second application is a payment service, then the second application can call the first application.

[0109] Optionally, the server can obtain the second application's call request to the first application.

[0110] For example, if the second application is a payment service and the first application is an authentication service, and the second application needs to call the first application, the server can obtain the call request from the second application to the first application.

[0111] S202. If no application instance of the first application exists, request the creation of an application instance of the first application through the agent program corresponding to the second application.

[0112] Each microservice application can have a corresponding application list. The application list can include information about multiple application instances. For example, the first application can have a corresponding application list 1. Application list 1 can include information about two application instances. Application instance 1 can use port 1 and an Internet Protocol (IP) address of IP address 1; application instance 2 can use port 2 and an IP address of IP address 2.

[0113] Optionally, after the server receives the call request from the second application to the first application, it can determine whether the application list of the first application is empty, which can specifically include the following two cases:

[0114] Case 1: The application list of the first application is not empty.

[0115] In this case, the application list of the first application may include information on at least one application instance, that is, there is at least one application instance of the first application. The server can determine the application instance of the first application based on the call request of the second application to the first application, and process the call request through the application instance.

[0116] For example, if the server receives a call request from the second application to the first application as call request 1, and if the server determines that the application list of the first application includes information on two application instances, where application instance 1 can use port 1 and IP address 1, assuming the server can determine the information of application instance 1 based on call request 1, then call request 1 can be processed through application instance 1.

[0117] Scenario 2: The application list of the first application is empty.

[0118] In this case, if the application list of the first application does not contain information about the application instance, that is, if there is no application instance of the first application, the server can request to create the application instance of the first application through the agent program of the second application.

[0119] For example, if the server receives a request from the second application to call the first application as request 1, and if the server determines that the application list of the first application does not contain application instance information, the server can create an application instance of the first application based on the request from the proxy program of the second application.

[0120] S203. Process the call request through the application instance.

[0121] Optionally, after creating an application instance of the first application, the call request can be processed through the application instance.

[0122] For example, if the server receives a request from the second application to call the first application as request 1, and if the server creates an application instance 1 of the first application based on the request through the proxy program of the second application, then request 1 can be processed through application instance 1.

[0123] In this embodiment, the server can obtain a call request from a second application to a first application. If no application instance of the first application exists, it can request the creation of an application instance of the first application through the proxy program corresponding to the second application, and then process the call request through the application instance. Since the server can determine whether an application instance of the first application exists after obtaining the call request, and can immediately create one if it does not exist, and can do so through a proxy program, it does not require modification of the microservice application platform's program code. This proactively and in real-time expands the application instance of the first application from zero to multiple instances, improving the reliability of microservice application calls.

[0124] Below, in Figure 2 Based on the illustrated embodiments, combined with Figure 3 The following provides a more detailed explanation of the methods for invoking the aforementioned microservice applications.

[0125] Figure 3 This is a flowchart illustrating another method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to... Figure 3 The method may include:

[0126] S301. Obtain the call request from the second application to the first application.

[0127] It should be noted that the execution process of step S301 can be referred to the execution process of step S201, and will not be repeated here.

[0128] S302. Determine whether the application list of the first application is empty.

[0129] Optionally, if the microservice application being called is the first application, the server can determine whether the application list of the first application is empty. If yes, then S303 can be executed; otherwise, then S306 can be executed.

[0130] For example, if the server receives a request 1 from the second application to call the first application, the server can determine whether the application list of the first application is empty. If the application list of the first application is empty, it means that there is no application instance of the first application, and S303 can be executed; if the application list of the first application is not empty, it means that there is an application instance of the first application, and S306 can be executed.

[0131] S303. Add the call request to the blocking queue.

[0132] A blocking queue can be used to cache multiple requests. For example, a blocking queue can cache 10 requests.

[0133] Optionally, the server can add the call request to a blocking queue to cache the call request.

[0134] For example, if the server receives five call requests from the second application to the first application, the server can add these five call requests to a blocking queue to cache them and avoid discarding them.

[0135] S304. Request the creation of an application instance for the first application through the agent program.

[0136] In an optional embodiment, a configuration method can be determined, and an application instance of the first application can be requested to be created through a proxy program according to the configuration method.

[0137] Optionally, the configuration method can include asynchronous or synchronous methods.

[0138] Asynchronous mode means that events can be published to a message queue through a proxy program, and the activator can retrieve the events published by the proxy program from the message queue.

[0139] Synchronous mode refers to sending events or requests to the activator through an agent program, so that the activator can directly obtain the events or requests issued by the agent program.

[0140] In one optional embodiment, depending on the configuration method, requesting the creation of an application instance of the first application through the agent program can include the following two methods:

[0141] Method 1: The configuration method is asynchronous.

[0142] In this approach, requesting the creation of an application instance for the first application through a proxy program includes: generating a no-instance event corresponding to the first application through the proxy program; publishing the no-instance event through the proxy program; and requesting the creation of an application instance for the first application through the activator after the activator obtains the no-instance event.

[0143] A no-instance event can include the identifier of the first application and the number of instances required. For example, if the identifier of the first application is identifier 1 and the number of instances required is 2, then the no-instance event for the first application can include the identifier 1 and the number of instances required 2.

[0144] In an optional embodiment, a no-instance event corresponding to the first application can be generated by a proxy program in the following manner: determining a first number of call requests to the first application obtained within a preset time period; determining the number of instance requirements based on the first number; and generating a no-instance event based on the identifier of the first application and the number of instance requirements.

[0145] The preset time period can be a time period set in advance by staff. For example, the preset time period can be 1 second.

[0146] For example, if the preset time period is 1 second, the server can determine the first number of call requests to the first application obtained within 1 second. Assuming the first number is 5, the server can determine the instance requirement as 5 based on the first number 5. If the identifier of the first application is identifier 1, the server can generate a no-instance event corresponding to the first application through a proxy program, based on the identifier 1 and the instance requirement of 5. This no-instance event can include the identifier 1 and the instance requirement of 5 for the first application.

[0147] Optionally, after generating a no-instance event for the first application through the proxy program, the no-instance event can be published through the proxy program. The activator can then obtain the no-instance event and request the creation of an application instance for the first application.

[0148] For example, if a no-instance event 1 is generated for the first application through a proxy program, then this no-instance event 1 can be published through the proxy program. The activator can obtain this no-instance event 1. If no-instance event 1 includes the identifier 1 of the first application and the required number of instances 5, then 5 application instances of the first application can be created based on the identifier 1 of the first application.

[0149] Method 2: Configured as a synchronous method.

[0150] In this approach, requesting the creation of an application instance of the first application through a proxy program includes: determining a first number of call requests for the first application obtained within a preset time period; determining the required number of instances based on the first number; sending an instance creation request to the activator through the proxy program; and requesting the creation of an application instance of the first application through the activator.

[0151] The instance creation request can include the identifier of the first application and the required number of instances. For example, if the identifier of the first application is identifier 1 and the required number of instances is 2, then the instance creation request for the first application can include the identifier 1 and the required number of instances 2.

[0152] For example, if the preset time period is 1 second, the server can determine the first number of call requests for the first application obtained within 1 second. Assuming the first number is 5, the server can determine the required number of instances is 5 based on the first number 5. If the identifier of the first application is identifier 1, the server can send instance creation request 1 corresponding to the first application to the activator through a proxy program. This instance creation request 1 can include the identifier 1 of the first application and the required number of instances, 5. After receiving this instance creation request 1, the activator can request the creation of 5 application instances of the first application based on the identifier 1 of the first application. The creation of application instances can be achieved by configuring information such as the IP address and port number for the first application.

[0153] It should be noted that, regardless of whether it is method 1 or method 2, after creating the application instance of the first application, it can also be registered in the registry center according to the identifier of the first application and / or the information of the application instance; according to the information of the application instance, the application list of the first application is updated, and the updated application list of the first application is sent to the second application.

[0154] For example, if an activator creates five application instances of a first application based on a no-instance event or an instance creation request, and assuming that the information for application instance 1 includes IP address 1 and port 1, the information for application instance 2 includes IP address 2 and port 2, and so on, and the information for application instance 5 includes IP address 5 and port 5, then the server can register the application in the registry center based on the identifier of the first application and the information of these five application instances. After registration, the server can update the application list of the first application based on the information of these five application instances, that is, add the information of these five application instances to the application list of the first application. The updated application list of the first application will then include the information of application instance 1, application instance 2, application instance 3, application instance 4, and application instance 5, and the server can send the updated application list to the second application.

[0155] S305. Retrieve the call request from the blocking queue.

[0156] Optionally, after creating the application instance of the first application, a call request can be retrieved from the blocking queue.

[0157] For example, the server can retrieve five call requests from the second application to the first application from the blocking queue. These five call requests can be call request 1, call request 2, call request 3, call request 4, and call request 5, respectively.

[0158] S306. Process the call request through the application instance.

[0159] For example, if there are 5 application instances of the first application, namely application instance 1, application instance 2, application instance 3, application instance 4 and application instance 5, and if 5 call requests from the second application to the first application are obtained, namely call request 1, call request 2, call request 3, call request 4 and call request 5, then call request 1 can be processed through application instance 1, call request 2 through application instance 2, call request 3 through application instance 3, call request 4 through application instance 4, and call request 5 through application instance 5.

[0160] In this embodiment, the server can obtain a call request from a second application to a first application and determine whether the application list of the first application is empty. If the application list of the first application is empty, the call request can be added to a blocking queue, and an application instance of the first application can be created through a proxy program. After successful creation, the call request can be obtained from the blocking queue and processed through the application instance; if the application list of the first application is not empty, the call request can be processed directly through the application instance. Since the server can determine whether an application instance of the first application exists after obtaining the call request, and if no application instance of the first application exists, it can create an application instance of the first application immediately, and can create the application instance of the first application through a proxy program, without modifying the program code of the microservice application platform, it realizes the proactive and real-time scaling of the application instance of the first application from zero to multiple instances, improving the call reliability of the microservice application.

[0161] Below, based on any of the above embodiments, combined with Figure 4 The process of calling methods in the above microservice application will be explained in more detail through specific examples.

[0162] Figure 4 This is a schematic diagram illustrating a method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to... Figure 4 The steps include ①②③④⑤⑥⑦⑧.

[0163] A microservice application platform can be deployed on the server. The microservice application platform may include a first application, a second application, an activator, a registry center, and a blocking queue, etc.

[0164] In step ①, the server can obtain the call request from the second application to the first application. In step ②, the server can obtain the application list of the first application and determine whether the application list is empty. If the application list of the first application is not empty, the call request can be processed directly through the application instance; if the application list of the first application is empty, it means that there is no application instance of the first application, and the server can execute step ③, that is, add the call request to the blocking queue to cache the call request.

[0165] In step ④, the server can create an application instance of the first application through the activator in either an asynchronous or synchronous manner. Specifically, the server can asynchronously generate a no-instance event corresponding to the first application through a proxy program and publish the no-instance event through the proxy program. The no-instance event may include the identifier of the first application and the required number of instances. The activator can indirectly obtain the no-instance event published by the proxy program. Alternatively, the server can synchronously determine the first number of call requests to the first application obtained within a preset time period, determine the required number of instances based on the first number, and then send an instance creation request to the activator through the proxy program, so that the activator can obtain the instance creation request. The instance creation request may include the identifier of the first application and the required number of instances.

[0166] In step ⑤, the activator can obtain the no-instance event or instance creation request published by the agent program, and create application instances of the first application according to the required number of instances. For example, if the required number of instances is 2, the activator can create application instance 1 and application instance 2 of the first application. The information of application instance 1 may include IP address 1 and port 1, and the information of application instance 2 may include IP address 2 and port 2.

[0167] In step ⑥, the application can be registered in the registry center based on its identifier and application instance information. After registration, the application list of the first application can be updated based on the application instance information, as described in step ⑦. After the update, the application list of the first application will include the application instance information. For example, the application list of the first application may include the information of application instance 1 and application instance 2.

[0168] Since the updated application list includes information on multiple application instances, in step ⑧, the server can obtain the call request from the blocking queue, determine the application instance information from the application list of the first application, and then process the call request through the application instance.

[0169] In this embodiment, the server can obtain a call request from a second application to a first application and determine whether the application list of the first application is empty. If the application list of the first application is empty, the call request can be added to a blocking queue, and an application instance of the first application can be created through a proxy program. After successful creation, the application can be registered in the registry center according to the identifier of the first application and the information of the application instance; and the application list of the first application can be updated according to the information of the application instance. The server can obtain the call request from the blocking queue and process the call request through the application instance; if the application list of the first application is not empty, the call request can be processed directly through the application instance. Since the server can determine whether an application instance of the first application exists after obtaining the call request, if no application instance of the first application exists, it can create the application instance of the first application immediately, and the application instance of the first application can be created through a proxy program without modifying the program code of the microservice application platform. This achieves proactive and real-time scaling of the application instance of the first application from zero to multiple instances, improving the call reliability of the microservice application.

[0170] In any of the above embodiments, the main focus is on creating an application instance of the first application when the application instance of the first application is 0. Below, in conjunction with... Figure 5 The following describes the case where the number of application instances of the first application is updated from m to n, where m is an integer greater than or equal to 1 and n is an integer greater than or equal to 0.

[0171] Figure 5 This is a flowchart illustrating another method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to... Figure 5 The methods may include:

[0172] S501. Obtain the call request from the second application to the first application.

[0173] It should be noted that the execution process of step S501 can be referred to the execution process of step S201, and will not be repeated here.

[0174] S502. Obtain the first call data of the second application to the first application collected by the agent program.

[0175] In an optional embodiment, the first call data of the second application to the first application collected by the agent program can be obtained in the following way: at least one call data of the second application calling at least one application is obtained from the memory corresponding to the second application by the data collector; the first call data is obtained in the data collector by the indicator converter according to the identifier of the first application.

[0176] Optionally, the server may include a data collector and an indicator converter.

[0177] The data collector can be used to periodically acquire call data from a second application to at least one application.

[0178] Indicator converters can be used to filter and query data in a data collector.

[0179] At least one set of call data may be data collected by the agent program corresponding to the second application and stored in the memory of the second application. At least one set of call data may include the first call data from the second application to the first application.

[0180] For example, the server can use a data collector to retrieve at least one call data from the second application to at least one other application, stored in the memory corresponding to the second application. This at least one call data may include first call data from the second application to the first application. If the first application is identified as identifier 1, then based on identifier 1, the first call data from the second application to the first application can be retrieved from the data collector using an indicator converter.

[0181] S503. Determine the number of target application instances of the first application based on the first call data.

[0182] Optionally, the first call data may include the actual number of requests made by the second application to the first application per unit time within a preset time period. The actual number of requests per unit time can be represented by requests per second (RPS).

[0183] For example, if the preset time period is 1 minute, and the actual number of requests per unit time is represented by RPS, then the first call data may include 5 actual unit time requests from the second application to the first application within 1 minute.

[0184] In one optional embodiment, determining the number of target application instances of the first application based on the first call data may include the following two cases:

[0185] Scenario 1: The actual number of requests per unit time is 0.

[0186] In this case, the number of target application instances can be determined to be 0 based on the actual number of requests per unit time being 0.

[0187] For example, if the preset time period is 1 minute, and the actual number of requests made by the second application to the first application within 1 minute is 0, then the number of target application instances can be determined to be 0 based on the fact that the actual number of requests made per unit of time is 0.

[0188] Scenario 2: The actual number of requests per unit time is greater than 0.

[0189] In this case, the number of current application instances of the first application and the expected number of requests per unit time for a single application instance can be obtained, and the target number of application instances can be determined based on the actual number of requests per unit time, the number of current application instances, and the expected number of requests per unit time.

[0190] Optionally, the expected number of requests per unit time for a single application instance can be preset by the worker. The expected number of requests per unit time can be represented by RPS. For example, the expected number of requests per unit time can be 10.

[0191] Optionally, the target number of application instances can be determined as follows: determine the current average number of requests per unit time based on the actual number of requests per unit time and the current number of application instances; determine the target number of application instances based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances.

[0192] For example, if the server obtains that the current number of application instances for the first application is 2, and the actual number of requests per unit time is 40, then based on the actual number of requests per unit time (40) and the current number of application instances (2), the average number of requests per unit time for a single application instance can be determined to be 40 / 2 = 20. If the expected number of requests per unit time for a single application instance is 10, then based on the current average number of requests per unit time (20), the expected number of requests per unit time (10), and the current number of application instances (2), the target number of application instances can be determined to be 20 / 10*2 = 4.

[0193] S504. Update the application instances of the first application based on the number of target application instances.

[0194] For example, if the current number of application instances of the first application is 2 and the number of target application instances is 0, the number of application instances of the first application can be reduced from 2 to 0; if the number of target application instances is 8, the number of application instances of the first application can be expanded from 2 to 8.

[0195] S505. Process the call request through the application instance.

[0196] It should be noted that the execution process of step S505 can be found in the execution process of step S203 or step S306, and will not be repeated here.

[0197] In this embodiment, the server can obtain a call request from a second application to a first application and obtain first call data from the second application to the first application collected by a proxy program. Based on the first call data, the server can determine the number of target application instances for the first application and update the application instances of the first application accordingly. This allows the server to process the call request through the application instances. Since the server can collect at least one call data from the second application to at least one application through a proxy program and store this data in the memory corresponding to the second application; it can periodically obtain at least one call data from the memory corresponding to the second application through a data collector; and it can obtain the specified first call data in the data collector through an indicator converter. This eliminates the need to modify the program code of the microservice application platform, thereby updating the number of application instances of the first application from m to n and improving the call reliability of the microservice application.

[0198] Below, in Figure 5 Based on the illustrated embodiments, specific examples are provided, combined with Figure 6A The following provides a more detailed explanation of the case where the number of application instances of the first application is updated from m to n (n > 0); combined with Figure 6B The following provides a more detailed explanation of the case where the number of application instances of the first application is reduced from m to 0 (n equals 0).

[0199] Figure 6A This is a schematic diagram illustrating another method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to... Figure 6A This includes steps ①②③④⑤⑥.

[0200] The server can be configured with a microservice application platform, which may include a first application, a second application, memory corresponding to the second application, a data collector, and an indicator converter, etc.

[0201] In step ①, the server can obtain the call request from the second application to the first application. The second application may include a proxy program. In step ②, the proxy program can collect at least one call data from the second application to at least one application and store at least one call data in the memory corresponding to the second application. For example, the at least one call data may include first call data from the second application to the first application and call data from the second application to a third application.

[0202] In step ③, the server can periodically obtain at least one call data from the second application to at least one application from the memory corresponding to the second application through the data collector.

[0203] In step ④, the server can obtain the specified call data from the data collector through the indicator converter based on the identifier of the first application, that is, the first call data of the second application to the first application.

[0204] After determining the first call data of the second application to the first application, since the first call data may include the actual number of requests made by the second application to the first application per unit time within a preset time period, if the actual number of requests made per unit time is greater than 0, the server can execute step ⑤, that is, determine the number of target application instances of the first application based on the first call data, and update the application instances of the first application.

[0205] Specifically, the server can obtain the current number of application instances of the first application, the expected number of requests per unit time for a single application instance, and determine the current average number of requests per unit time based on the actual number of requests per unit time and the current number of application instances; and determine the target number of application instances based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances. The server can then update the number of application instances of the first application based on the target number of application instances.

[0206] For example, if the server obtains that the current number of application instances for the first application is 2, and the actual number of requests per unit time is 10, then based on the actual number of requests per unit time (10) and the current number of application instances (2), the average number of requests per unit time can be determined to be 10 / 2 = 5. If the expected number of requests per unit time for a single application instance is 10, then based on the current average number of requests per unit time (5), the expected number of requests per unit time (10), and the current number of application instances (2), the target number of application instances can be determined to be 5 / 10*2 = 1. Since the current number of application instances for the first application is 2, it means that there are already 2 application instances, namely application instance 1 and application instance 2. Since the target number of application instances is 1, application instance 2 of the first application can be deleted, while application instance 1 of the first application can be kept, thus updating the number of application instances for the first application from 2 to 1.

[0207] In step ⑥, the call request can be processed through an application instance. There can be at least one call request.

[0208] For example, if there is an application instance 1 for the first application, and there are 3 call requests, namely call request 1, call request 2 and call request 3, then the server can process call request 1, call request 2 and call request 3 respectively through application instance 1.

[0209] In this embodiment, the server can obtain call requests from a second application to a first application, collect at least one call data from the second application to at least one other application through a proxy program, and store the at least one call data in the memory corresponding to the second application. The server can periodically obtain at least one call data through a data collector, and can obtain the first call data from the second application to the first application in the data collector based on the identifier of the first application through an indicator converter. The server can determine the number of target application instances of the first application based on the first call data, and update the application instances of the first application based on the number of target application instances, and then process the call requests through the application instances. Since the server can collect at least one call data from the second application to at least one other application through a proxy program and store the at least one call data in the memory corresponding to the second application; can periodically obtain at least one call data in the memory corresponding to the second application through a data collector, and can obtain the specified first call data in the data collector through an indicator converter, without modifying the program code of the microservice application platform, it realizes the update of the application instances of the first application from m to n, improving the call reliability of the microservice application.

[0210] Figure 6B This is a schematic diagram illustrating another method for invoking a microservice application, provided as an exemplary embodiment of this application. Please refer to... Figure 6B This includes steps ①②③④.

[0211] The server can be configured with a microservice application platform, which may include a first application, a second application, memory corresponding to the second application, a data collector, and an indicator converter, etc.

[0212] The second application may include a proxy program. In step ①, the server can use the proxy program to collect at least one call data from the second application to at least one application, and store at least one call data in the memory corresponding to the second application. For example, the at least one call data may include first call data from the second application to the first application and call data from the second application to the third application.

[0213] In step ②, the server can periodically obtain at least one call data from the second application to at least one application from the memory corresponding to the second application through the data collector.

[0214] In step ③, the server can obtain the specified call data from the data collector through the indicator converter based on the identifier of the first application, that is, the first call data of the second application to the first application.

[0215] After determining the first call data of the second application to the first application, since the first call data may include the actual number of requests made by the second application to the first application per unit time within a preset time period, if the actual number of requests per unit time is equal to 0, the server can execute step ④. That is, based on the fact that the actual number of requests per unit time in the first call data is 0, the server can determine that the target application instance count of the first application is 0 and update the application instances of the first application. For example, if the current application instance count of the first application is 2, it means that there are already 2 application instances, namely application instance 1 and application instance 2. Since the target application instance count is 0, application instance 1 and application instance 2 of the first application can be deleted to reduce the number of application instances of the first application from 2 to 0.

[0216] In this embodiment, the server can collect at least one call data from a second application to at least one application through a proxy program, and store the at least one call data in the memory corresponding to the second application. The server can periodically obtain at least one call data through a data collector, and can obtain the first call data from the second application to the first application in the data collector through an indicator converter based on the identifier of the first application. The server can determine the number of target application instances of the first application based on the first call data, and update the application instances of the first application based on the number of target application instances. Since the server can collect at least one call data from the second application to at least one application through a proxy program and store the at least one call data in the memory corresponding to the second application; can periodically obtain at least one call data in the memory corresponding to the second application through a data collector, and can obtain the specified first call data in the data collector through an indicator converter, without modifying the program code of the microservice application platform, it realizes the scaling down of the application instances of the first application from m to 0, improving the call reliability of the microservice application.

[0217] Figure 7 A schematic diagram of a microservice application invocation device provided as an exemplary embodiment of this application can be found in the following example. Figure 7 The microservice application invocation device 10 includes: a first acquisition module 11, a creation module 12, and a processing module 13, wherein...

[0218] The first acquisition module 11 is used to acquire the call request from the second application to the first application, wherein the first application and the second application are microservice applications;

[0219] The creation module 12 is used to request the creation of an application instance of the first application through the agent program corresponding to the second application if no application instance of the first application exists.

[0220] The processing module 13 is used to process the call request through the application instance.

[0221] The microservice application invocation device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0222] In one possible implementation, the creation module 12 is specifically used for:

[0223] Determine the configuration method, which may be asynchronous or synchronous.

[0224] According to the configuration method described, the agent program requests the creation of an application instance of the first application.

[0225] In one possible implementation, the creation module 12 is specifically used for:

[0226] The proxy program generates a no-instance event corresponding to the first application, and the no-instance event includes the identifier of the first application and the number of instances required.

[0227] The no-instance event is published through the agent program;

[0228] After the activator receives the no-instance event, it requests the creation of an application instance of the first application through the activator.

[0229] In one possible implementation, the creation module 12 is specifically used for:

[0230] Determine the first number of call requests to the first application obtained within a preset time period;

[0231] The required number of instances is determined based on the first quantity;

[0232] The no-instance event is generated based on the identifier of the first application and the required number of instances.

[0233] In one possible implementation, the creation module 12 is specifically used for:

[0234] Determine the first number of call requests to the first application obtained within a preset time period;

[0235] The required number of instances is determined based on the first quantity;

[0236] The agent program sends an instance creation request to the activator, the instance creation request including the identifier of the first application and the required number of instances;

[0237] The activator requests the creation of an application instance for the first application.

[0238] In one possible implementation, the processing module 13 is specifically used for:

[0239] After confirming that the application instance has been successfully created, the call request is retrieved from the blocking queue;

[0240] The call request is processed through the application instance.

[0241] The microservice application invocation device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0242] Figure 8 A schematic diagram of the structure of another microservice application invocation device provided as an exemplary embodiment of this application, in Figure 7 Based on the illustrated embodiments, please refer to Figure 8 The microservice application invocation device 10 may further include: an adding module 14, a second obtaining module 15, a determining module 16, and an updating module 17, wherein,

[0243] The adding module 14 is used to add the call request to the blocking queue;

[0244] The second acquisition module 15 is used to acquire the first call data of the second application to the first application collected by the agent program;

[0245] The determining module 16 is used to determine the number of target application instances of the first application based on the first call data.

[0246] The update module 17 is used to update the application instance of the first application according to the number of target application instances.

[0247] The microservice application invocation device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0248] In one possible implementation, the determining module 16 is specifically used for:

[0249] If the actual number of requests per unit time is 0, then the number of target application instances is determined to be 0;

[0250] If the actual number of requests per unit time is greater than 0, then obtain the current number of application instances of the first application and the expected number of requests per unit time for a single application instance, and determine the target number of application instances based on the actual number of requests per unit time, the current number of application instances and the expected number of requests per unit time.

[0251] In one possible implementation, the determining module 16 is specifically used for:

[0252] The average number of requests per unit time is determined based on the actual number of requests per unit time and the current number of application instances.

[0253] The target number of application instances is determined based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances.

[0254] In one possible implementation, the second acquisition module 15 is specifically used for:

[0255] The data collector obtains at least one call data from the memory corresponding to the second application, which shows that the second application calls at least one application. The at least one call data is collected by the agent program.

[0256] Based on the identifier of the first application, the first call data is obtained in the data collector through the indicator converter.

[0257] The microservice application invocation device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0258] Figures 7-8 The device that invokes the microservice application shown can be a device set up in the server.

[0259] An exemplary embodiment of this application provides a structural schematic diagram of an electronic device. Please refer to [link / reference]. Figure 9 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.

[0260] The memory 22 stores computer-executed instructions;

[0261] The processor 21 executes the computer execution instructions stored in the memory 22, causing the processor 21 to execute the microservice application invocation method as shown in the above method embodiment.

[0262] Figure 9 The electronic device shown can be the server described in any of the above embodiments.

[0263] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the microservice application invocation method described in the above method embodiments.

[0264] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the microservice application invocation method shown in the above method embodiments.

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

[0266] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0267] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0268] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0269] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0270] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0271] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0272] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0273] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for invoking a microservice application, characterized in that, include: Obtain the call request from the second application to the first application, where the first application and the second application are microservice applications; If the application instance of the first application does not exist in the application list of the first application, the call request is added to the blocking queue; The application instance of the first application is created by requesting the agent program corresponding to the second application. Retrieve the call request from the blocking queue; The call request is processed through the application instance; The method further includes: Based on the identifier of the first application and the information of the application instance, register in the registration center; Update the application list of the first application based on the information of the application instance.

2. The method according to claim 1, characterized in that, Requesting the creation of an application instance of the first application through a proxy program includes: Determine the configuration method, which may be asynchronous or synchronous. According to the configuration method described, the agent program requests the creation of an application instance of the first application.

3. The method according to claim 2, characterized in that, The configuration method is the asynchronous method; according to the configuration method, the application instance of the first application is requested to be created through the proxy program, including: The proxy program generates a no-instance event corresponding to the first application, and the no-instance event includes the identifier of the first application and the number of instances required. The no-instance event is published through the agent program; After the activator receives the no-instance event, it requests the creation of an application instance of the first application through the activator.

4. The method according to claim 3, characterized in that, The proxy program generates an instance-free event corresponding to the first application, including: Determine the first number of call requests to the first application obtained within a preset time period; The required number of instances is determined based on the first quantity; The no-instance event is generated based on the identifier of the first application and the required number of instances.

5. The method according to claim 2, characterized in that, The configuration method is the synchronization method; according to the configuration method, the application instance of the first application is requested to be created through the proxy program, including: Determine the first number of call requests to the first application obtained within a preset time period; The required number of instances is determined based on the first quantity; The agent program sends an instance creation request to the activator, the instance creation request including the identifier of the first application and the required number of instances; The activator requests the creation of an application instance for the first application.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: Obtain the first call data of the second application to the first application collected by the agent program; Based on the first call data, determine the number of target application instances of the first application; Update the application instance of the first application based on the target application instance number.

7. The method according to claim 6, characterized in that, The first call data includes the actual number of requests made by the second application to the first application per unit time within a preset time period; Based on the first call data, the number of target application instances of the first application is determined, including: If the actual number of requests per unit time is 0, then the number of target application instances is determined to be 0; If the actual number of requests per unit time is greater than 0, then obtain the current number of application instances of the first application and the expected number of requests per unit time for a single application instance, and determine the target number of application instances based on the actual number of requests per unit time, the current number of application instances and the expected number of requests per unit time.

8. The method according to claim 7, characterized in that, The target number of application instances is determined based on the actual number of requests per unit time, the current number of application instances, and the expected number of requests per unit time, including: The average number of requests per unit time is determined based on the actual number of requests per unit time and the current number of application instances. The target number of application instances is determined based on the current average number of requests per unit time, the expected number of requests per unit time, and the current number of application instances.

9. The method according to claim 7 or 8, characterized in that, Obtaining the first call data of the second application to the first application collected by the agent program includes: The data collector obtains at least one call data from the memory corresponding to the second application, which shows that the second application calls at least one application. The at least one call data is collected by the agent program. Based on the identifier of the first application, the first call data is obtained in the data collector through the indicator converter.

10. A device for invoking a microservice application, characterized in that, include: The first module consists of an acquisition module, a creation module, and a processing module. The first acquisition module is used to acquire the call request from the second application to the first application, wherein the first application and the second application are microservice applications; The creation module is used to, if the application instance of the first application does not exist in the application list of the first application, add the call request to the blocking queue and request the creation of the application instance of the first application through the agent program corresponding to the second application; The processing module is used to obtain the call request from the blocking queue and process the call request through the application instance; The processing module is further configured to: Based on the identifier of the first application and the information of the application instance, register in the registration center; Update the application list of the first application based on the information of the application instance.

11. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the microservice application invocation method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the microservice application invocation method according to any one of claims 1 to 9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method for invoking a microservice application as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Conversation-based service instance management method and equipment under micro service framework

    CN108206852A

  • Server-free system and method, computer equipment and storage medium

    CN114979104A