Plug-in configuration method and computing device

By dynamically loading plug-in binary files, the performance problems caused by static compilation of plug-in configurations in service proxy nodes are solved, fast startup and flexible plug-in management are achieved, and user experience and system performance are improved.

CN118760477APending Publication Date: 2024-10-11HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310308093.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The plug-in configuration in the existing service agent node uses static compilation, which results in slow startup and takes up a lot of memory, affecting the performance of the computing device. Adding new plug-ins requires restarting the business, affecting the user experience.

Method used

Adopt the method of dynamically loading plug-in binary files, save the mapping relationship between plug-in names and binary file addresses through the auxiliary sidecar registration center, and dynamically load the required plug-ins according to the administrator's configuration, reducing system startup time and memory usage, and without restarting the business. Add new plug-ins below.

Benefits of technology

It improves the performance and user experience of computing devices, reduces system startup time and memory usage, and dynamically adds new plug-ins without affecting business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760477A_ABST
    Figure CN118760477A_ABST
Patent Text Reader

Abstract

The invention provides a plug-in configuration method and computing equipment, because a mapping relation between a plug-in name and an address of a plug-in binary file is stored on a second module, a first module can acquire the plug-in name according to plug-in configuration information and acquire the address of the plug-in binary file from the second module according to the plug-in name, so that the plug-in can be configured according to the plug-in binary file. Therefore, the binary file of the plug-in is dynamically loaded. In the application, the first module does not acquire all required plug-in binary files when starting, but acquires the address of the plug-in binary file from the second module based on the plug-in configuration information issued by a subsequent administrator, and dynamically loads the plug-in binary file; according to the method, the starting time of the whole system can be shortened, fixed memory occupation in the system is reduced, and the performance of computing equipment is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the application field of computer technology service grid, and more specifically, to a method and computing device for configuring a plug-in. Background Art

[0002] In the microservice architecture of computers, applications and services usually require some related basic functions, such as monitoring, logging, configuration, and network services. If they are integrated directly into the application, they can run in the same process as the application, so that shared resources can be effectively utilized. However, this also means that they are not well isolated from each other, and the interruption of one service may affect other services or the entire application. In addition, they usually need to be implemented in the same language as the main application. Therefore, there is a strong interdependence between services and applications.

[0003] In order to better achieve business lightweight and service governance infrastructure, the service governance function can usually be separated from the application itself as a separate process and placed on the same host with the main application, but they will be deployed in their own processes or containers. This method is also called a service proxy (for example, a sidecar proxy) in the service mesh technology. The service proxy node usually contains a variety of plug-in configurations that can provide functions such as "service discovery", "registration", "service call", "application authentication", and "speed limit".

[0004] At present, the plug-in configuration in the existing service proxy node is "statically compiled". When the node is started, all the compiled plug-in binary files need to be loaded into the computer's memory together. The loading speed is slow and it will also occupy a large amount of memory resources in the computer, affecting the performance of the computing device. Therefore, how to improve the flexibility of plug-in configuration in the service proxy has become a technical problem that needs to be solved. Summary of the invention

[0005] The present application provides a method for configuring a plug-in, which can reduce the startup time of the entire system and reduce the fixed memory usage by dynamically loading the plug-in binary, thereby improving the performance of the computing device.

[0006] In a first aspect, a method for configuring a plug-in is provided, which can be executed by a first module. The first module can be a process, container, unit, module, device / equipment with the original sidecar function, or the first module can be a component (for example, a chip or circuit) of a module with the original sidecar function, without limitation.

[0007] The method includes: a first module receives plug-in configuration information, the plug-in configuration information includes plug-in chain information, the plug-in chain information includes a plug-in name, wherein the first module is used to provide a service grid governance function; the first module obtains the address of a plug-in binary file corresponding to the plug-in name from a second module according to the plug-in name in the plug-in chain information, wherein the second module stores first information, the first information includes a first mapping relationship, and the first mapping relationship is a mapping relationship between the plug-in name and the address of the plug-in binary file; the first module obtains the plug-in binary file according to the address of the plug-in binary file, and loads the plug-in binary file into the memory of a first device, wherein the first device includes the first module.

[0008] In the present application, the plug-in chain information may specifically include the plug-in name, plug-in order, and configuration of each plug-in. The "file system" in the present application, for example, may be understood as a server.

[0009] In the present application, in a possible implementation, for example, the second module may be an auxiliary sidecar registration center, and the third module may be an auxiliary sidecar.

[0010] Based on the above technical solution, in this application, since the mapping relationship between the plug-in name and the address of the plug-in binary file is saved on the second module, the first module can obtain the plug-in name according to the plug-in configuration information sent by the administrator, and obtain the address of the plug-in binary from the registration center according to the plug-in name, thereby dynamically loading the plug-in binary file. In this application, the first module and the second module do not save all the required plug-in binary files at the beginning of startup, but obtain the address from the second module based on the plug-in configuration information sent by the subsequent administrator, and dynamically load the plug-in binary file. This method can reduce the startup time of the entire system and reduce the fixed memory usage in the system, ensuring the performance of the computing device.

[0011] On the other hand, based on the method provided in the present application, if the administrator adds new plug-in chain information, both the first module and the auxiliary module can dynamically obtain the plug-in binary file from the file system without the need to restart or reconnect the service, thereby reducing the service processing delay and ensuring user experience.

[0012] In a possible implementation, the first mapping relationship is specifically: a mapping relationship between an operating system type, a plug-in name, and an address of a plug-in binary file, and the first module obtains the address of the plug-in binary file corresponding to the plug-in name from the second module according to the plug-in name in the plug-in chain information, including: the first module obtains the address of the plug-in binary file corresponding to the plug-in name in the first operating system type from the second module according to the first operating system type and the plug-in name corresponding to the first module.

[0013] In the present application, since the operating system type corresponding to each first module is not necessarily the same, the plug-in binary file corresponding to the first module may be different for different operating system types, and the address where it is saved is also different. Based on the solution provided by the present application, the plug-in binary files under each operating system type are respectively saved in the file system, so that the first modules of various operating system types can load the corresponding plug-in binary files.

[0014] In a possible implementation, the first information also includes at least one of the following: the plug-in chain information pre-configured when the auxiliary module is started, the address of the auxiliary module, the version of the auxiliary module, and the operating system type corresponding to the auxiliary module, wherein the auxiliary module is used to assist the first module in providing the function of service grid governance.

[0015] Based on the above technical solution, in this application, the second module can save and record the relevant information of each auxiliary module. When the second module subsequently finds that a plug-in binary has been loaded on a certain auxiliary module, it can directly return the address of the auxiliary module to the first module, thereby speeding up the processing of service messages and ensuring the user experience.

[0016] In a possible implementation, the method also includes: the plug-in configuration information specifically includes a mapping relationship between a service request message and the plug-in chain information, the plug-in chain information also includes a plug-in order, and the method also includes: the first module receives the service request message from the client; the first module determines the plug-in chain information according to the service request message and the plug-in configuration information, and determines the plug-in binary file corresponding to the plug-in chain information in the loaded plug-in binary file; the first module processes the service request message according to the plug-in binary file corresponding to the plug-in chain information and the plug-in order.

[0017] Based on the above scheme, in this application, before the client sends a service request message to the first module, the first module can dynamically obtain the address of the plug-in binary file from the file system according to the configuration of the administrator, and load the plug-in binary file. When the client sends a service request message to the first module later, the plug-in binary file that processes the service request message can be determined from the already loaded plug-in binary files, which can not only ensure the service processing delay and user experience, but also reduce the startup time of the entire system and reduce the fixed memory usage.

[0018] In a possible implementation, the method also includes: the method also includes: the first module determines the occupancy rate of computing resources when processing the service request message at the current moment; if the first module determines that the occupancy rate of the computing resources at the current moment is greater than or equal to the first threshold, sends a first request message to the second module, the first request message carries third information, the third information is used by the second module to determine the plug-in chain information used by the first module at the current moment, the plug-in chain information is used by the second module to allocate one or more auxiliary modules to the first module, wherein the first threshold is less than the second threshold, and the second threshold is the upper limit of the use of the computing resources; the first module receives a first response message from the second module, the first response message carries second information, the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0019] In the present application, "computing resources" can be understood as, for example, CPU resources, or memory resources, or hard disk resources in the first device, or various combinations of the three.

[0020] In the present application, the first threshold value may be understood as a preheating threshold value of the first device. For example, the first threshold value for CPU resources is 60%, the first threshold value for memory is 70%, and the first threshold value for hard disk resources is 80%.

[0021] In the present application, the first threshold is less than the second threshold. The second threshold can be understood as the upper limit of computing resource usage. For example, the upper limit of CPU resource usage of the first device can be predefined as 95%, the upper limit of memory usage of the first device can be predefined as 98%, and the upper limit of hard disk resource usage of the first device can be predefined as 90%.

[0022] In a possible implementation, the method also includes: the method also includes: the first module determines the processing time for processing the service request message at the current moment; if the first module determines that the processing time is greater than or equal to a third threshold, sends a first request message to the second module, the first request message carries third information, the third information is used by the second module to determine the plug-in chain information used by the first module at the current moment, the plug-in chain information is used by the second module to allocate one or more auxiliary modules to the first module, wherein the third threshold is less than a fourth threshold, and the fourth threshold is the upper limit of the processing time; the first module receives a first response message from the second module, the first response message carries second information, the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0023] The "processing time" in this application can be understood as the average processing time for a service request message, for example, the time from when the first module receives a service request message from a client to when the first module sends a service response message to the client.

[0024] In the present application, the third threshold value can be understood as the preheating threshold value of the first module. For example, for a TCP message, if the first module determines that the average processing time for processing a TCP message is greater than or equal to 15 ms, then the first request message is sent to the second module. For example, for an HTTP message, if the first module determines that the average processing time for processing an HTTP message is greater than or equal to 10 ms, then the first request message is sent to the second module.

