Micro-service calling method and device, data processor, electronic equipment and medium
By directly forwarding microservice call packets in the DPU and using routing acceleration entries, the problem of high CPU usage is solved, and DPU processing capacity is improved without increasing server costs.
Patent Information
- Application Number
- CN202310782351.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
In distributed microservice networks, the processing capacity of embedded CPUs is limited, resulting in a higher CPU occupancy rate and limiting the processing capacity of HOST. Existing solutions increase costs through server expansion, making it difficult to increase DPUs without increasing server costs. processing capability.
By using the network acceleration engine in the DPU to receive and analyze microservice call messages, the pre-built routing acceleration entries are used to forward messages directly to the host deploying the microservices, avoiding processing through the SideCar module, thereby improving the processing capabilities of the DPU.
Without increasing server costs, the processing overhead of the SideCar module is significantly reduced, the DPU's processing capability of microservice call packets is improved, and the HOST's processing capability of microservice calls is ensured.
Smart Images

Figure CN119232786A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a microservice calling method, device, data processor, electronic device, and medium. Background Art
[0002] In the deployment of a distributed microservice network (Service Mesh), in order to improve the computing power of the host (HOST), the sidecar module is usually offloaded from the HOST to the data processor (Data Processing Unit, DPU), especially to the central processing unit (Central Processing Unit, CPU) embedded in the DPU, so that the CPU can process complex business logic.
[0003] Due to the limited processing power of the embedded CPU, when the business traffic sent from the HOST to the SideCar module in the DPU reaches a certain level, this will cause the CPU occupancy rate to surge, making the CPU unable to bear the business traffic sent by the HOST, thereby limiting the processing power of the HOST.
[0004] In order to give full play to the processing capacity of the HOST, the current method is mainly to expand the capacity of the server, that is, the DPU capacity expansion, to improve the processing capacity of the DPU, thereby ensuring the processing capacity of the HOST. However, this solution brings disadvantages to microservice network providers in terms of server costs, which needs to be solved urgently. Summary of the invention
[0005] Embodiments of the present invention provide a microservice calling method, device, data processor, electronic device and medium to improve the processing capability of a DPU without increasing server costs.
[0006] According to one aspect of the present invention, a microservice calling method is provided, which is applied to a first data processor, the first data processor including a first network acceleration engine, and the method includes:
[0007] The following steps are performed by the first network acceleration engine:
[0008] Receive a microservice call message sent by an application running in the first host, and obtain a routing address corresponding to the microservice to be called by the application by analyzing the microservice call message;
[0009] In the case where there is a first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, a second data processor is determined according to the first target acceleration entry, wherein the microservice is deployed in a second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine;
[0010] The microservice call message is forwarded to the second data processor, so that the second data processor forwards the microservice call message to the second host via the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the execution result to the application.
[0011] According to another aspect of the present invention, a microservice calling method is provided, which is applied to a second data processor, the second data processor includes a second network acceleration engine, and the method includes:
[0012] The second network acceleration engine performs the following steps:
[0013] Receive a microservice call message forwarded by a first data processor, wherein the first data processor corresponds to a first host, an application program is running in the first host, the microservice call message at least represents a routing address corresponding to a microservice to be called by the application program, and the microservice is deployed in a second host corresponding to a second data processor;
[0014] In the case where there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, the microservice call message is forwarded to the second host, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
[0015] According to another aspect of the present invention, a microservice calling device is provided, which is configured in a first data processor, the first data processor includes a first network acceleration engine, and the device includes:
[0016] The routing address obtaining module is used to receive the microservice call message sent by the application running in the first host through the first network acceleration engine, and obtain the routing address corresponding to the microservice to be called by the application by analyzing the microservice call message:
[0017] A second data processor determination module is configured to determine, through the first network acceleration engine, a second data processor according to the first target acceleration entry when there is a first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, wherein the microservice is deployed in a second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine;
[0018] The first forwarding module for microservice call messages is used to forward the microservice call messages to the second data processor through the first network acceleration engine, so as to forward the microservice call messages to the second host through the second data processor and the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the execution result to the application.
[0019] According to another aspect of the present invention, a microservice calling device is provided, which is configured in a second data processor, and the second data processor includes a second network acceleration engine. The device includes:
[0020] A microservice call message receiving module is used to receive a microservice call message forwarded by a first data processor through a second network acceleration engine, wherein the first data processor corresponds to a first host, an application program is running in the first host, and the microservice call message at least represents a routing address corresponding to a microservice to be called by the application program, and the microservice is deployed in a second host corresponding to the second data processor:
[0021] The second forwarding module for microservice call messages is used to forward the microservice call message to the second host through the second network acceleration engine, when there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
[0022] According to another aspect of the present invention, there is provided a first data processor, which may include:
[0023] at least one processor; and
[0024] a memory communicatively connected to at least one processor; wherein,
[0025] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the microservice calling method provided by any embodiment of the present invention is implemented when the at least one processor executes the computer program.
[0026] According to another aspect of the present invention, there is provided a second data processor, which may include:
[0027] at least one processor; and
[0028] a memory communicatively connected to at least one processor; wherein,
[0029] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the microservice calling method provided by any embodiment of the present invention is implemented when the at least one processor executes the computer program.
[0030] According to another aspect of the present invention, an electronic device is provided, which is equipped with the first data processor or the second data processor provided by any embodiment of the present invention.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a processor to implement the microservice calling method provided by any embodiment of the present invention when executed.
[0032] The technical solution in the embodiment of the present invention is to receive a microservice call message sent by an APP running in a first HOST through a first network acceleration engine in a first DPU, and obtain a routing address corresponding to the Service that the APP needs to call by analyzing the microservice call message; then, in at least one pre-constructed first routing acceleration entry, if there is a first target acceleration entry that matches the routing address corresponding to the APP and the Service, it means that the microservice call process can be implemented based on the acceleration method at this time, so according to the first target acceleration entry, determine the second DPU corresponding to the second HOST where the Service is deployed; then, forward the microservice call message to the second DPU, so that the second DPU, through the second network acceleration engine in the second DPU, forwards the microservice call message to the second HOST, so that the second HOST executes the Service based on the microservice call message, and returns the obtained execution result to the APP, thereby completing the APP's call process for the Service. The above technical solution pre-builds the first routing acceleration entry, so that during the microservice call process, the first routing acceleration entry can be used, and the first network acceleration engine directly forwards the microservice call message to the second HOST. At this time, there is no need to hand over the microservice call message to the first SideCar module for forwarding. Therefore, without increasing the server cost, the processing overhead of the first SideCar module is significantly reduced, thereby improving the first DPU's processing capability for microservice call messages, and ensuring the second HOST's processing capability for Service calls.
[0033] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 is a flowchart of a microservice calling method provided according to an embodiment of the present invention;
[0036] Figure 2 is a flowchart of another microservice calling method provided according to an embodiment of the present invention;
[0037] Figure 3 is a flowchart of another microservice calling method provided according to an embodiment of the present invention;
[0038] Figure 4 is a flowchart of another microservice calling method provided according to an embodiment of the present invention;
[0039] Figure 5 It is a schematic diagram of constructing a routing acceleration entry in another microservice calling method provided according to an embodiment of the present invention;
[0040] Figure 6 is a schematic diagram of the application of routing acceleration entries in another microservice calling method provided in an embodiment of the present invention;
[0041] Figure 7 This is a structural block diagram of a microservice calling device provided according to an embodiment of the present invention;
[0042] Figure 8 is a structural block diagram of another microservice calling device provided according to an embodiment of the present invention;
[0043] Fig. 9 It is a structural diagram of a first data processor or a second data processor that implements the microservice calling method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] Figure 1 It is a flowchart of a microservice calling method provided in an embodiment of the present invention. This embodiment is applicable to the situation where the microservice calling message is directly processed by the network acceleration engine in the DPU to call the microservice. In this case, there is no need to process the microservice calling message through the SideCar module in the DPU. The method can be executed by the microservice calling device provided in an embodiment of the present invention. The device can be implemented by software and / or hardware. The device can be integrated on the first DPU. The first DPU may include a first network acceleration engine. The first network acceleration engine is a hardware processing unit in the first DPU. It can search for routing entries based on the five-tuple and other characteristic information of the microservice calling message, and directly forward the microservice calling message without the need for processing by the first SideCar module in the CPU, so as to achieve high-speed forwarding of the microservice calling message. The above-mentioned first DPU may also be referred to as a first DPU chip.
[0047] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0048] S110. Receive, through the first network acceleration engine, a microservice call message sent by an application running in the first host, and obtain a routing address corresponding to the microservice that the application needs to call by analyzing the microservice call message.
[0049] Among them, one or more applications (Application, APP) are running on the first HOST. When any one of the one or more APPs needs to call a microservice (Service), it can send the corresponding microservice call message to the first DPU, so that the first DPU forwards the microservice call message to the first network acceleration engine for processing. Here, it is explained from the perspective of any one of the one or more APPs. Specifically,
[0050] The first network acceleration engine receives the microservice call message sent by the APP, and then obtains the routing address corresponding to the Service that the APP needs to call by analyzing the microservice call message. In combination with the application scenarios that may be involved in the embodiments of the present invention, for example, for the Service that the APP needs to call, the routing address of the second HOST where the Service is deployed or the routing address of the second DPU corresponding to the second HOST can be obtained by analyzing the message content of the microservice call message, and the routing address obtained thereby is used as the routing address corresponding to the Service.
[0051] S120. Determine, by the first network acceleration engine, a second data processor according to the first target acceleration entry when there is a first target acceleration entry matching the routing address corresponding to the application program and the microservice in at least one pre-built first routing acceleration entry.
[0052] Among them, a microservice is deployed in the second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine.
[0053] Among them, the first routing acceleration entry can be understood as a pre-constructed entry used to characterize that when a certain APP calls a certain Service, the microservice call process can be implemented based on the acceleration method. In actual applications, optionally, the above-mentioned first routing acceleration entry can be expressed in the following way: routing acceleration is performed on the microservice call message from the APP of the first HOST, and the acceleration address is the routing address of the second DPU corresponding to the second HOST. In addition, the above-mentioned acceleration method can be understood as a method in which the first network acceleration engine directly processes the microservice call message to call the Service. At this time, there is no need to forward the microservice call message to the first SideCar module in the first DPU for processing. The number of first routing acceleration entries can be one, two or more, which is related to the actual situation and is not specifically limited here.
[0054] For the APP and routing address corresponding to the microservice call message currently being processed, the first target acceleration entry can be understood as the first routing acceleration entry that matches the APP and routing address. In the case where there is a first target acceleration entry in at least one first routing acceleration entry, this means that the microservice call process can be implemented based on the acceleration method at this time, so the first network acceleration engine can determine the second DPU corresponding to the second HOST where the Service is deployed according to the first target acceleration entry.
[0055] S130. Forward the microservice call message to the second data processor through the first network acceleration engine, so that the second data processor forwards the microservice call message to the second host through the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
[0056] The microservice call message is forwarded to the second DPU through the first network acceleration engine. In this way, the microservice call message can be forwarded to the second HOST through the second DPU and the second network acceleration engine in the second DPU, and then the Service can be executed based on the microservice call message through the second HOST, and the execution result is returned in the original path, thereby completing the APP's call process for the Service.
[0057] The technical solution in the embodiment of the present invention is to receive a microservice call message sent by an APP running in a first HOST through a first network acceleration engine in a first DPU, and obtain a routing address corresponding to the Service that the APP needs to call by analyzing the microservice call message; then, in at least one pre-constructed first routing acceleration entry, if there is a first target acceleration entry that matches the routing address corresponding to the APP and the Service, it means that the microservice call process can be implemented based on the acceleration method at this time, so according to the first target acceleration entry, determine the second DPU corresponding to the second HOST where the Service is deployed; then, forward the microservice call message to the second DPU, so that the second DPU, through the second network acceleration engine in the second DPU, forwards the microservice call message to the second HOST, so that the second HOST executes the Service based on the microservice call message, and returns the obtained execution result to the APP, thereby completing the APP's call process for the Service. The above technical solution pre-builds the first routing acceleration entry, so that during the microservice call process, the first routing acceleration entry can be used, and the first network acceleration engine directly forwards the microservice call message to the second HOST. At this time, there is no need to hand over the microservice call message to the first SideCar module for forwarding. Therefore, without increasing the server cost, the processing overhead of the first SideCar module is significantly reduced, thereby improving the first DPU's processing capability for microservice call messages, and ensuring the second HOST's processing capability for Service calls.
[0058] An optional technical solution is to forward the microservice call message to the second data processor, including:
[0059] The network address of the microservice call message is updated from the routing address of the first data processor to the routing address of the second data processor, so as to forward the microservice call message to the second data processor based on the updated network address.
[0060] Among them, the network address can be understood as the outer address of the microservice call message, that is, the routing address used to characterize the destination of the microservice call message. In practical applications, optionally, the routing address here can be represented by an Internet Protocol (IP) address and / or a port number, etc., which is not specifically limited here. Since the microservice call message is initially sent by the APP to the first DPU, the network address of the microservice call message received by the first network acceleration engine is the routing address of the first DPU. Furthermore, the microservice call message is currently forwarded to the second DPU through the first network acceleration engine, so the network address of the microservice call message can be updated from the routing address of the first DPU to the routing address of the second DPU, so that the microservice call message can be forwarded to the second DPU based on the updated network address.
[0061] The above technical solution realizes accurate forwarding of microservice call messages by updating the network address.
[0062] On this basis, optionally, the microservice call message is encapsulated based on the transmission control protocol format, and the first network acceleration engine includes a first transmission control protocol acceleration engine, which updates the network address of the microservice call message from the routing address of the first data processor to the routing address of the second data processor, including:
[0063] Through the first transmission control protocol acceleration engine, the network address of the microservice call message is updated from the routing address of the first data processor to the routing address of the second data processor.
[0064] Among them, the microservice call message is encapsulated based on the Transmission Control Protocol (TCP) format, so the microservice call message can be intercepted by the first TCP acceleration engine in the first network acceleration engine, and then the network address of the microservice call message is updated from the routing address of the first DPU to the routing address of the second DPU, thereby ensuring the accurate forwarding of the microservice call message.
[0065] On this basis, the above microservice calling method also includes:
[0066] The first transmission control protocol acceleration engine is used to replace the transmission control protocol sequence number in the microservice call message, and the transmission control protocol checksum is recalculated for the microservice call message, and the message obtained after processing is updated as the microservice call message.
[0067] Among them, before forwarding the microservice call message to the second DPU, the TCP sequence number in the microservice call message can be replaced by the first TCP acceleration engine. After forming new TCP header information, the TCP checksum is recalculated for the microservice call message, and the processed message is used as the microservice call message and forwarded to the second DPU, thereby ensuring that the second DPU can effectively process the microservice call message.
[0068] Figure 2 It is a flowchart of another microservice calling method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the first data processor also includes a first sidecar module, and the above-mentioned microservice calling method also includes: through the first network acceleration engine, when there is no first target acceleration entry in at least one first routing acceleration entry, the microservice call message is forwarded to the first sidecar module; through the first sidecar module, based on the microservice call message, the second data processor is determined, and the first target acceleration entry is constructed; through the first sidecar module, the microservice call message is forwarded to the second data processor, and the first target acceleration entry is returned to the first network acceleration engine. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0069] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0070] S210: Receive, through the first network acceleration engine, a microservice call message sent by an application running in the first host, and obtain a routing address corresponding to the microservice that the application needs to call by analyzing the microservice call message.
[0071] S220. By means of the first network acceleration engine, if there is no first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, the microservice call message is forwarded to the first sidecar module.
[0072] Among them, when there is no first target acceleration entry in at least one first routing acceleration entry, it means that the microservice call process cannot be implemented based on the acceleration method at this time, and the microservice call message is forwarded to the first SideCar module, so that the microservice call message is processed by the first SideCar module to realize the forwarding process of the microservice call message. In actual applications, optionally, according to the above description, one or more APPs are running in the first HOST, and at least some of the one or more APPs can correspond to the first SideCar module.
[0073] S230: Determine, through the first sidecar module, the second data processor based on the microservice call message and construct a first target acceleration entry, and return the first target acceleration entry to the first network acceleration engine;
[0074] Among them, a microservice is deployed in the second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine.
[0075] Among them, through the first SideCar module, based on the microservice call message, the second DPU is determined and the first target acceleration entry is constructed, and the first target acceleration entry is returned to the first network acceleration engine, so that when the first network acceleration engine subsequently receives a microservice call message that matches the first target acceleration entry, it can be directly forwarded without being handed over to the first SideCar module for processing.
[0076] S240. Determine, by the first network acceleration engine, a second data processor according to the first target acceleration entry when there is a first target acceleration entry in at least one first routing acceleration entry.
[0077] S250. Forward the microservice call message to the second data processor through the first sidecar module or the first network acceleration engine, so that the microservice call message is forwarded to the second host through the second data processor and the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the execution result to the application.
[0078] Wherein, if there is no first target acceleration entry in at least one first routing acceleration entry, the microservice call message is forwarded to the second DPU through the first SideCar module; otherwise, the microservice call message is forwarded to the second DPU through the first network acceleration engine. Then, the microservice call message can be forwarded to the second HOST through the second DPU via the second network acceleration engine in the second DPU, so that the Service is executed based on the microservice call message through the second HOST, and the execution result is returned in the original path, thereby completing the APP's call process for the Service.
[0079] The technical solution of the embodiment of the present invention constructs a first target acceleration entry for the first network acceleration engine through the first SideCar module, so that when the first network acceleration engine subsequently receives a microservice call message that matches the first target acceleration entry, it can directly forward it without being handed over to the first SideCar module for processing, thereby improving the ability of the first DPU to process microservice call messages.
[0080] An optional technical solution, based on the microservice call message, determines the second data processor, and constructs the first target acceleration entry, including:
[0081] Analyze the uniform resource locator address in the microservice call message to obtain the routing address of the second data processor, wherein the uniform resource locator address corresponds to the second data processor;
[0082] The second data processor is determined according to the routing address of the second data processor, and the first target acceleration entry is constructed according to the routing address of the second data processor and the application corresponding to the microservice call message.
[0083] The URL address in the microservice call message corresponds to the second DPU. In practical applications, it can be the routing address of the second DPU or the routing address of the second HOST corresponding to the second DPU. Therefore, the first SideCar module can analyze the URL address to obtain the routing address of the second DPU, so that the second DPU can be determined through the routing address of the second DPU, and the first target acceleration entry can be constructed according to the routing address of the second DPU and the APP corresponding to the microservice call message.
[0084] The above technical solution realizes the accurate determination of the second DPU and the effective construction of the first target acceleration entry by analyzing the URL address.
[0085] Another optional technical solution, the above microservice calling method further includes:
[0086] After determining the second data processor, establishing a first connection with the second data processor through the first sidecar module;
[0087] Forwarding the microservice call message to the second data processor, and returning the first target acceleration entry to the first network acceleration engine, including:
[0088] When the first connection is successfully established, the microservice call message is forwarded to the second data processor, and the first target acceleration entry is returned to the first network acceleration engine.
[0089] The above technical solution establishes a first connection with the second DPU through the first SideCar module. When the first connection is successfully established, it means that the transmission channel between the first DPU and the second DPU has been successfully established. At this time, the microservice call message is forwarded to the second DPU, thereby ensuring the successful forwarding of the microservice call message.
[0090] Figure 3It is a flowchart of another microservice calling method provided in an embodiment of the present invention. This embodiment can be applied to the situation where the microservice calling message is directly processed by the network acceleration engine in the DPU to call the microservice, and there is no need to process the microservice calling message through the SideCar module in the DPU. The method can be executed by the microservice calling device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware. The device can be integrated on the second DPU, and the second DPU may include a second network acceleration engine. The second network acceleration engine is a hardware processing unit in the second DPU, which can search for routing entries according to the five-tuple and other characteristic information of the microservice calling message, and directly forward the microservice calling message without the need for processing by the second SideCar module in the CPU, and can achieve high-speed forwarding of the microservice calling message. The above-mentioned second DPU may also be referred to as a second DPU chip.
[0091] See also Figure 3 The method of the embodiment of the present invention specifically includes the following steps:
[0092] S310. Receive, through the second network acceleration engine, a microservice call message forwarded by the first data processor;
[0093] The first data processor corresponds to the first host, an application is running in the first host, the microservice call message at least represents the routing address corresponding to the microservice to be called by the application, and the microservice is deployed in the second host corresponding to the second data processor.
[0094] Among them, one or more Services are running on the second HOST, and this is explained from the perspective of the Service that the APP needs to call in the one or more Services. Specifically, through the second network acceleration engine, a microservice call message forwarded by the first network acceleration engine or the first SideCar module in the first DPU for the Service is received, and the microservice call message is initiated by the APP in the first HOST.
[0095] S320. Through the second network acceleration engine, when there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, the microservice call message is forwarded to the second host, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
[0096] Among them, the second routing acceleration entry can be understood as a pre-constructed entry used to characterize that when a certain APP calls a certain Service, the microservice call process can be implemented based on the acceleration method. In actual applications, optionally, the above-mentioned second routing acceleration entry can be represented as follows: routing acceleration is performed on the microservice call message from the APP of the first HOST, and the acceleration address is the routing address of the second HOST where the microservice that the APP needs to call is deployed. The number of second routing acceleration entries can be one, two or more, which is related to the actual situation and is not specifically limited here. It can be understood that the first routing acceleration entry is a routing acceleration entry constructed in the first DPU, and the second routing acceleration entry is a routing acceleration entry constructed in the second DPU.
[0097] For the APP and routing address corresponding to the microservice call message currently being processed, the second target acceleration entry can be understood as the second routing acceleration entry that matches the APP and routing address. In the case where there is a second target acceleration entry in at least one second routing acceleration entry, this means that the microservice call process can be implemented based on the acceleration method at this time, so the microservice call message can be forwarded to the second HOST through the second network acceleration engine. In this way, the Service can be executed based on the microservice call message through the second HOST, and the execution result can be returned in the original way, thereby completing the APP's call process for the Service.
[0098] The technical solution of the embodiment of the present invention obtains the second routing acceleration entry by pre-constructing, so that in the process of microservice calling, the second routing acceleration entry can be used, and the second network acceleration engine directly forwards the microservice calling message to the second HOST. At this time, there is no need to hand over the microservice calling message to the first SideCar module for forwarding. Therefore, without increasing the server cost, the processing overhead of the second SideCar module is significantly reduced, thereby improving the processing capability of the second DPU for the microservice calling message, and ensuring the processing capability of the second HOST for the Service call.
[0099] An optional technical solution is to forward the microservice call message to the second host, including:
[0100] The network address of the microservice call message is updated from the routing address of the second data processor to the routing address of the second host, so as to forward the microservice call message to the second host based on the updated network address.
[0101] Among them, since the microservice call message is currently sent from the first DPU to the second DPU, the network address of the microservice call message received by the second network acceleration engine includes the routing address of the second DPU. Further, the microservice call message is currently forwarded to the second HOST through the second network acceleration engine, so the network address of the microservice call message is updated from the routing address of the second DPU to the routing address of the second HOST, so that the microservice call message can be forwarded to the second HOST based on the updated network address, thereby realizing accurate forwarding of the microservice call message.
[0102] Figure 4 It is a flowchart of another microservice calling method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the second data processor also includes a second sidecar module, and the above-mentioned microservice calling method also includes: through the second network acceleration engine, when there is no second target acceleration entry in at least one second routing acceleration entry, the microservice call message is forwarded to the second sidecar module; through the second sidecar module, a second target acceleration entry is constructed based on the microservice call message, and the microservice call message is forwarded to the second host, and the second target acceleration entry is returned to the second network acceleration engine. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0103] See also Figure 4 The method of this embodiment may specifically include the following steps:
[0104] S410. Receive, through the second network acceleration engine, a microservice call message forwarded by the first data processor;
[0105] The first data processor corresponds to the first host, an application is running in the first host, the microservice call message at least represents the routing address corresponding to the microservice to be called by the application, and the microservice is deployed in the second host corresponding to the second data processor.
[0106] S420. By means of the second network acceleration engine, if there is no second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, the microservice call message is forwarded to the second sidecar module.
[0107] Among them, when there is no second target acceleration entry in at least one second routing acceleration entry, it means that the microservice call process cannot be implemented based on the acceleration method at this time, and the microservice call message is forwarded to the second SideCar module, so that the microservice call message is processed by the second SideCar module to realize the forwarding process of the microservice call message. In actual applications, optionally, according to the above description, one or more Services are running in the second HOST, and at least some of the APPs in the one or more Services can correspond to the second SideCar module.
[0108] S430. Through the second sidecar module, based on the microservice call message, construct a second target acceleration entry, and return the second target acceleration entry to the second network acceleration engine.
[0109] Among them, through the second SideCar module, a second target acceleration entry is constructed based on the microservice call message, and the second target acceleration entry is returned to the second network acceleration engine, so that when the second network acceleration engine subsequently receives a microservice call message that matches the second target acceleration entry, it can directly forward it without being handed over to the second SideCar module for processing.
[0110] S440. Forward the microservice call message to the second host through the second sidecar module, or, through the second network acceleration engine, when there is a second target acceleration entry in at least one second routing acceleration entry, forward the microservice call message to the second host, so that the second host executes the microservice based on the microservice call message and returns the execution result to the application.
[0111] Among them, if there is no second target acceleration entry in at least one second routing acceleration entry, the microservice call message is forwarded to the second HOST through the second SideCar module; otherwise, the microservice call message is forwarded to the second HOST through the second network acceleration engine. In this way, the Service can be executed based on the microservice call message through the second HOST, and the execution result is returned in the original path, thereby completing the APP's call process for the Service.
[0112] The technical solution of the embodiment of the present invention constructs a second target acceleration entry for the second network acceleration engine through the second SideCar module, so that the second network acceleration engine can directly forward the microservice call message that matches the second target acceleration entry when it receives it later, without having to hand it over to the second SideCar module for processing, thereby improving the ability of the second DPU to process microservice call messages.
[0113] An optional technical solution, the above microservice calling method further includes:
[0114] Through the second sidecar module, the microservice call message is analyzed to obtain the routing address of the second host, and based on the routing address of the second host, a second connection is established with the second host;
[0115] Forwarding the microservice call message to the second host, and returning the second target acceleration entry to the second network acceleration engine, including:
[0116] When the second connection is successfully established, the microservice call message is forwarded to the second host, and the second target acceleration entry is returned to the second network acceleration engine.
[0117] Among them, the microservice call message is analyzed through the second SideCar module. For example, the URL address in the microservice call message can be analyzed to obtain the routing address of the second HOST where the Service is deployed, so that a second connection can be established with the second HOST based on the routing address of the second HOST. If the second connection is successfully established, it means that the transmission channel between the second DPU and the second HOST has been successfully established. At this time, the microservice call message is forwarded to the second HOST, thereby ensuring the successful forwarding of the microservice call message.
[0118] In order to better understand the above-mentioned technical solutions as a whole, the following is an exemplary description of the above-mentioned technical solutions in combination with specific examples. For example, the first one in the above text is represented as A and the second one is represented as B. Figure 5 The following is a schematic diagram of the construction of routing acceleration entries:
[0119] Step 1: The APP in HOST A initiates a microservice call and establishes a TCP connection with DPU A. After the TCP connection is successfully established, the microservice call message encapsulated in TCP format is sent to DPU A.
[0120] After receiving the microservice call message, the TCP acceleration engine A located in DPU A analyzes the URL address in the microservice call message, obtains the routing address corresponding to the Service that the APP needs to call, and forwards the microservice call message to the SideCar module A in DPU A if there is no first target acceleration entry matching the routing address corresponding to the APP and the Service in at least one pre-built first routing acceleration entry.
[0121] Step 2: The routing module A in the SideCar module A parses the received microservice call message and finds the routing address of the DPU B corresponding to the Service.
[0122] Step 3: Routing module A establishes a TCP connection with DPU B according to the routing address of DPU B, and after determining that the TCP connection is successfully established, forwards the microservice call message to DPU B according to the routing address of DPU B.
[0123] After receiving the microservice call message, the TCP acceleration engine B in DPU B analyzes the URL address in the microservice call message, obtains the routing address corresponding to the Service, and forwards the microservice call message to the SideCar module B in DPU B if there is no second target acceleration entry matching the routing address corresponding to the APP and the Service in at least one pre-built second routing acceleration entry.
[0124] Step 4: Routing module A sets the first routing acceleration entry matching the routing addresses of APP and DPU B in network acceleration engine A: TCP acceleration is performed on the TCP data stream (i.e., microservice call message) from APP of HOST A, and the acceleration address is the routing address of DPU B.
[0125] Step 5: The routing module B in the SideCar module B parses the received microservice call message and finds the routing address of HOST B corresponding to the Service.
[0126] Step 6: Routing module B establishes a TCP connection with HOST B according to the routing address of HOST B, and after determining that the TCP connection is successfully established, forwards the microservice call message to HOST B according to the routing address of HOST B, so that HOST B executes the Service based on the microservice call message and returns the execution result to the APP in the original path.
[0127] Step 7: Routing module B sets a second routing acceleration entry matching the routing address of APP and HOST B in network acceleration engine B: TCP acceleration is performed on the TCP data flow from APP of HOST A, and the acceleration address is the routing address of HOST B.
[0128] For further example, see Figure 6 The application diagram of the routing acceleration entry shown is:
[0129] Step 1: The APP in HOST A initiates a microservice call and sends a microservice call message encapsulated in TCP format (i.e., a TCP message) to DPU A.
[0130] Step 2: After receiving the microservice call message, the TCP acceleration engine A located in DPU A analyzes the URL address in the microservice call message, obtains the routing address corresponding to the Service that the APP needs to call, and in the case where there is a first target acceleration entry matching the routing address corresponding to the APP and the Service in at least one pre-built first routing acceleration entry, updates the network address of the microservice call message from the routing address of DPU A to the routing address of the DPUB corresponding to the Service, replaces the TCP sequence number in the microservice call message, forms new TCP header information, recalculates the TCP checksum for the microservice call message, and updates the processed message to the microservice call message.
[0131] Step 3: TCP acceleration engine A forwards the microservice call message directly to DPU B according to the network address.
[0132] Step 4: After receiving the microservice call message, the TCP acceleration engine B in DPU B analyzes the URL address in the microservice call message to obtain the routing address corresponding to the Service, and if there is a second target acceleration entry matching the routing address corresponding to the APP and the Service in at least one pre-built second routing acceleration entry, the network address of the microservice call message is updated from the routing address of DPU B to the routing address of HOST B corresponding to the Service, the TCP checksum is recalculated, the TCP sequence number is replaced, and the processed message is updated to the microservice call message.
[0133] Step 5: TCP acceleration engine B forwards the microservice call message to HOST B according to the network address, so that HOST B executes the Service based on the microservice call message and returns the execution result to the APP in the original path, thereby completing the APP's call process for the Service.
[0134] The above technical solution can significantly reduce the processing overhead of the embedded CPU in the DPU in the microservice network. After passing the routing acceleration entry set by the embedded CPU in the DPU to the network acceleration engine, the microservice call message is completely forwarded by the network acceleration engine, thereby improving the DPU's processing capability and speed for microservice call messages, and further improving the HOST's processing capability for microservice calls.
[0135] Figure 7This is a structural block diagram of a microservice invocation device provided in an embodiment of the present invention, and the device is used to execute the microservice invocation method provided in any of the above embodiments. The device and the microservice invocation method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the microservice invocation device, refer to the embodiment of the above microservice invocation method. Figure 7 The device is configured on a first data processor, the first data processor includes a first network acceleration engine, and the device may specifically include: a routing address obtaining module 510, a second data processor determining module 520 and a microservice call message first forwarding module 530.
[0136] The routing address obtaining module 510 is used to receive, through the first network acceleration engine, a microservice call message sent by an application running in the first host, and obtain a routing address corresponding to the microservice to be called by the application by analyzing the microservice call message;
[0137] A second data processor determination module 520 is configured to determine, through the first network acceleration engine, a second data processor according to the first target acceleration entry when there is a first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, wherein the microservice is deployed in the second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine;
[0138] The first microservice call message forwarding module 530 is used to forward the microservice call message to the second data processor through the first network acceleration engine, so as to forward the microservice call message to the second host through the second data processor and the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
[0139] Optionally, the microservice call message first forwarding module 530 may include:
[0140] The first forwarding submodule of the microservice call message is used to update the network address of the microservice call message from the routing address of the first data processor to the routing address of the second data processor, so as to forward the microservice call message to the second data processor based on the updated network address.
[0141] On this basis, optionally, the microservice call message is encapsulated based on a transmission control protocol format, and the first network acceleration engine includes a first transmission control protocol acceleration engine;
[0142] The first forwarding submodule of the microservice call message includes:
[0143] The network address updating unit is used to update the network address of the microservice call message from the routing address of the first data processor to the routing address of the second data processor through the first transmission control protocol acceleration engine.
[0144] On this basis, optionally, the microservice calling device further includes:
[0145] The microservice call message update module is used to replace the transmission control protocol sequence number in the microservice call message through the first transmission control protocol acceleration engine, recalculate the transmission control protocol checksum for the microservice call message, and update the processed message to the microservice call message.
[0146] Optionally, the first data processor further includes a first sidecar module, and the microservice calling device further includes:
[0147] A third forwarding module for microservice call messages, configured to forward the microservice call message to the first sidecar module through the first network acceleration engine when there is no first target acceleration entry in at least one first routing acceleration entry;
[0148] A first target acceleration entry construction module, configured to determine the second data processor based on the microservice call message through the first sidecar module, and to construct the first target acceleration entry;
[0149] The first target acceleration entry returning module is used to forward the microservice call message to the second data processor through the first sidecar module, and return the first target acceleration entry to the first network acceleration engine.
[0150] On this basis, an optional first target acceleration entry building module includes:
[0151] A routing address obtaining unit, configured to analyze a uniform resource locator address in the microservice call message to obtain a routing address of the second data processor, wherein the uniform resource locator address corresponds to the second data processor;
[0152] The first target acceleration entry construction unit is used to determine the second data processor according to the routing address of the second data processor, and to construct the first target acceleration entry according to the routing address of the second data processor and the application corresponding to the microservice call message.
[0153] Alternatively, the microservice calling device may further include:
[0154] A first connection establishing module, configured to establish a first connection with the second data processor through the first sidecar module after determining the second data processor;
[0155] The first target acceleration entry return module includes:
[0156] The first target acceleration entry returning unit is used to forward the microservice call message to the second data processor when the first connection is successfully established, and return the first target acceleration entry to the first network acceleration engine.
[0157] The microservice calling device provided by the embodiment of the present invention cooperates with each other among the routing address obtaining module, the second data processor determining module and the first forwarding module of the microservice calling message. During the microservice calling process, the pre-built first routing acceleration entry can be used, and the first network acceleration engine directly forwards the microservice calling message to the second HOST, that is, there is no need to hand over the microservice calling message to the first SideCar module for forwarding. Therefore, without increasing the server cost, the processing overhead of the first SideCar module is significantly reduced, thereby improving the processing capability of the first DPU for the microservice calling message, and ensuring the processing capability of the second HOST for the Service call.
[0158] The microservice calling device provided in the embodiment of the present invention can execute the microservice calling method provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0159] It is worth noting that in the embodiment of the above-mentioned microservice calling device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0160] Figure 8 This is a structural block diagram of another microservice invocation device provided in an embodiment of the present invention. The device can be used to execute the microservice invocation method provided in any of the above embodiments. The device and the microservice invocation method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the microservice invocation device, please refer to the embodiment of the above microservice invocation method. Figure 8 The device is configured on a second data processor, the second data processor includes a second network acceleration engine, and the device may specifically include: a microservice call message receiving module 610 and a microservice call message second forwarding module 620.
[0161] Among them, the microservice call message receiving module 610 is used to receive the microservice call message forwarded by the first data processor through the second network acceleration engine, wherein the first data processor corresponds to the first host, an application is running in the first host, the microservice call message at least represents the routing address corresponding to the microservice to be called by the application, and the microservice is deployed in the second host corresponding to the second data processor;
[0162] The microservice call message second forwarding module 620 is used to forward the microservice call message to the second host through the second network acceleration engine, when there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, so that the second host executes the microservice based on the microservice call message and returns the execution result to the application.
[0163] Optionally, the microservice call message second forwarding module 620 includes:
[0164] The second forwarding submodule of the microservice call message is used to update the network address of the microservice call message from the routing address of the second data processor to the routing address of the second host, so as to forward the microservice call message to the second host based on the updated network address.
[0165] Optionally, the second data processor further includes a second sidecar module, and the microservice calling device further includes:
[0166] A fourth forwarding module for microservice call messages, configured to forward the microservice call message to the second sidecar module through the second network acceleration engine when there is no second target acceleration entry in at least one second routing acceleration entry;
[0167] The second target acceleration entry returning module is used to construct a second target acceleration entry based on the microservice call message through the second sidecar module, forward the microservice call message to the second host, and return the second target acceleration entry to the second network acceleration engine.
[0168] On this basis, optionally, the microservice calling device further includes:
[0169] A second connection establishment module, used to analyze the microservice call message through the second sidecar module, obtain the routing address of the second host, and establish a second connection with the second host based on the routing address of the second host;
[0170] The second target acceleration entry return module includes:
[0171] The second target acceleration entry returning unit is used to forward the microservice call message to the second host when the second connection is successfully established, and return the second target acceleration entry to the second network acceleration engine.
[0172] The microservice calling device provided in the embodiment of the present invention cooperates with each other through the microservice calling message receiving module and the second forwarding module of the microservice calling message. During the microservice calling process, the pre-built second routing acceleration entry can be used, and the second network acceleration engine directly forwards the microservice calling message to the second HOST. At this time, there is no need to hand over the microservice calling message to the first SideCar module for forwarding. Therefore, without increasing the server cost, the processing overhead of the second SideCar module is significantly reduced, thereby improving the second DPU's processing capability for the microservice calling message, and ensuring the second HOST's processing capability for Service calls.
[0173] The microservice calling device provided in the embodiment of the present invention can execute the microservice calling method provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0174] It is worth noting that in the embodiment of the above-mentioned microservice calling device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0175] Fig. 9 A schematic diagram of the structure of a first data processor (i.e., a first DPU) or a second data processor (i.e., a second DPU) 10 that can be used to implement an embodiment of the present invention is shown. In practical applications, optionally, the first DPU or the second DPU can be configured on an electronic device. Among them, the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0176] like Fig. 9As shown, the first DPU or the second DPU 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the first DPU or the second DPU 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0177] Multiple components in the first DPU or the second DPU 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the first DPU or the second DPU 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0178] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a microservice calling method.
[0179] In some embodiments, the microservice invocation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the first DPU or the second DPU 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the microservice invocation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the microservice invocation method in any other appropriate manner (e.g., by means of firmware).
[0180] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0181] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0182] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] To provide interaction with a user, the systems and techniques described herein may be implemented on a first DPU or a second DPU having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the first DPU or the second DPU. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0184] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0185] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0186] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0187] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A microservice calling method, characterized in that: Applied to a first data processor, the first data processor comprising a first network acceleration engine, the method comprising: The following steps are performed by the first network acceleration engine: Receiving a microservice call message sent by an application running in the first host, and obtaining a routing address corresponding to the microservice to be called by the application by analyzing the microservice call message; In the case where there is a first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, a second data processor is determined according to the first target acceleration entry, wherein the microservice is deployed in a second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine; The microservice call message is forwarded to the second data processor, so that the second data processor forwards the microservice call message to the second host via the second network acceleration engine, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
2. The method according to claim 1, characterized in that: The forwarding the microservice call message to the second data processor includes: The network address of the microservice call message is updated from the routing address of the first data processor to the routing address of the second data processor, so as to forward the microservice call message to the second data processor based on the updated network address.
3. The method according to claim 2, characterized in that The microservice call message is encapsulated based on a transmission control protocol format, the first network acceleration engine includes a first transmission control protocol acceleration engine, and the network address of the microservice call message is updated from the routing address of the first data processor to the routing address of the second data processor, including: Through the first transmission control protocol acceleration engine, the network address of the microservice call message is updated from the routing address of the first data processor to the routing address of the second data processor.
4. The method according to claim 3, characterized in that Also includes: The first transmission control protocol acceleration engine is used to replace the transmission control protocol sequence number in the microservice call message, and the transmission control protocol checksum is recalculated for the microservice call message, and the message obtained after processing is updated as the microservice call message.
5. The method according to claim 1, characterized in that The first data processor further includes a first sidecar module, and the method further includes: By means of the first network acceleration engine, when the first target acceleration entry does not exist in the at least one first routing acceleration entry, forwarding the microservice call message to the first sidecar module; Determine the second data processor based on the microservice call message through the first sidecar module, and construct the first target acceleration entry; The microservice call message is forwarded to the second data processor through the first sidecar module, and the first target acceleration entry is returned to the first network acceleration engine.
6. The method according to claim 5, characterized in that Determining the second data processor based on the microservice call message, and constructing the first target acceleration entry, including: Analyze the uniform resource locator address in the microservice call message to obtain the routing address of the second data processor, wherein the uniform resource locator address corresponds to the second data processor; The second data processor is determined according to the routing address of the second data processor, and the first target acceleration entry is constructed according to the routing address of the second data processor and the application corresponding to the microservice call message.
7. The method according to claim 5, characterized in that Also includes: After determining the second data processor, establishing a first connection with the second data processor through the first sidecar module; The forwarding the microservice call message to the second data processor, and returning the first target acceleration entry to the first network acceleration engine, includes: When the first connection is successfully established, the microservice call message is forwarded to the second data processor, and the first target acceleration entry is returned to the first network acceleration engine.
8. A microservice calling method, characterized in that: Applied to a second data processor, the second data processor comprising a second network acceleration engine, the method comprising: The second network acceleration engine performs the following steps: Receive a microservice call message forwarded by a first data processor, wherein the first data processor corresponds to a first host, an application program is running in the first host, the microservice call message at least represents a routing address corresponding to a microservice to be called by the application program, and the microservice is deployed in a second host corresponding to the second data processor; In the case where there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, the microservice call message is forwarded to the second host, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
9. The method according to claim 8, characterized in that The forwarding the microservice call message to the second host includes: The network address of the microservice call message is updated from the routing address of the second data processor to the routing address of the second host, so as to forward the microservice call message to the second host based on the updated network address.
10. The method according to claim 8, characterized in that The second data processor further includes a second sidecar module, and the method further includes: By means of the second network acceleration engine, when the second target acceleration entry does not exist in the at least one second routing acceleration entry, forwarding the microservice call message to the second sidecar module; Through the second sidecar module, the second target acceleration entry is constructed based on the microservice call message, and the microservice call message is forwarded to the second host, and the second target acceleration entry is returned to the second network acceleration engine.
11. The method according to claim 10, characterized in that Also includes: By using the second sidecar module, the microservice call message is analyzed to obtain the routing address of the second host, and a second connection is established with the second host based on the routing address of the second host; The forwarding the microservice call message to the second host, and returning the second target acceleration entry to the second network acceleration engine, includes: When the second connection is successfully established, the microservice call message is forwarded to the second host, and the second target acceleration entry is returned to the second network acceleration engine.
12. A microservice calling device, characterized in that: Configured in a first data processor, the first data processor includes a first network acceleration engine, the device includes: The routing address obtaining module is used to receive, through the first network acceleration engine, a microservice call message sent by an application running in the first host, and obtain a routing address corresponding to the microservice to be called by the application by analyzing the microservice call message: a second data processor determination module, configured to determine, by the first network acceleration engine, a second data processor according to the first target acceleration entry when there is a first target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built first routing acceleration entry, wherein the microservice is deployed in a second host corresponding to the second data processor, and the second data processor includes a second network acceleration engine; The first forwarding module for microservice call messages is used to forward the microservice call messages to the second data processor through the first network acceleration engine, so as to forward the microservice call messages to the second host through the second data processor and via the second network acceleration engine, so that the second host executes the microservice based on the microservice call messages and returns the obtained execution results to the application.
13. A microservice calling device, characterized in that: Configured in a second data processor, the second data processor includes a second network acceleration engine, the device includes: A microservice call message receiving module is used to receive a microservice call message forwarded by a first data processor through the second network acceleration engine, wherein the first data processor corresponds to a first host, an application is running in the first host, and the microservice call message at least represents a routing address corresponding to a microservice to be called by the application, and the microservice is deployed in a second host corresponding to the second data processor: The second forwarding module for microservice call messages is used to forward the microservice call message to the second host through the second network acceleration engine, when there is a second target acceleration entry matching the routing address corresponding to the application and the microservice in at least one pre-built second routing acceleration entry, so that the second host executes the microservice based on the microservice call message and returns the obtained execution result to the application.
14. A first data processor, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the microservice calling method according to any one of claims 1 to 7.
15. A second data processor, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the microservice calling method according to any one of claims 8 to 11.
16. An electronic device, characterized in that: The device is provided with a first data processor as claimed in claim 14 or a second data processor as claimed in claim 15.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the microservice calling method as described in any one of claims 1-7, or 8-11 when executed.