[0025] In the present application, the third threshold is less than the fourth threshold. The fourth threshold can be understood as the upper limit of the processing time of the first module. For example, for a TCP message, the upper limit of its average processing time can be defined as 25ms. For example, for an HTTP message, the upper limit of its average processing time can be defined as 20ms.

[0026] Based on the above scheme, this application proposes that if the first module determines that the occupancy rate of computing resources when currently processing the service request message is greater than or equal to the preheating threshold, or the processing time of processing the service request message is greater than or equal to the preheating threshold, the second module can be notified to select or preheat an auxiliary module for it. Therefore, the processing delay of the service request message will not be affected by the plug-in loading process. The service delay and user experience can be guaranteed. In addition, in this application, during the preheating process, only the auxiliary sidecar is required to load the plug-in binary files needed at the current moment, rather than all the plug-in binary files configured on the original sidecar, which can improve the utilization of system resources.

[0027] In a possible implementation manner, the third information includes a hash value corresponding to the plug-in chain information.

[0028] Based on the above technical solution, the present application can reduce the amount of network information transmission and save network transmission resources by transmitting hash values.

[0029] In a possible implementation, the method also includes: the first module determines a first auxiliary module among the one or more auxiliary modules based on the second information; the first module establishes a connection with the first auxiliary module; if the first module determines that the occupancy rate of the computing resources at the current moment is greater than or equal to the second threshold, a second request message is sent to the first auxiliary module, the second request message is used to request processing of the service request message, and the second request message carries the hash value, and / or; if the first module determines that the processing time for processing the service request message at the current moment is greater than or equal to the fourth threshold, a second request message is sent to the first auxiliary module, the second request message is used to request processing of the service request message, and the second request message carries the hash value.

[0030] Based on the above technical solution, when the processing limit of the first module is reached, the first module can send a request message to the preheated auxiliary module, requesting to process the service request message from the client. Compared with the prior art, in which the second module immediately (also understood as "temporarily" or "current moment") searches for a suitable auxiliary module for the first module, the processing delay of the business and the user experience can be guaranteed.

[0031] In a possible implementation, the method further includes: if the first module determines that the occupancy rate of the computing resources at the current moment is less than or equal to the second threshold, disconnecting from the first auxiliary module; the first module sends a third request message to the second module, the third request message carries the hash value and the addresses corresponding to the one or more auxiliary modules, the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, and / or; if the first module determines that the processing time of processing the service request message at the current moment is less than or equal to the fourth threshold, disconnecting from the first auxiliary module; the first module sends a third request message to the second module, the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, the third request message carries the hash value and the addresses corresponding to the one or more auxiliary modules. .

[0032] Based on the above technical solution, in this application, when the original sidecar determines that it can process the service request message, the auxiliary sidecar registration center can also recycle the auxiliary sidecar for use by other original sidecars. This can meet the processing capacity of the entire original sidecar while also improving the utilization of computing resources.

[0033] In the second aspect, a method for configuring a plug-in is provided, which can be executed by a second module. The second module can be an auxiliary sidecar registry center, or a process, container, unit, module, device / equipment with an auxiliary sidecar registry center function, or a component (for example, a chip or circuit) with an auxiliary sidecar registry center function module, without limitation.

[0034] It should be noted that the same beneficial effects achieved by the method provided in the second aspect as those achieved by the method provided in the first aspect will not be described repeatedly, and can be understood by referring to the relevant beneficial effects of the first aspect.

[0035] The method includes: a second module determines a first mapping relationship, the first mapping relationship is a mapping relationship between a plug-in name and an address of a plug-in binary file; the second module receives an address request message from the first module, the address request message carries the plug-in name, and the address request message is used to request the address of the plug-in binary file corresponding to the plug-in name, wherein the first module is used to provide a service grid governance function; the second module determines the address of the plug-in binary file corresponding to the plug-in name according to the first mapping relationship; the second module sends an address response message to the first module, and the address response message carries the address of the plug-in binary file.

[0036] In a possible implementation, the second module determines the first mapping relationship including: the second module obtains the plug-in name and the plug-in binary file; the second module saves the plug-in binary file to the file system and determines the address of the plug-in binary; the second module determines the first mapping relationship according to the plug-in name and the address of the plug-in binary.

[0037] In a possible implementation, the first mapping relationship is specifically: a mapping relationship between an operating system type, a plug-in name, and an address of a plug-in binary file, the address request message also carries the first operating system type corresponding to the first module, and the address response message carries the address of the plug-in binary file corresponding to the plug-in name in the first operating system type.

[0038] In a possible implementation, the method also includes: the second module receives a registration message from the auxiliary module, the registration message carries at least one of the following: plug-in chain information pre-configured by the auxiliary module at startup, the address of the auxiliary module, the version of the auxiliary module, and the operating system type corresponding to the auxiliary module, wherein the plug-in chain information includes the plug-in name and plug-in order, and the auxiliary module is used to assist the first module in providing the function of service grid governance; the second module saves the content in the registration message.

[0039] In a possible implementation, the first module is an original sidecar, the second module is an auxiliary sidecar registration center, and the auxiliary module is an auxiliary sidecar.

[0040] In a possible implementation, the method also includes: the second module receives a first request message from the first module, the first request message carries third information, and the third information is used by the second module to determine the plug-in chain information currently used by the first module; the second module allocates one or more auxiliary modules to the first module according to the plug-in chain information; the second module sends a first response message to the first module, the first response message carries second information, and the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0041] In a possible implementation manner, the third information includes a hash value corresponding to the plug-in chain information.

[0042] In a possible implementation, the second module determines one or more auxiliary modules to be allocated to the first module according to the plug-in chain information, including: the second module determines whether an auxiliary module has loaded a plug-in binary file corresponding to the plug-in chain information into a memory of a third device according to the registration message and the plug-in chain information, wherein the third device includes the auxiliary module; when the second module determines that no auxiliary module has loaded the plug-in binary file corresponding to the plug-in chain information, the second module determines one or more auxiliary modules; the second module sends a preheating request message to the one or more auxiliary modules, the preheating request message carries an address of a plug-in binary file corresponding to the plug-in name in the plug-in chain information, and the preheating request message is used to instruct the one or more auxiliary modules to load the plug-in binary file into the memory of the third device according to the address of the plug-in binary file; the second module receives a preheating response message from the one or more auxiliary modules, the preheating response message is used to indicate that the one or more auxiliary modules have loaded the plug-in binary file; the second module determines to allocate the one or more auxiliary modules to the first module according to the preheating response message.

[0043] In a possible implementation, the method also includes: the method also includes: the second module receives a third request message from the first module, the third request message carries the hash value and the addresses corresponding to the one or more auxiliary modules, and the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules; the second module reclaims the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules according to the third request message.

[0044] On the third aspect, a method for configuring a plug-in is provided, which can be executed by an auxiliary module, wherein the auxiliary module is a process, container, unit, module, device / equipment with an auxiliary sidecar function, or the auxiliary module can also be a component (for example, a chip or circuit) of a module with an auxiliary sidecar function, without limitation.

[0045] The method includes: the auxiliary module sends a registration message to the second module, and the registration message carries at least one of the following: plug-in chain information pre-configured when the auxiliary module is started, the address of the auxiliary module, the version of the auxiliary module, and the operating system type corresponding to the auxiliary module, wherein the plug-in chain information includes the plug-in name and the plug-in order.

[0046] Based on the above technical solution, there are only a small number of pre-configured plug-ins on the auxiliary module, so the auxiliary module needs to report its own information to the second module, and the auxiliary module registration center records it so that when the processing capacity of the first module is saturated, the second module can determine which auxiliary modules should be allocated to the first module. For example, if the second module finds that a plug-in binary has been loaded on an auxiliary module, it can directly return the address of the auxiliary module to the first module, thereby speeding up the processing of service messages and ensuring the user experience.

[0047] In a fourth aspect, a computing device (which may also be described alternatively as a "computing device") is provided, which is used to execute the method in any possible implementation of any aspect of the first aspect. Specifically, the device may include a unit and / or module, such as a transceiver unit and / or a processing unit, for executing the method in any possible implementation of the first aspect.

[0048] In one implementation, the apparatus is a computing device including an original sidecar module. When the apparatus is a computing device, the communication unit may be a transceiver, or an input / output interface; the processing unit may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.

[0049] In another implementation, the device is a chip, chip system or circuit of a computing device that can implement the original sidecar function. When the device is a chip, chip system or circuit for the original sidecar function, the communication unit may be an input / output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit; the processing unit may be at least one processor, processing circuit or logic circuit.

[0050] In a fifth aspect, a computing device is provided, the device being used to execute the method in any possible implementation of any aspect of the second aspect. Specifically, the device may include a unit and / or module, such as a transceiver unit and / or a processing unit, for executing the method in any possible implementation of the second aspect.

[0051] In one implementation, the apparatus is a computing device including an auxiliary sidecar registration center module. When the apparatus is a computing device, the communication unit may be a transceiver, or an input / output interface; the processing unit may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.

[0052] In another implementation, the device is a chip, chip system or circuit of a computing device that can implement the auxiliary sidecar registration center function. When the device is a chip, chip system or circuit for assisting the sidecar registration center function, the communication unit can be an input / output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit; the processing unit can be at least one processor, processing circuit or logic circuit.

[0053] In a sixth aspect, a computing device is provided, the device being used to execute the method in any possible implementation of any aspect of the third aspect. Specifically, the device may include a unit and / or module, such as a transceiver unit and / or a processing unit, for executing the method in any possible implementation of the third aspect.

[0054] In one implementation, the apparatus is a computing device including an auxiliary sidecar module. When the apparatus is a computing device, the communication unit may be a transceiver, or an input / output interface; the processing unit may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.

[0055] In another implementation, the device is a chip, chip system or circuit of a computing device that can implement the auxiliary sidecar function. When the device is a chip, chip system or circuit for assisting the sidecar function, the communication unit can be an input / output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit; the processing unit can be at least one processor, processing circuit or logic circuit.

[0056] In a seventh aspect, a computing device is provided, the device comprising: at least one processor, configured to execute a computer program or instruction stored in a memory, so as to execute the method in any possible implementation of any one of the first to third aspects above. Optionally, the device further comprises a memory, configured to store a computer program or instruction. Optionally, the device further comprises a communication interface, and the processor reads the computer program or instruction stored in the memory through the communication interface.

[0057] In one implementation, the apparatus is a computing device including an original sidecar module.

[0058] In another implementation, the device is a chip, chip system or circuit having original sidecar functionality.

[0059] In one implementation, the apparatus is a computing device including an auxiliary sidecar registration center module.

[0060] In another implementation, the device is a chip, chip system or circuit with auxiliary sidecar registration center function.

[0061] In one implementation, the apparatus is a computing device including an auxiliary sidecar module.

[0062] In another implementation, the device is a chip, a chip system or a circuit with auxiliary sidecar function.

[0063] In an eighth aspect, the present application provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of any one of the first to third aspects.

[0064] In the specific implementation process, the above-mentioned processor can be one or more chips, the input circuit can be an input port, the output circuit can be an output port, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a transceiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0065] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or unless they conflict with their actual function or internal logic in the relevant description, they can be understood as operations such as processor output, reception, input, etc., or as sending and receiving operations performed by the radio frequency circuit and antenna, and this application does not limit this.

[0066] In a ninth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter to execute the method in any possible implementation of any aspect from the first aspect to the third aspect.

[0067] Optionally, the number of the processors is one or more, and the number of the memories is one or more.

[0068] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0069] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0070] It should be understood that the related data interaction process, such as sending indication information, can be a process of outputting indication information from the processor, and receiving capability information can be a process of receiving input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Among them, the transmitter and the transceiver can be collectively referred to as a transceiver.

[0071] The processing device in the ninth aspect may be one or more chips. The processor in the processing device may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.

[0072] In the tenth aspect, a communication system is provided, which includes an original sidecar node, an auxiliary sidecar registration center, and an auxiliary sidecar, wherein each original sidecar in the original sidecar node is used to execute the method in any possible implementation of the first aspect, the auxiliary sidecar registration center is used to execute the method in any possible implementation of the second aspect, and the auxiliary sidecar is used to execute the method in any possible implementation of the third aspect.

[0073] In an eleventh aspect, a computer-readable storage medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing any possible implementation of any one of the first to third aspects above.

[0074] In a twelfth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute a method in any possible implementation of any one of the first to third aspects above.

[0075] In the thirteenth aspect, a chip system is provided, comprising a processor for calling and running a computer program from a memory, so that a device equipped with the chip system executes the methods in each implementation manner in any one of the first to third aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 This is a schematic diagram of a sidecar mode provided by this application.

[0077] Figure 2 It is a schematic flow chart of a method 200 for configuring a plug-in provided by the present application.

[0078] Figure 3 It is a schematic flow chart of a method 300 for configuring a plug-in provided by the present application.

[0079] Figure 4 It is a schematic block diagram of a computing device 100 provided in the present application.

[0080] Figure 5 It is a schematic block diagram of a computing device cluster provided by the present application.

[0081] Figure 6 It is a schematic block diagram of another computing device cluster provided by the present application. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0083] The service mesh technology in computers separates the non-functional service governance logic in the distributed applications of the microservice architecture from the business process, and can be governed by the service proxy node. The following takes the "sidecar" mode in the service proxy as an example to introduce it. Sidecar provides connection, security, flow control, gray release, and observation capabilities between services in a non-invasive way, realizing business lightweight and service governance infrastructure. Usually, the sidecar and the main application are placed on the same host, but they are deployed in their own processes or containers, such as Figure 1 shown.

[0084] The existing node-level sidecar can be further divided into the resident part in the node (hereinafter referred to as the "original sidecar node") and the remote auxiliary part (hereinafter referred to as the "auxiliary sidecar node"). The original sidecar node can include complete layer 4 (layer 4, L4) and L7 data processing capabilities, where L4 is used for processing at the transmission control protocol (TCP) connection level and L7 is used for processing at the application message level. Because processing application messages requires higher computing power and memory consumption. Therefore, when the processing capacity of the original sidecar node reaches a certain limit, it is necessary to move the L7 processing of subsequent requests to the auxiliary sidecar node so that the auxiliary sidecar node can continue to process the application message. Usually, the original sidecar node and the auxiliary sidecar node can be connected through a high-speed network. For example, the original sidecar node and the auxiliary sidecar node can communicate using remote direct memory access (RDMA) technology.

[0085] For the sidecar nodes in the service proxy, both the original sidecar nodes and the auxiliary sidecar nodes have their plug-in configurations in a "static compilation" mode. "Static compilation" can be understood as compiling all the plug-in binary files that need to be used into the executable file in advance. When the executable file is started, all the plug-in binary files are loaded. At this time, when each auxiliary sidecar node is started, it is necessary to load all the compiled plug-in binary files according to the plug-in configuration. The loading speed is slow, and it will also occupy a large amount of memory resources in the computer, affecting the performance of the computing device. On the other hand, for the "static compilation" method, if a new plug-in binary file is added, the previously compiled plug-in binary file needs to be replaced and restarted, which will cause the business to reconnect, affecting the business delay and user experience. Therefore, how to improve the flexibility of plug-in configuration in the service proxy has become a technical problem that needs to be solved at present.

[0086] In view of this, in this application, by dynamically loading the plug-in binary, the entire system startup time can be reduced and the fixed memory usage can be reduced, thereby improving the performance of the computing device.

[0087] Figure 2 is a schematic flow chart of a method 200 for configuring a plug-in provided by the present application, the method comprising:

[0088] Step 201: The second module obtains the plug-in name and the plug-in binary file.

[0089] For example, the auxiliary sidecar registry can receive the plug-in name and plug-in binary file uploaded by the administrator. The "administrator" in this application can be understood as the developer of the service grid governance system, for example, the developer of the sidecar system.

[0090] The "plug-in binary file" in this application can also be described as a "binary file" instead. The "binary file" can be understood as an application program of a certain plug-in.

[0091] Step 202: The second module saves the plug-in binary file to the file system and determines the address of the plug-in binary file.

[0092] In this application, the auxiliary sidecar registration center can save the plug-in binary file uploaded by the administrator to a certain server and determine the specific address where the plug-in binary file is saved. For example, the auxiliary sidecar registration center can determine the address of the server where the plug-in binary file is saved, the plug-in name, and the save path of the plug-in binary file, and uniquely determine the address of the plug-in binary file through these three pieces of information. For example, the plug-in binary file corresponding to plug-in #B is saved in the #AAA file of the D disk on server #A.

[0093] Step 203: The second module determines a first mapping relationship, where the first mapping relationship is a mapping relationship between a plug-in name and an address of a plug-in binary file.

[0094] For example, the auxiliary sidecar registration center can determine the first mapping relationship according to the plug-in name and the address of the plug-in binary file.

[0095] It should be noted that the present application does not limit the specific implementation method of the auxiliary sidecar registration center determining the first mapping relationship, and step 201 and step 202 are a possible implementation method.

[0096] Exemplarily, the first mapping relationship includes: plug-in #A—address #1, plug-in #B—address #2, plug-in #C—address #3, plug-in #D—address #4, as shown in Table 1 below.

[0097] Table 1

[0098] Plugin Name The address of the plugin binary Plugin#A Address #1 Plugin #B Address #2 Plugin#C Address #3 Plugin#D Address #4

[0099] In a possible implementation manner, the first mapping relationship is specifically: a mapping relationship between an operating system type, a plug-in name, and an address of a plug-in binary file.

[0100] Exemplarily, the first mapping relationship includes: plug-in #A—operating system type #1—address #1, plug-in #A—operating system type #2—address #11, plug-in #A—operating system type #3—address #21; plug-in #B—operating system type #1—address #2, plug-in #B—operating system type #2—address #12, plug-in #B—operating system type #3—address #22, as shown in Table 2 below.

[0101] Table 2

[0102] Operating system type Plugin Name The address of the plugin binary Operating System Type #1 Plugin#A Address #1 Operating System Type #2 Plugin#A Address #11 Operating System Type #3 Plugin#A Address #21 Operating System Type #1 Plugin #B Address #2 Operating System Type #2 Plugin #B Address #12 Operating System Type #3 Plugin #B Address #22

[0103] Alternatively, the "mapping relationship" in this article can also be expressed as an "association relationship" or a "correspondence relationship". It should be understood that the "mapping relationship" in the embodiments of the present application can be saved or recorded in the form of a functional relationship, a table, etc. In the following embodiments, the "mapping relationship" mentioned can be pre-configured by an administrator, or can be pre-defined, etc., without limitation.

[0104] In a possible implementation, the auxiliary sidecar registration center can also receive a registration message from the auxiliary sidecar, which carries at least one of the following: plug-in chain information pre-configured at startup of each auxiliary sidecar in the auxiliary sidecar node, the address of each auxiliary sidecar, the version of each auxiliary sidecar, and the operating system type corresponding to each auxiliary sidecar; the auxiliary sidecar registration center saves the content in the registration message.

[0105] For example, some frequently used plug-in chains can be pre-configured on the auxiliary sidecar when the auxiliary sidecar is started.

[0106] In this application, the address of the auxiliary sidecar can be understood as an Internet protocol address; the version of the auxiliary sidecar can be understood as the mirror version of the sidecar; the operating system type corresponding to the auxiliary sidecar can be understood as Windows system, Linux system, and so on.

[0107] Compared with the prior art, in which the auxiliary sidecar registration center saves all the plug-in chain information configured on each auxiliary sidecar from the beginning, in this application, there are only a small number of pre-configured plug-in chains on the auxiliary sidecar, so the auxiliary sidecar needs to report its own information to the auxiliary sidecar registration center, and the auxiliary sidecar registration center records it so that when the processing capacity of the original sidecar is saturated later, the auxiliary sidecar registration center can determine which auxiliary sidecars should be assigned to the original sidecar. For example, if the auxiliary sidecar registration center finds that a plug-in chain has been loaded on an auxiliary sidecar, it can directly return the address of the auxiliary sidecar to the original sidecar, thereby speeding up the processing of service messages and ensuring the user experience.

[0108] Step 204: The first module receives plug-in configuration information, where the plug-in configuration information includes plug-in chain information.

[0109] For example, the original sidecar can receive plugin configuration information from an administrator.

[0110] It should be noted that, in the present application, the original sidecar may be one of the original sidecar nodes, for example, the original sidecar node includes several original sidecars. Similarly, the auxiliary sidecar may be one of the auxiliary sidecar nodes, for example, the auxiliary sidecar node includes several auxiliary sidecars.

[0111] In the present application, "plugin chain information" includes the plug-in name, plug-in order, and the configuration of each plug-in. In the present application, each plug-in chain information may include a plug-in chain. For example, plug-in chain information #1 includes plug-in chain #1, wherein plug-in chain #1 is "plug-in #A—plug-in #B—plug-in #C". For another example, plug-in chain information #2 includes plug-in chain #2, wherein plug-in chain #2 is "plug-in #A—plug-in #B—plug-in #D". For another example, plug-in chain information #3 includes plug-in chain #3, wherein plug-in chain #3 is "plug-in #B—plug-in #C—plug-in #D". Assume that plug-in #A is a traffic restriction plug-in, plug-in #B is a plug-in that authenticates access based on a service request message, plug-in #C is a grayscale release plug-in, and plug-in #D is a routing plug-in. For example, plug-in #A can be understood as the name of the plug-in, and "plug-in #A—plug-in #B—plug-in #C" can be understood as the plug-in order. Assuming that "plugin #C" is a grayscale release plug-in, the configuration of plug-in #C may be a configuration of grayscale release information to which the version information carried in the service request message should be directed.

[0112] In a possible implementation, the plug-in configuration information includes a mapping relationship between a service request message and plug-in chain information. The "service request message" in this application can be, for example, a TCP message, a hypertext transfer protocol (HTTP) message, a file transfer protocol (FTP) message, etc., without limitation.

[0113] Exemplarily, the plug-in configuration information may include a mapping relationship between a service request message and plug-in chain information, or may include mapping relationships between multiple service request messages and plug-in chain information. For example, the plug-in configuration information may include multiple mapping relationships: a mapping relationship between a TCP message and plug-in chain information #1, a mapping relationship between an HTTP message and plug-in chain information #2, and a mapping relationship between an FTP message and plug-in chain information #3, as shown in Table 3 below.

[0114] Table 3

[0115] Service Request Message Plugin chain information TCP Messages Plugin chain information #1 HTTP Messages Plugin Chain Information #2 FTP Message Plugin Chain Information #3

[0116] Step 205: The first module obtains the address of the plug-in binary file corresponding to the plug-in name from the second module according to the plug-in name in the plug-in chain information.

[0117] For example, the original sidecar can determine that the plug-in chain information to be configured includes: plug-in chain information #1, plug-in chain information #2, and plug-in chain information #3 according to the configuration information. For example, the original sidecar determines that the plug-in names to be configured include: plug-in #A, plug-in #B, plug-in #C, and plug-in #D according to the three plug-in chain information.

[0118] In one possible implementation, the original sidecar sends an address request message to the auxiliary sidecar registration center, where the address request message carries the plug-in name, and the address request message is used to request the address of the plug-in binary file corresponding to the plug-in name; the auxiliary sidecar registration center receives the address request message from the original sidecar, and determines the address of the plug-in binary file corresponding to the plug-in name according to the first mapping relationship, and the auxiliary sidecar registration center sends an address response message to the original sidecar, where the address response message carries the address of the plug-in binary file; the original sidecar receives the address response message from the auxiliary sidecar registration center, and determines the address of the plug-in binary file corresponding to the plug-in name.

[0119] In another possible implementation, the address request message also carries the first operating system type corresponding to the original sidecar, and the address response message carries the address of the plug-in binary file corresponding to the plug-in name in the first operating system type. For example, assuming that the operating system type of the original sidecar is operating system type #2 and the plug-in name is plug-in #A, then according to Table 2, it can be determined that the address of the plug-in binary file corresponding to plug-in #A is address #11.

[0120] Step 206: The first module obtains the plug-in binary file according to the address of the plug-in binary file, and loads the plug-in binary file into the memory of the first device.

[0121] In the present application, the first device includes a first module.

[0122] Specifically, the original sidecar can obtain the plug-in binary file from the server according to the address of the plug-in binary file, and load the plug-in binary file corresponding to each plug-in name in sequence according to the plug-in order. For example, the plug-in binary file corresponding to plug-in #A is saved in the #AAA file of the C drive on server #A, and is loaded into the memory of the first device according to the address of the plug-in binary file.

[0123] Based on the method for configuring plug-ins provided in this application, since the mapping relationship between the plug-in name and the address of the plug-in binary file is saved in the auxiliary sidecar registration center, the original sidecar can obtain the plug-in name according to the plug-in configuration information sent by the administrator, and obtain the address of the plug-in binary from the registration center according to the plug-in name, thereby dynamically loading the plug-in binary file. In this application, the original sidecar and the auxiliary sidecar do not obtain all the required plug-in binary files at the beginning of startup, but obtain the address of the plug-in binary file from the auxiliary sidecar registration center based on the plug-in configuration information subsequently sent by the administrator, and dynamically load the plug-in binary file. This method can reduce the startup time of the entire system and reduce the fixed memory usage in the system, thereby ensuring the performance of the computing device.

[0124] On the other hand, based on the method provided in this application, if the administrator adds new plug-in chain information, both the original sidecar and the auxiliary sidecar can dynamically obtain the plug-in binary file from the file system without restarting or reconnecting the business, which can reduce the business processing delay and ensure user experience.

[0125] As mentioned above, the original sidecar has complete L4 and L7 processing capabilities, so the original sidecar is capable of processing client service requests. However, as the number of client service request messages increases, it may exceed the processing capacity of the original sidecar. At this time, how to process it to ensure the processing delay of the business and the user experience is also a problem that needs to be considered.

[0126] To address this issue, Figure 3 This is a schematic flow chart of a method 300 for configuring a plug-in provided by the present application. In the method 300, the first module is exemplified by the original sidecar, the second module is exemplified by the auxiliary sidecar registration center, and the auxiliary module is exemplified by the auxiliary sidecar. The method 300 can be combined with the above method 200, and the method includes:

[0127] Step 301: The original sidecar receives a service request message from the client.

[0128] For example, the original sidecar received 50 TCP messages from the client.

[0129] In step 302, the original sidecar determines the plug-in chain information according to the service request message and the plug-in configuration information, and determines the plug-in binary file corresponding to the plug-in chain information in the loaded plug-in binary file.

[0130] For example, the original sidecar can determine, based on Table 3, that the TCP message should be processed using plugin chain #1 in plugin chain information #1.

[0131] Step 303: The original sidecar processes the service request message according to the plug-in binary file and plug-in sequence corresponding to the plug-in chain information.

[0132] For example, the original sidecar determines that the TCP message should be processed using plugin chain information #1. Assume that plugin chain information #1 includes plugin chain #1, where plugin chain #1 is "plugin #A-plugin #B-plugin #C", and plugin #A is a traffic restriction plugin, plugin #B is a plugin that authenticates access based on service request messages, and plugin #C is a grayscale release plugin. Since plugin #A, plugin #B, and plugin #C have been loaded on the original sidecar, at this time, the original sidecar only needs to process the service request message in the order of plugins, plugin #A, plugin #B, and plugin #C.

[0133] This embodiment proposes that for the service request message from the client, the original sidecar can first process it, and determine whether the preheating threshold is reached based on some policies. If the preheating threshold is reached, the auxiliary sidecar registration center will be notified to select an auxiliary sidecar or preheat a suitable auxiliary sidecar, so that when the processing capacity of the original sidecar is exceeded in the future, the client's service request message can be forwarded to the preheated auxiliary sidecar in time, so that the auxiliary sidecar can help the original sidecar process the client's service request message, thereby reducing business processing delays and ensuring user experience.

[0134] For example, the original sidecar may comprehensively consider whether it is necessary to notify the auxiliary sidecar to select or preheat the auxiliary sidecar during registration based on the following two strategies.

[0135] Strategy 1:

[0136] Step 304: If the original sidecar determines that the occupancy rate of the computing resources at the current moment is greater than or equal to the first threshold, a first request message is sent to the auxiliary sidecar registration center.

[0137] Correspondingly, the auxiliary sidecar registration center receives the first request message.

[0138] In one possible implementation, the original sidecar may first determine the occupancy rate of computing resources when processing the service request message at the current moment.

[0139] In this application, "computing resources" can be understood as, for example, CPU resources, memory resources, hard disk resources, or various combinations of the three in the first computing device to which the original sidecar belongs.

[0140] In this application, the first threshold can be understood as the preheating threshold of the original sidecar. For example, the first threshold for CPU resources is 60%, the first threshold for memory is 70%, and the first threshold for hard disk resources is 80%.

[0141] In the present application, the first threshold is less than the second threshold. The second threshold can be understood as the upper limit of the use of computing resources in the first computing device. For example, the upper limit of the use of CPU resources of the first computing device can be predefined as 95%, the upper limit of memory use as 98%, and the upper limit of hard disk resource use as 90%.

[0142] Strategy 2:

[0143] Step 305: If the original sidecar determines that the processing time is greater than or equal to the third threshold, a first request message is sent to the auxiliary sidecar registration center.

[0144] Correspondingly, the auxiliary sidecar registration center receives the first request message.

[0145] In a possible implementation, the original sidecar may first determine the processing time for processing the service request message at the current moment.

[0146] The "processing time" in this application can be understood as the average processing time for a service request message. For example, the time required from the original sidecar receiving the service request message from the client to the original sidecar sending the service response message to the client.

[0147] In this application, the third threshold can be understood as the preheating threshold of the original sidecar. For example, when the original sidecar determines that the average processing time for processing TCP messages is greater than or equal to 15ms, a first request message is sent to the auxiliary sidecar registration center. For another example, if the original sidecar determines that the average processing time for processing HHTP messages is greater than or equal to 10ms, a first request message is sent to the auxiliary sidecar registration center.

[0148] In this application, the third threshold is less than the fourth threshold. The fourth threshold can be understood as the upper limit of the original sidecar processing time. For example, for TCP messages, the upper limit of the average processing time can be predefined as 25ms. For example, for HTTP messages, the upper limit of the average processing time can be predefined as 20ms, and so on.

[0149] In the present application, the original sidecar can also combine strategy 1 and strategy 2 to comprehensively determine whether it is necessary to send a first request message to the auxiliary sidecar registration center.

[0150] Optionally, the present application may also include other strategies, for example, by determining the end-to-end latency, determining whether it is necessary to notify the auxiliary sidecar registration center to select or preheat the auxiliary sidecar.

[0151] In one possible implementation, the first request message carries third information, and the third information is used to determine the plug-in chain information currently used by the original sidecar. For example, the third information is the plug-in chain information currently used by the original sidecar. For another example, the third information is a hash value of the plug-in chain information currently used by the original sidecar. In this application, the amount of network information transmission can be reduced by transmitting hash values, saving network transmission resources.

[0152] Step 306: The auxiliary sidecar registration center allocates one or more auxiliary sidecars to the original sidecar according to the first request message.

[0153] For example, the auxiliary sidecar registry can assign one or more auxiliary sidecars to the original sidecar based on the plugin chain information.

[0154] In one possible implementation, the first request message carries a hash value of the plug-in chain information. At this time, if the auxiliary sidecar registration center finds that the mapping relationship between the hash value and the plug-in chain information is not saved locally, it is necessary to request the complete plug-in chain information from the original sidecar and record the mapping relationship between the hash value and the plug-in chain information, so that when the original sidecar sends the same hash value again later, the corresponding plug-in chain information can be quickly found.

[0155] For example, the first request message carries the hash value #1 of the plugin chain information #1. If the auxiliary sidecar registration center determines that there is no local record of hash value #1, it requests the complete plugin chain information #1 from the original sidecar node and saves the mapping relationship between hash value #1 and plugin chain information #1.

[0156] Specifically, after the auxiliary sidecar registration center obtains that the plug-in chain information currently used by the original sidecar is plug-in chain information #1, it can further determine whether an auxiliary sidecar is already configured with the plug-in chain information #1 in the auxiliary sidecar node based on the registration message and plug-in chain information #1.

[0157] If the auxiliary sidecar registration center determines that auxiliary sidecar #1 and auxiliary sidecar #2 have loaded the plug-in binary file corresponding to the plug-in chain information #1 at startup, the following step 307 is executed.

[0158] If the auxiliary sidecar registration center determines that there is no auxiliary sidecar in the auxiliary sidecar node to load the plug-in binary file corresponding to the plug-in chain information #1, the auxiliary sidecar registration center can determine one or more auxiliary sidecars in the auxiliary sidecar node. For example, the auxiliary sidecar registration center can determine three auxiliary sidecars based on the current load of each auxiliary sidecar, namely auxiliary sidecar#4, auxiliary sidecar#6, and auxiliary sidecar#8. At this time, the auxiliary sidecar registration center can send a preheating request message to auxiliary sidecar#4, auxiliary sidecar#6, and auxiliary sidecar#8 respectively. The preheating request message carries the address of the plug-in binary file corresponding to the plug-in name in the plug-in chain information. The preheating request message is used to instruct auxiliary sidecar#4, auxiliary sidecar#6, and auxiliary sidecar#8 to load the plug-in binary file into the memory of their respective corresponding devices according to the address of the plug-in binary file. After auxiliary sidecar#4, auxiliary sidecar#6, and auxiliary sidecar#8 complete loading the corresponding plug-in binary file, they can send a preheating response message to the auxiliary sidecar registration respectively, and the preheating response message is used to indicate that the plug-in binary file has been loaded. At this time, the auxiliary sidecar registration center determines to allocate one or more auxiliary sidecars to the original sidecar based on the preheat response message.

[0159] Optionally, in the present application, after the auxiliary sidecar registration center determines to allocate one or more auxiliary sidecars to the original sidecar, it will further determine the priorities of these auxiliary sidecars so that the original sidecar can subsequently selectively determine which auxiliary sidecar to establish a connection with.

[0160] For example, if the auxiliary sidecar registry determines that the auxiliary sidecar#1 has loaded the plug-in binary file corresponding to the plug-in chain information #1, but the auxiliary sidecar#1 has already provided services for several original sidecars, the priority of the auxiliary sidecar#1 will be reduced when sending the first response information to the original sidecar. For example, before this, the original sidecar#2, original sidecar#3, and original sidecar#4 all requested the auxiliary sidecar registry to assign them the auxiliary sidecar about the plug-in chain information #1 to help them process the TCP message from the client. At this time, the auxiliary sidecar registry determines that the auxiliary sidecar#1 has provided assistance to the three original sidecars about the plug-in chain #1, and has reached its processing limit, so the priority of the auxiliary sidecar#1 will be reduced. On the contrary, if the auxiliary sidecar registry determines that the plug-in binary file corresponding to the plug-in chain information #1 is loaded on the auxiliary sidecar#2, and before this, the auxiliary sidecar#2 has not provided assistance to any original sidecar, at this time, the priority of the auxiliary sidecar#2 will be the highest.

[0161] Step 307: The auxiliary sidecar registration center sends a first response message to the original sidecar.

[0162] Correspondingly, the original sidecar receives the first response message.

[0163] In the present application, the first response message carries the second information, and the second information includes: the priority of one or more auxiliary sidecars, and the corresponding address of one or more auxiliary sidecars.

[0164] As described in step 306, the auxiliary sidecar registration center determines the priority and corresponding IP address of one or more auxiliary sidecars assigned to the original sidecar, and sends it to the original sidecar. Exemplarily, the first response message may carry a list, which may reflect the priority and IP address corresponding to one or more auxiliary sidecars. As shown in Table 4 below, the IP address of auxiliary sidecar#2 is IP address #20, which has the highest priority; the IP address of auxiliary sidecar#3 is IP address #30, which has the second highest priority; the IP address of auxiliary sidecar#1 is IP address #10, which has the lowest priority. In another implementation, the priority of the auxiliary sidecar can be directly reflected by the order of the list, and there is no need to additionally indicate its corresponding priority information.

[0165] Table 4

[0166] The name of the auxiliary sidecar The address of the auxiliary sidecar Priority of auxiliary sidecar Auxiliary sidecar #2 IP address #20 Priority #1 Auxiliary sidecar #3 IP Address #30 Priority #2 Auxiliary sidecar #1 IP Address #10 Priority #3

[0167] Step 308: The original sidecar determines a first auxiliary sidecar from one or more auxiliary sidecars according to the second information.

[0168] For example, the original sidecar may select the auxiliary sidecar #2 with the highest priority as the first auxiliary sidecar according to Table 4.

[0169] Step 309: The original sidecar establishes a connection with the first auxiliary sidecar.

[0170] For example, the original sidecar can establish a connection with the auxiliary sidecar#2 through RDMA technology. The specific connection process will not be described in detail. Please refer to RDMA technology. Further, if the auxiliary sidecar#2 also reaches the processing limit of TCP messages, the original sidecar can choose to continue to establish a connection with the auxiliary sidecar#3 according to Table 4, so that sidecar#3 can also provide it with assistance about plug-in chain information#1.

[0171] Step 310: If the original sidecar determines that the occupancy rate of computing resources at the current moment is greater than or equal to the second threshold, and / or if the original sidecar determines that the processing time for processing the service request message at the current moment is greater than or equal to the fourth threshold, a second request message is sent to the first auxiliary sidecar.

[0172] Correspondingly, the first auxiliary sidecar receives the second request message.

[0173] In the present application, the second request message is used to request processing of a service request message from the client, and the second request message carries a hash value. Exemplarily, the second request message may carry a TCP message from the client and a hash value #1 corresponding to plugin chain information #1.

[0174] The above step 310 can also be understood as, if the original sidecar determines that it has reached its limit of processing service request messages, it can send a second request message to one of the auxiliary sidecars to request processing of the service request message from the client, and request it to help process the service request message from the client. As mentioned above, the original sidecar can be comprehensively evaluated based on multiple policies to determine whether it has reached its processing limit.

[0175] For example, if the original sidecar still needs the assistance of the auxiliary sidecar related to the plug-in chain information #1, and the auxiliary sidecar registry is abnormally disconnected, then when the auxiliary sidecar registry is requested to allocate an auxiliary sidecar for it and no response is received, since the original sidecar locally saves one or more auxiliary sidecars previously allocated to it by the auxiliary sidecar registry (for example, Table 4), the original sidecar can also directly send a second request message to an auxiliary sidecar in Table 4 to request processing of the service request message from the client.

[0176] Step 311: The first auxiliary sidecar determines, based on the second request message, to use the loaded plug-in binary file to process the service request message.

[0177] Among them, the first auxiliary sidecar can determine the plug-in chain information according to the hash value carried by the second request message, and then determine that the plug-in chain corresponding to the plug-in chain information should be used to process the service message.

[0178] In this application, the correspondence between the hash value and the plug-in chain information is also recorded on each auxiliary sidecar in the auxiliary sidecar node, so that whether communicating with the auxiliary sidecar registration center or the original sidecar, only the hash value corresponding to the plug-in chain information can be transmitted, thereby reducing network transmission volume and saving network resources.

[0179] Step 312: If the original sidecar determines that the occupancy rate of computing resources at the current moment is less than or equal to the second threshold, and / or if the original sidecar determines that the processing time for processing the service request message at the current moment is less than or equal to the fourth threshold, disconnect from the first auxiliary sidecar.

[0180] For example, if the original sidecar determines that the CPU resource occupancy rate is 70%, or the memory occupancy rate is 60%, or the disk resource occupancy rate is 75%, the connection with the first auxiliary sidecar can be disconnected.

[0181] For another example, if the original sidecar determines that the processing time of a TCP message is 20ms, or the processing time of an HTTP message is 15ms, the connection with the first auxiliary sidecar can be disconnected.

[0182] Step 313: The original sidecar sends a third request message to the auxiliary sidecar registration center.

[0183] Correspondingly, the auxiliary sidecar registration center sends a third request message.

[0184] In the present application, the third request message carries a hash value and the addresses corresponding to one or more auxiliary sidecars. The third request message is used to request the auxiliary sidecar registration center to reclaim the resources of the plug-in chain information corresponding to the hash value on one or more auxiliary sidecars.

[0185] In the present application, if the original sidecar determines that it can fully process the service request message based on the current resource occupancy or processing time, it can disconnect from the auxiliary sidecar (for example, auxiliary sidecar #2) and notify the auxiliary sidecar registration center that the resources of the plug-in chain information corresponding to the hash value on one or more auxiliary sidecars previously allocated to it can be reclaimed.

[0186] "Recycling" in this application can be understood as the original sidecar requesting the auxiliary sidecar registration center to update the record of the plug-in chain information corresponding to the hash value on one or more auxiliary sidecars assigned to it, or requesting to delete the record of the plug-in chain information corresponding to the hash value on one or more assigned auxiliary sidecars, or requesting the auxiliary sidecar registration center to release the memory of the plug-in chain information corresponding to the hash value on one or more auxiliary sidecars.

[0187] It should be noted that in this application, the auxiliary sidecar registration center can periodically count the status of the plug-in binaries loaded on each auxiliary sidecar. For example, which plug-in binary files are loaded on each auxiliary sidecar, which plug-in chains are loaded, which original sidecar requests each auxiliary sidecar is currently assisting, whether the auxiliary sidecar is still connected to a certain original sidecar, or the auxiliary sidecar has been disconnected from a certain original sidecar, etc. This information can help the auxiliary sidecar provide reference when it receives requests from other original sidecars and assigns auxiliary sidecars to them.

[0188] Specifically, in this application, the auxiliary sidecar registration center can record the plug-in chain information on each auxiliary sidecar. For example, the auxiliary sidecar registration center can record: auxiliary sidecar#1 has loaded plug-in chain#1, plug-in chain#2 and plug-in chain#3, and auxiliary sidecar#1 has established connections with original sidecar#1, original sidecar#2, original sidecar#3 and original sidecar#4, providing services related to plug-in chain#1; auxiliary sidecar#2 has established connections with original sidecar#2, original sidecar#3 and original sidecar#4, providing services related to plug-in chain#2; auxiliary sidecar#3 has established connections with original sidecar#3 and provides services related to plug-in chain#3. At this point, there will be a record about each plug-in chain. For example, since plug-in chain #1 on auxiliary sidecar #1 provides assistance to four original sidecars at the same time, the reference count of the plug-in chain is 4 at this time; for another example, since plug-in chain #2 on auxiliary sidecar #1 provides assistance to three original sidecars at the same time, the reference count of the plug-in chain is 3; for another example, since plug-in chain #3 on auxiliary sidecar #1 provides assistance to one original sidecar, the reference count of the plug-in chain is 1. Similarly, two plug-in chains, plug-in chain #1 and plug-in chain #4, are loaded on auxiliary sidecar #3, and their reference counts can also be counted separately. In addition, since only plug-in chain #1 is loaded on auxiliary sidecar #2 and only provides services for original sidecar #1, its reference count is 1, as shown in Table 5 below.

[0189] It should be noted that in this application, once the auxiliary sidecar registration center allocates an auxiliary sidecar to an original sidecar, the reference count of the auxiliary sidecar on a plug-in chain will be increased by 1, even if the original sidecar may not establish a connection with the auxiliary sidecar later.

[0190] Table 5

[0191]

[0192] Step 314: The auxiliary sidecar registration center reclaims the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary sidecars.

[0193] Therefore, when the original sidecar#1 sends a third request message to the auxiliary sidecar registration center, requesting the auxiliary sidecar registration center to reclaim the resources of the auxiliary sidecar#2, auxiliary sidecar#3, and plug-in chain information #1 on the auxiliary sidecar#1 that were once allocated to it, the auxiliary sidecar registration center will update the reference counts of plug-in chain #1 on each auxiliary sidecar involved. For example, since the original sidecar has been disconnected from the auxiliary sidecar#2, the reference count of plug-in chain #1 on the auxiliary sidecar#2 is updated to 0. In addition, although the original sidecar#1 does not use the auxiliary sidecar#3 and auxiliary sidecar#1 allocated by the auxiliary sidecar registration center, since the original sidecar#1 has indicated that it no longer needs the auxiliary sidecars corresponding to the plug-in chain information #1 to provide assistance, the reference count of plug-in chain #1 on the auxiliary sidecar#1 is updated to 3, and the reference count of plug-in chain #1 on the auxiliary sidecar#3 is updated to 1. The updated reference counts are shown in Table 6 below.

[0194] Table 6

[0195]

[0196] As shown in Table 6, for auxiliary sidecar #1, the auxiliary sidecar registration center will update the reference count of plug-in chain #1 on auxiliary sidecar #1 from 4 to 3; for auxiliary sidecar #3, the auxiliary sidecar registration center will update the reference count of plug-in chain #1 on auxiliary sidecar #3 from 2 to 1; for auxiliary sidecar #2, the reference count of plug-in chain #1 on it is updated to 0, at which point the auxiliary sidecar registration center will delete all information about plug-in chain #1 on auxiliary sidecar #2.

[0197] As mentioned above, a plug-in chain is composed of various plug-ins, and different plug-in chains may use the same plug-in, but the order of the plug-ins is different. Therefore, for each auxiliary sidecar, a list of reference counts of plug-ins is maintained locally. Taking auxiliary sidecar#2 as an example, it is assumed that there are two plug-in chains loaded locally, namely plug-in chain#1 and plug-in chain#2, where plug-in chain#1 is "plug-in#A-plug-in#B-plug-in#C", and plug-in chain#2 is "plug-in#A-plug-in#B-plug-in#D". At this time, the reference count of plug-in#A is 2, the reference count of plug-in#B is 2, the reference count of plug-in#C is 1, and the reference count of plug-in#4 is 1. Since the auxiliary sidecar registration center counts the reference count of auxiliary sidecar#2 plug-in chain#1 as 0, at this time, the auxiliary sidecar registration center can also send a fourth request message to auxiliary sidecar#2, requesting auxiliary sidecar#2 to reclaim the resources of plug-in chain#1. For example, auxiliary sidecar #2 can update the reference counts of each local plug-in according to the fourth request information. When the reference count of a plug-in is 0, auxiliary sidecar #2 deletes all local information about the plug-in. For example, auxiliary sidecar #2 deletes all local information about plug-in #C and plug-in #D.

[0198] For another example, if the auxiliary sidecar registration center finds that the original sidecar long connection is disconnected, and the auxiliary sidecar also reports to the auxiliary sidecar registration center a request to disconnect from the original sidecar, at this time, the auxiliary sidecar registration center determines that the original sidecar is abnormally disconnected, and also reclaims the resources of the corresponding plug-in chain information on the corresponding auxiliary sidecar allocated to the original sidecar.

[0199] Based on the solution provided by this application, the auxiliary sidecar has been preheated before the upper limit of the original sidecar processing capacity is reached. Therefore, the processing delay of the service request message will not be affected by the plug-in loading process. The service delay and user experience can be guaranteed.

[0200] In addition, the solution provided by this application only requires the auxiliary sidecar to load the plug-in binary files needed at the current moment during the preheating process, rather than all the plug-in binary files configured on the original sidecar, and when the original sidecar can process the service request message, the auxiliary sidecar registration center can also recycle the resources of the plug-in chain information corresponding to the hash value on the auxiliary sidecar for use by other original sidecars. In this way, the utilization rate of computing resources can be improved while meeting the processing capacity of the entire original sidecar.

[0201] It can be understood that in this application, "if" and "if" both mean that the device / equipment will make corresponding processing under certain objective circumstances, and it does not limit the time, nor does it require the device / equipment to have a judgment action when it is implemented, nor does it mean that there are other limitations.

[0202] It should be understood that the pre-defined in the present application can be understood as defined, pre-defined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0203] It can be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0204] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0205] The embodiment of the present application can divide the computing device into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0206] Figure 4 1 is a schematic block diagram of a computing device 100 provided in an embodiment of the present application. As shown in the figure, the device 100 may include: a transceiver unit 110 and a processing unit 120.

[0207] In one possible design, the computing device 100 may be a first module or an original sidecar. The computing device 100 may be used to execute the steps executed by the first module or the original sidecar in the above method 200 or method 300.

[0208] In a possible implementation, the transceiver unit is used to receive plug-in configuration information, the plug-in configuration information includes plug-in chain information, and the plug-in chain information includes a plug-in name; the processing unit is used to obtain an address of a plug-in binary file corresponding to the plug-in name from a second module according to the plug-in name in the plug-in chain information, wherein the second module stores first information, the first information includes a first mapping relationship, and the first mapping relationship is a mapping relationship between the plug-in name and the address of the plug-in binary file; the processing unit is used to load the plug-in binary file into the memory of the computing device according to the address of the plug-in binary file.

[0209] In a possible implementation, the processing unit is used to obtain, from the second module, an address of a plug-in binary file corresponding to the plug-in name in the first operating system type corresponding to the computing device and the plug-in name.

[0210] In a possible implementation, the plug-in configuration information specifically includes a mapping relationship between a service request message and the plug-in chain information, the plug-in chain information also includes a plug-in order, and the transceiver unit is also used to receive the service request message from the client; the processing unit is also used to determine the plug-in chain information based on the service request message and the plug-in configuration information, and determine the plug-in binary file corresponding to the plug-in chain information in the loaded plug-in binary file; the processing unit is used to process the service request message according to the plug-in binary file corresponding to the plug-in chain information and the plug-in order.

[0211] In one possible implementation, the processing unit is used to determine the occupancy rate of computing resources when processing the service request message at the current moment; if the processing unit is used to determine that the occupancy rate of the computing resources at the current moment is greater than or equal to a first threshold, the transceiver unit is controlled to send a first request message to the second module, and the first request message is used for the second module to allocate one or more auxiliary modules to the computing device, wherein the first threshold is less than the second threshold, and the second threshold is the upper limit of the use of the computing resources; the transceiver unit is used to receive a first response message from the second module, and the first response message carries second information, and the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0212] In one possible implementation, the processing unit is used to determine the processing time for processing the service request message at the current moment; if the processing unit determines that the processing time is greater than or equal to a third threshold, the transceiver unit is controlled to send a first request message to the second module, and the first request message is used for the second module to allocate one or more auxiliary modules to the computing device, wherein the third threshold is less than a fourth threshold, and the fourth threshold is the upper limit of the processing time; the transceiver unit is used to receive a first response message from the second module, and the first response message carries second information, and the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0213] In one possible implementation, the processing unit is used to determine a first auxiliary module from the one or more auxiliary modules based on the second information; the computing device establishes a connection with the first auxiliary module; if the processing unit determines that the occupancy rate of the computing resources at the current moment is greater than or equal to the second threshold, the transceiver unit is controlled to send a second request message to the first auxiliary module, the second request message is used to request processing of the service request message, the second request message carries the hash value, and / or; if the processing unit determines that the processing time for processing the service request message at the current moment is greater than or equal to the fourth threshold, the transceiver unit is controlled to send a second request message to the first auxiliary module, the second request message is used to request processing of the service request message, and the second request message carries the hash value.

[0214] In one possible implementation, if the processing unit determines that the occupancy rate of the computing resources at the current moment is less than or equal to the second threshold, the first auxiliary module of the computing device is controlled to disconnect, wherein the second threshold is less than the second threshold; the transceiver unit is used to send a third request message to the second module, and the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, and the third request message carries the hash value, and the addresses corresponding to the one or more auxiliary modules, and / or; if the processing unit determines that the processing time for processing the service request message at the current moment is less than or equal to the fourth threshold, the computing device is controlled to disconnect from the first auxiliary module, wherein the fourth threshold is less than the fourth threshold; the transceiver unit is used to send a third request message to the second module, and the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, and the third request message carries the hash value, and the addresses corresponding to the one or more auxiliary sidecars.

[0215] In one possible design, the computing device 100 may be a second module or an auxiliary sidecar registry center. The computing device 100 may be used to execute the steps performed by the second module or the auxiliary sidecar registry center in the above-mentioned method 200 or method 300.

[0216] In a possible implementation, the processing unit is used to determine a first mapping relationship, which is a mapping relationship between a plug-in name and an address of a plug-in binary file; the transceiver unit is used to receive an address request message from a first module, the address request message carries the plug-in name, and the address request message is used to request the address of the plug-in binary file corresponding to the plug-in name; the processing unit is used to determine the address of the plug-in binary file corresponding to the plug-in name according to the first mapping relationship; the transceiver unit is used to send an address response message to the first module, and the address response message carries the address of the plug-in binary file.

[0217] The processing unit is used to determine the first mapping relationship, including: the processing unit is used to obtain the plug-in name and the plug-in binary file; the processing unit is used to save the plug-in binary file to the file system and determine the address of the plug-in binary; the processing unit is used to determine the first mapping relationship according to the plug-in name and the address of the plug-in binary file.

[0218] In one possible implementation, the transceiver unit is used to receive a registration message from an auxiliary module, and the registration message carries at least one of the following: plug-in chain information pre-configured at startup of each auxiliary module, the address of each auxiliary module, the version of each auxiliary module, and the operating system type corresponding to each auxiliary module, wherein the plug-in chain information includes the plug-in name and plug-in order; the processing unit is used to save the content in the registration message.

[0219] In a possible implementation, the transceiver unit is used to receive a first request message from the first module, the first request message carries third information, and the third information is used by the second module to determine the plug-in chain information currently used by the first module; the processing unit is used to allocate one or more auxiliary modules to the first module according to the plug-in chain information; the transceiver unit is used to send a first response message to the first module, the first response message carries second information, and the second information includes: the priority of the one or more auxiliary modules, and the corresponding address of the one or more auxiliary modules.

[0220] In a possible implementation, the processing unit is used to determine one or more auxiliary modules allocated to the first module according to the plug-in chain information, including: the processing unit is used to determine whether an auxiliary module has loaded the plug-in chain information into a third device according to the registration message and the plug-in chain information, wherein the third device includes the auxiliary module; when the processing unit determines that no auxiliary module has loaded the plug-in chain information, the processing unit is used to determine one or more auxiliary modules; the transceiver unit is used to send a preheat request message to the one or more auxiliary modules, the preheat request message carries the address of the plug-in binary file corresponding to the plug-in name in the plug-in chain information, and the preheat request message is used to instruct the one or more auxiliary modules to load the plug-in binary file into the memory according to the address of the plug-in binary file; the transceiver unit is used to receive a preheat response message from the one or more auxiliary modules, and the preheat response message is used to indicate that the one or more auxiliary modules have loaded the plug-in binary file; the processing unit is used to determine to allocate the one or more auxiliary modules to the first module according to the preheat response message.

[0221] In one possible implementation, the transceiver unit is used to receive a third request message from the first module, and the third request message is used to request the computing device to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, and the third request message carries the hash value and the addresses corresponding to the one or more auxiliary modules respectively; the processing unit is used to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules according to the third request message.

[0222] In one possible design, the computing device 100 may be an auxiliary module or an auxiliary sidecar. The computing device 100 may be used to execute the steps performed by the auxiliary module or the auxiliary sidecar in the above method 200 or method 300.

[0223] In one possible implementation, the transceiver unit is used to send a registration message to the second module, and the registration message carries at least one of the following: plug-in chain information pre-configured at startup of each auxiliary module in the computing device, the address of each auxiliary module, the version of each auxiliary module, and the operating system type corresponding to each auxiliary module, wherein the plug-in chain information includes the plug-in name and plug-in order.

[0224] It should also be understood that the device 100 herein is embodied in the form of a functional unit. The term "module" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functionality.

[0225] The device 100 of each of the above schemes has the function of implementing the corresponding steps of the above method 200 and method 300. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions; for example, the determination module, the insertion module, etc. can be replaced by a processor to respectively perform the sending and receiving operations and related processing operations in each method embodiment. In addition, the processing unit can be a processing circuit.

[0226] It should be pointed out that Figure 4 The device in the above method embodiment may be a computing device, or a chip or chip system of a computing device, such as a system on chip (SoC). The processing unit is a processor or microprocessor or integrated circuit integrated on the chip. This is not limited here.

[0227] Figure 5 1 is a schematic block diagram of a computing device cluster provided in an embodiment of the present application. The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0228] like Figure 5 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the method 200 and the method 300.

[0229] in, Figure 5 The computing device 100 in the embodiment includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0230] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus 104 is represented by only one line, but does not mean that there is only one bus or one type of bus. The bus 104 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).

[0231] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0232] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0233] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the first module, the second module, and the auxiliary module, thereby implementing the methods 200 and 300. That is, the memory 106 stores instructions for executing the methods 200 and 300.

[0234] Alternatively, the memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the first module, the second module, and the third module, thereby implementing the methods 200 and 300. That is, the memory 106 stores instructions for executing the methods 200 and 300.

[0235] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.

[0236] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also respectively store partial instructions for executing the method 200 and the method 300. In other words, the combination of one or more computing devices 100 may jointly execute the instructions for executing the method 200 and the method 300.

[0237] For example, one computing device 100 in the computing device cluster may be a first module (e.g., an original sidecar), another computing device 100 may be a second module (e.g., an auxiliary sidecar registry), and yet another computing device 100 may be an auxiliary module (e.g., an auxiliary sidecar).

[0238] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network.

[0239] Figure 6 A possible implementation is shown. Figure 6 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the first module. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the second module and the third module.

[0240] Figure 6 The connection method between the computing device clusters shown may be based on the consideration that the first module in the method 200 and the method 300 provided in the present application needs to process a large amount of data, for example, and therefore the functions implemented by the second module and the auxiliary module are considered to be executed by the computing device 100B.

[0241] It should be understood that Figure 6 The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.

[0242] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also respectively store partial instructions for executing the method 200 and the method 300. In other words, the combination of one or more computing devices 100 may jointly execute the instructions for executing the method 200 and the method 300.

[0243] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions for executing partial functions of the communication system. That is, the instructions stored in the memory 106 in different computing devices 100 may implement the functions of one or more modules among the first module, the second module and the auxiliary module.

[0244] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0245] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (digitalsignal processor, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0246] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0247] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, on which a computer program code is stored. When the computer program code is run on a computer, the computer executes the steps in the embodiments of method 200 and method 300.

[0248] According to the method provided in the embodiments of the present application, the present application also provides a computer-readable medium, which stores a program code. When the program code runs on a computer, the computer executes the steps in the above-mentioned method 200 and method 300 embodiments.

[0249] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices / apparatuses can be referred to the corresponding method embodiments provided above, which will not be repeated here.

[0250] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0251] In the above-mentioned various equipment / device embodiments, the corresponding steps are performed by the corresponding modules or units. For example, the transceiver unit (transceiver) performs the steps of receiving or sending in the method embodiment, and other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can refer to the corresponding method embodiments. Among them, the processor can be one or more.

[0252] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0253] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0254] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0255] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0256] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0257] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0258] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0259] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for configuring a plug-in, characterized in that: The method comprises: The first module receives plug-in configuration information, wherein the plug-in configuration information includes plug-in chain information, and the plug-in chain information includes a plug-in name, wherein the first module is used to provide a service grid governance function; The first module obtains, from the second module, an address of a plug-in binary file corresponding to the plug-in name according to the plug-in name in the plug-in chain information, wherein the second module stores first information, the first information including a first mapping relationship, and the first mapping relationship is a mapping relationship between the plug-in name and the address of the plug-in binary file; The first module obtains the plug-in binary file according to the address of the plug-in binary file, and loads the plug-in binary file into the memory of a first device, wherein the first device includes the first module.

2. The method according to claim 1, characterized in that The first mapping relationship is specifically: a mapping relationship between an operating system type, a plug-in name, and an address of a plug-in binary file, The first module obtains, from the second module, an address of a plug-in binary file corresponding to the plug-in name according to the plug-in name in the plug-in chain information, including: The first module obtains, from the second module, an address of a plug-in binary file corresponding to the plug-in name in the first operating system type according to the first operating system type corresponding to the first module and the plug-in name.

3. The method according to claim 1 or 2, characterized in that: The first information also includes at least one of the following: the plug-in chain information pre-configured when the auxiliary module is started, the address of the auxiliary module, the version of the auxiliary module, and the operating system type corresponding to the auxiliary module, wherein the auxiliary module is used to assist the first module in providing the function of service grid governance.

4. The method according to claim 3, characterized in that The first module is the original sidecar, the second module is the auxiliary sidecar registration center, and the auxiliary module is the auxiliary sidecar.

5. The method according to any one of claims 1 to 4, characterized in that The plug-in configuration information specifically includes a mapping relationship between the service request message and the plug-in chain information, the plug-in chain information also includes a plug-in sequence, and the method further includes: The first module receives the service request message from the client; The first module determines the plug-in chain information according to the service request message and the plug-in configuration information, and determines the plug-in binary file corresponding to the plug-in chain information among the loaded plug-in binary files; The first module processes the service request message according to the plug-in binary file corresponding to the plug-in chain information and the plug-in sequence.

6. The method according to claim 5, characterized in that The method further comprises: The first module determines the occupancy rate of computing resources when processing the service request message at the current moment; If the first module determines that the occupancy rate of the computing resource at the current moment is greater than or equal to the first threshold, a first request message is sent to the second module, where the first request message carries third information, where the third information is used by the second module to determine the plug-in chain information currently used by the first module, where the plug-in chain information is used by the second module to allocate one or more auxiliary modules to the first module, wherein the first threshold is less than the second threshold, and the second threshold is the upper limit of the use of the computing resource; The first module receives a first response message from the second module, the first response message carries second information, and the second information includes: priorities of the one or more auxiliary modules, and addresses corresponding to the one or more auxiliary modules.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: The first module determines the processing time for processing the service request message at the current moment; If the first module determines that the processing time is greater than or equal to a third threshold, a first request message is sent to the second module, where the first request message carries third information, where the third information is used by the second module to determine the plug-in chain information currently used by the first module, where the plug-in chain information is used by the second module to allocate one or more auxiliary modules to the first module, wherein the third threshold is less than a fourth threshold, and the fourth threshold is an upper limit of the processing time; The first module receives a first response message from the second module, the first response message carries second information, and the second information includes: priorities of the one or more auxiliary modules, and addresses corresponding to the one or more auxiliary modules.

8. The method according to claim 6 or 7, characterized in that: The third information includes a hash value corresponding to the plug-in chain information.

9. The method according to claim 8, characterized in that The method further comprises: The first module determines a first auxiliary module from the one or more auxiliary modules according to the second information; The first module establishes a connection with the first auxiliary module; If the first module determines that the occupancy rate of the computing resource at the current moment is greater than or equal to the second threshold, a second request message is sent to the first auxiliary module, where the second request message is used to request processing of the service request message, and the second request message carries the hash value, and / or; If the first module determines that the processing time for processing the service request message at the current moment is greater than or equal to the fourth threshold, a second request message is sent to the first auxiliary module, where the second request message is used to request processing of the service request message, and the second request message carries the hash value.

10. The method according to any one of claims 7 to 9, characterized in that The method further comprises: If the first module determines that the current occupancy rate of the computing resources is less than or equal to the second threshold, disconnecting from the first auxiliary module; The first module sends a third request message to the second module, the third request message carrying the hash value and the addresses corresponding to the one or more auxiliary modules, the third request message being used to request the second module to reclaim resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules, and / or; If the first module determines that the processing time for processing the service request message at the current moment is less than or equal to the fourth threshold, disconnecting from the first auxiliary module; The first module sends a third request message to the second module, and the third request message is used to request the second module to reclaim the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules. The third request message carries the hash value and the corresponding addresses of the one or more auxiliary modules.

11. A method for configuring a plug-in, characterized in that: The method comprises: The second module determines a first mapping relationship, where the first mapping relationship is a mapping relationship between a plug-in name and an address of a plug-in binary file; The second module receives an address request message from the first module, the address request message carries a plug-in name, and the address request message is used to request an address of a plug-in binary file corresponding to the plug-in name, wherein the first module is used to provide a service grid governance function; The second module determines, according to the first mapping relationship, an address of the plug-in binary file corresponding to the plug-in name; The second module sends an address response message to the first module, where the address response message carries the address of the plug-in binary file.

12. The method according to claim 11, characterized in that The second module determining the first mapping relationship includes: The second module obtains the plug-in name and the plug-in binary file; The second module saves the plug-in binary file to a file system and determines an address of the plug-in binary file; The second module determines the first mapping relationship according to the plug-in name and the address of the plug-in binary.

13. The method according to claim 11 or 12, characterized in that: The first mapping relationship is specifically: a mapping relationship between an operating system type, a plug-in name, and an address of a plug-in binary file, The address request message also carries a first operating system type corresponding to the first module, and the address response message carries an address of a plug-in binary file corresponding to the plug-in name in the first operating system type.

14. The method according to any one of claims 10 to 12, characterized in that The method further comprises: The second module receives a registration message from the auxiliary module, the registration message carrying at least one of the following: plug-in chain information pre-configured by the auxiliary module at startup, the address of the auxiliary module, the version of the auxiliary module, and the operating system type corresponding to the auxiliary module, wherein the plug-in chain information includes the plug-in name and the plug-in sequence, and the auxiliary module is used to assist the first module in providing a service grid governance function; The second module saves the content of the registration message.

15. The method according to claim 14, characterized in that The first module is the original sidecar, the second module is the auxiliary sidecar registration center, and the auxiliary module is the auxiliary sidecar.

16. The method according to claim 14 or 15, characterized in that The method further comprises: The second module receives a first request message from the first module, where the first request message carries third information, and the third information is used by the second module to determine the plug-in chain information currently used by the first module; The second module allocates one or more auxiliary modules to the first module according to the plug-in chain information; The second module sends a first response message to the first module, the first response message carries second information, and the second information includes: priorities of the one or more auxiliary modules, and addresses corresponding to the one or more auxiliary modules.

17. The method according to claim 16, characterized in that The third information includes a hash value corresponding to the plug-in chain information.

18. The method according to claim 16 or 17, characterized in that The second module determines, according to the plug-in chain information, one or more auxiliary modules allocated to the first module, including: The second module determines, according to the registration message and the plug-in chain information, whether an auxiliary module has loaded a plug-in binary file corresponding to the plug-in chain information into a memory of a third device, wherein the third device includes the auxiliary module; When the second module determines that no auxiliary module has loaded the plug-in binary file corresponding to the plug-in chain information, The second module sends a preheating request message to the one or more auxiliary modules, the preheating request message carrying the address of the plug-in binary file corresponding to the plug-in name in the plug-in chain information, and the preheating request message is used to instruct the one or more auxiliary modules to load the plug-in binary file into the memory of the third device according to the address of the plug-in binary file; The second module receives a preheat response message from the one or more auxiliary modules, where the preheat response message is used to indicate that the one or more auxiliary modules have loaded the plug-in binary file; The second module determines, according to the preheat response message, to allocate the one or more auxiliary modules to the first module.

19. The method according to claim 17 or 18, characterized in that The method further comprises: The second module receives a third request message from the first module, the third request message carries the hash value and the addresses corresponding to the one or more auxiliary modules, and the third request message is used to request the second module to reclaim resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules; The second module reclaims the resources of the plug-in chain information corresponding to the hash value on the one or more auxiliary modules according to the third request message.

20. A computing device cluster, characterized in that The method comprises at least one computing device, each computing device comprises a processor and a memory, wherein the processor runs instructions in the memory so that the processor executes the method according to any one of claims 1 to 10, or the method according to any one of claims 11 to 19.

21. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, which, when executed by a computing device, cause the device to perform the method according to any one of claims 1 to 10, or any one of claims 11 to 19.

22. A computer program product, characterized in that The method comprises computer program instructions, which, when executed by a computing device, cause the device to perform the method according to any one of claims 1 to 10, or any one of claims 11 to 19.