Load balancing method of service grid based on DPU, service grid of DPU, electronic equipment and computer storage medium
By using the state prediction model in the DPU's service mesh to predict the future state of multiple data processor DPUs, the problem of traditional load balancing strategies failing to predict future dynamic traffic changes is solved, and more accurate load balancing and higher infrastructure utilization is achieved.
Patent Information
- Application Number
- CN202411583384.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-28
AI Technical Summary
Traditional load balancing strategies such as the minimum number of requests strategy only considers the current request volume and fails to effectively predict future dynamic traffic changes, resulting in load imbalance, especially in the case of long links, which may lead to cluster traffic imbalance.
By deploying a state prediction model in the service grid of the DPU, the first state information of multiple data processor DPUs is obtained, and prediction is made based on this information and upstream traffic, and the future state is determined, thereby selecting the most suitable target data processor DPU to receive upstream traffic.
More precise load balancing is achieved based on real-time load and future dynamic traffic changes trends, avoiding load imbalance and resource waste, and improving the utilization and efficiency of the overall infrastructure.
Smart Images

Figure CN119728550A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing, and in particular to a load balancing method for a DPU-based service grid, a DPU service grid, an electronic device, and a computer storage medium. Background Art
[0002] Istio is an open source service mesh that transparently layers onto existing distributed applications. Istio's powerful features provide a unified and more efficient way to secure, connect, and monitor services. Istio is the path to load balancing, service-to-service authentication, and monitoring.
[0003] At present, the separation of the control plane and data plane of the DPU service grid enables it to flexibly manage and adjust traffic, and provides a series of flexible load balancing strategies, such as the least number of requests (Least Requests) and other strategies. Through the above load balancing strategies, requests can be evenly distributed to each node to avoid traffic overheating and improve the stability and availability of the system. It can also ensure that the load of each node is relatively balanced, so that the entire infrastructure can be used more evenly, avoiding waste and overload of resources, thereby improving the utilization and efficiency of the overall infrastructure.
[0004] However, the above load balancing strategies, such as the minimum number of requests strategy, only consider the number of requests, and do not consider the changing trend of dynamic traffic in the future. This means that even if an endpoint currently has the least number of requests, it may face higher request pressure in the future, resulting in load imbalance. Especially when the connection is a long link, not considering the performance in the future will cause cluster traffic imbalance. Summary of the invention
[0005] In view of this, the present application provides a load balancing method of a DPU-based service grid, a DPU service grid, an electronic device and a computer storage medium to solve the problem that traditional solutions perform poorly in load balancing.
[0006] A first aspect of the present application provides a load balancing method for a DPU-based service grid, comprising: when a data plane receives uplink traffic that needs to be sent to a data processor DPU among multiple data processors DPUs, obtaining first status information of the multiple data processors DPUs, wherein the data traffic of the multiple data processors DPUs is processed by the same data plane agent; determining predicted status information corresponding to each data processor DPU based on the first status information of each data processor DPU and the uplink traffic, wherein the predicted status information is used to indicate the status of the uplink traffic after inputting the data processor DPU; and determining a target data processor DPU for receiving the uplink traffic based on the predicted status information corresponding to the multiple data processors DPUs.
[0007] Optionally, the process of determining the predicted state information corresponding to each data processor DPU based on the first state information of each data processor DPU and the uplink traffic may also include: inputting the first state information of each data processor DPU and the uplink traffic into a state prediction model deployed on the data plane, and obtaining the predicted state information output by the state prediction model.
[0008] Optionally, the service grid-based load balancing process may also include: when the data plane receives uplink traffic that needs to be sent to a data processor DPU among the multiple data processors DPU, calling a pre-set load balancing strategy, and determining the state prediction model based on the load balancing strategy.
[0009] Optionally, the first status information includes the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate and the traffic packet loss rate of the data processor DPU.
[0010] Optionally, the first status information also includes a usage rate of a CPU on which the data processor DPU is deployed.
[0011] Optionally, the state prediction model is trained in the following manner: inputting data flow into multiple data processors DPU, collecting second state information of the multiple data processors DPU at a first moment, and determining the initial value of each parameter in the second state information; obtaining third state information of the multiple data processors DPU at the next moment after the first moment, and determining the change value of each parameter based on the third state information; obtaining a pre-trained model based on the initial value of each parameter and the change value of each parameter; obtaining fourth state information of the multiple data processors DPU at a third moment, and determining the state value of each parameter in the fourth state information; obtaining the predicted value of each parameter output by the pre-trained model at the third moment; optimizing the pre-trained model based on the state value of each parameter and the predicted value of each parameter to obtain the state prediction model.
[0012] A second aspect of the present application provides a service grid of a DPU, comprising: a data plane, a control plane and a state prediction model, wherein the state prediction model is deployed in the data plane; the data plane is used to proxy and process data traffic of multiple data processors DPUs; the control plane is used to obtain first state information of the multiple data processors DPUs when the data plane receives uplink traffic that needs to be sent to a data processor DPU among the multiple data processors DPUs, input the first state information of each data processor DPU and the uplink traffic into the state prediction model deployed in the data plane, obtain the predicted state information corresponding to each data processor DPU output by the state prediction model, and determine the target data processor DPU for receiving the uplink traffic based on the predicted state information corresponding to the multiple data processors DPUs, wherein the predicted state information is used to indicate the state of the uplink traffic after being input into the data processor DPU.
[0013] The third aspect of the present application provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect of the embodiment.
[0014] A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of the embodiment.
[0015] In a fifth aspect, the present application provides a computer program product, including computer instructions, which instruct a computing device to perform operations corresponding to the method described in the first aspect of the embodiment.
[0016] The present application predicts the states of multiple data processors DPUs after receiving uplink traffic, obtains predicted state information after the first state information characterizing the actual traffic state of multiple data processors DPUs changes, and can perform load balancing based on the real-time load of the data processor DPU. It integrates the changing trends of future dynamic traffic of multiple data processors DPUs to make the load balancing results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0018] Figure 1 This is a flowchart of the steps of a load balancing method of a DPU-based service grid according to an embodiment of the present application;
[0019] Figure 2 This is a flowchart of the steps of the state prediction model training method according to one embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a service grid of a DPU according to an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0023] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0024] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0025] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.
[0026] Istio is an open source service mesh platform for connecting, securing, controlling and observing microservices. It provides a simple and powerful way for services to communicate with each other, and provides a range of features, including traffic management, security, observability, etc. The service mesh has rich network governance capabilities for the seven-layer protocol, and its design goal is to provide comprehensive management and control capabilities for the microservice architecture, including but not limited to traffic management, security, observability, etc. The separation of the control plane and the data plane of the service mesh enables it to flexibly manage and adjust traffic, and provides a series of flexible load balancing strategies, among which EDS (Endpoint Discovery Service) is one of the manifestations of control information in the Istio service mesh, and load balancing strategy is an important function. A good service mesh load balancing strategy can prevent some nodes in the microservice architecture from being overloaded due to too many requests, while other nodes may be relatively idle. Through the load balancing strategy, requests can be evenly distributed to each node to avoid traffic overheating and improve the stability and availability of the system. In addition, a scientific load balancing strategy can ensure that the load of each node is relatively balanced, so that the entire infrastructure can be used more evenly, avoiding waste and overload of resources, thereby improving the utilization and efficiency of the overall infrastructure.
[0027] Load balancing strategy directly affects the performance and availability of services. A reasonable load balancing strategy can improve business performance and user experience, and ensure high availability and low latency of services. Currently, the service grid provides a variety of load balancing strategies, including least requests, random mode, weighted mode, polling mode, etc. Least Requests: distribute requests to the instance with the least number of requests; Random mode: randomly forward requests to instances in the pool; Weighted mode: forward requests to instances in the pool according to a specific percentage; Round Robin: forward requests to each instance in the pool in turn.
[0028] For the above load balancing strategies, the weighted mode relies on a specific percentage and is suitable for service upgrades or rollbacks. By setting weights to control the distribution ratio of traffic, the traffic is gradually switched from the old version to the new version, thereby reducing the risk of the system. It belongs to artificial control of traffic to make it unevenly distributed. Random mode and polling mode send requests to upstream nodes evenly in the eyes of the requester, but they do not consider the load of the requested node. This means that although the requester evenly requests the upstream available endpoints, in fact, the requested endpoint may not be able to effectively handle more requests due to overheating. As the officially recommended default load balancing mode, the minimum request number mode overcomes the shortcomings of the random mode and the weighted mode and makes the traffic more balanced from the perspective of the requester's load. However, the minimum request number mode only considers the endpoint with the least current request volume, and does not consider the changing trend of dynamic traffic in the future. This means that even if an endpoint currently has the least number of requests, it may face higher request pressure in the future, resulting in load imbalance, especially when the connection is a long link. If the performance in the future is not considered, it will cause cluster traffic imbalance. The minimum request number mode only focuses on the number of requests, without considering the number of bytes requested, the processing capacity of the node, performance, indicators, network I / O load, etc. In this way, although the endpoint with a small number of requests is allocated, if the actual processing capacity and load of the node where the endpoint is located are not good, the upstream may not be able to effectively process the request due to poor performance or high load, thus affecting online business.
[0029] In a dynamic environment, load conditions and performance indicators may change, and the minimum request number mode cannot adapt to such changes, which may lead to load imbalance or performance degradation. If a node temporarily experiences performance degradation or network failure for some reason, the minimum request number mode cannot detect this situation and make adjustments, which may cause requests to be concentrated on the failed node, affecting the stability and availability of the system. Therefore, the present application proposes a load balancing method based on a service grid, a service grid, an electronic device, and a computer storage medium to at least partially solve the above problems.
[0030] Figure 1 FIG. 1 is a flow chart of the steps of a load balancing method based on a DPU service grid according to an embodiment of the present application. Figure 1 As shown, the load balancing method of the DPU-based service grid includes the following steps:
[0031] Step 101: When a data plane receives uplink traffic that needs to be sent to a data processor DPU among multiple data processors DPU, first status information of the multiple data processors DPU is obtained.
[0032] Step 102: Determine predicted state information corresponding to each data processor DPU according to the first state information of each data processor DPU and the uplink traffic.
[0033] Step 103: Determine a target data processor DPU for receiving uplink traffic according to the prediction state information corresponding to the multiple data processors DPU.
[0034] In the seven-layer (application layer) load balancing, when the data sender, such as a client, needs to send uplink traffic, such as inbound traffic, to a system including multiple data processors DPUs, the inbound traffic will first be sent to the data plane (Envoy) of the service grid. Since the data traffic of multiple data processors DPUs is processed by the same data plane proxy, that is, the data plane needs to control which data processor DPU the inbound traffic flows to, and is the proxy that actually processes the traffic, and the control plane (Istiod) of the service grid needs to control the behavior of the data plane, in order to achieve load balancing, it is necessary to first obtain the first state information of the multiple data processors DPU controlled by the data plane. The first state information indicates the real-time operating state of the data processor DPU, and then perform a prediction operation based on the first state information and the uplink traffic, that is, predict the result of the change of the first state information of multiple data processors DPU after receiving the uplink traffic, which can characterize the state of the uplink traffic after the input of the data processor DPU, that is, predict the state information. After obtaining the predicted state information, the predicted state information can be judged to determine the most suitable target data processor DPU from multiple data processors DPU. The control plane will control the data plane so that the data plane controls the uplink traffic to be sent to the target data processor DPU.
[0035] Specifically, the first status information includes the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate and the traffic packet loss rate of the data processor DPU.
[0036] In order to understand the real-time running status of the data processor DPU, the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate and the traffic packet loss rate of the data processor DPU in multiple data processors DPUs can be obtained.
[0037] For example, the first state information of the data processor DPU1 includes: the number of traffic bytes is 500, the number of traffic requests is 2, the traffic delay time value is 3, the memory usage rate of the data processor DPU is 80%, and the traffic packet loss rate is 15%; the first state information of the data processor DPU2 includes: the number of traffic bytes is 800, the number of traffic requests is 2, the traffic delay time value is 2, the memory usage rate of the data processor DPU is 60%, and the traffic packet loss rate is 10%. It can be seen that if the minimum request number load balancing strategy is used, the number of traffic requests of the data processor DPU1 is less than the number of traffic requests of the data processor DPU2, then the traffic will be sent to the data processor DPU1, but at this time the traffic delay time value of the data processor DPU1, the memory usage rate of the data processor DPU and the traffic packet loss rate are not better than those of the data processor DPU2, and the memory usage rate of the data processor DPU1 is already at a high value, which is not the optimal solution. The first state information will comprehensively consider multiple state parameters: the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate of the data processor DPU and the traffic packet loss rate, so the traffic will be sent to the data processor DPU2.
[0038] Since the first status information includes the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate and the traffic packet loss rate of the data processor DPU, it can more comprehensively consider the real-time status of multiple data processors DPU, making load balancing more reasonable.
[0039] Furthermore, the first status information also includes a usage rate of a CPU on which the data processor DPU is deployed.
[0040] The CPU utilization rate can determine the load of the data processor DPU deployed on it. The higher the CPU utilization rate, the lower the additional load that the data processor DPU can use. Therefore, including the CPU utilization rate on which the data processor DPU is deployed in the first status information can better understand the real-time status of the data processor DPU.
[0041] In an embodiment of the present application, by predicting the states of multiple data processors DPUs after receiving uplink traffic, predicted state information after the first state information characterizing the actual traffic state of the multiple data processors DPUs is obtained, and load balancing can be performed based on the real-time load of the data processor DPU. The change trend of future dynamic traffic of multiple data processors DPUs is integrated to make the load balancing result more accurate.
[0042] In a possible implementation manner, the process of determining the predicted state information corresponding to each data processor DPU according to the first state information of each data processor DPU and the uplink traffic may also include:
[0043] The first state information of each data processor DPU and the uplink traffic are input into a state prediction model deployed on the data plane to obtain the predicted state information output by the state prediction model.
[0044] The prediction of the state of each data processor DPU after inputting the uplink traffic can be realized through a state prediction model, which is pre-deployed on the data plane. For example, the state prediction model can be a state equation based on a Kalman filter, and the first state information of each data processor DPU is input as observation information to quantitatively infer the state of each data processor DPU after inputting the uplink traffic, and determine the predicted state information corresponding to each data processor DPU.
[0045] In the embodiment of the present application, the state of each data processor DPU after inputting the uplink traffic is predicted through the state prediction model, which has higher accuracy.
[0046] In one possible implementation, the service grid-based load balancing process may also include:
[0047] When the data plane receives uplink traffic that needs to be sent to a data processor DPU among multiple data processors DPUs, a pre-set load balancing strategy is called, and a state prediction model is determined according to the load balancing strategy.
[0048] When the state prediction model is deployed in the data plane, a load balancing strategy will be added to the control plane at the same time. For example, the state prediction model is a state equation based on a Kalman filter. At the same time, a Kalman-type load balancing strategy variable will be added to the control plane. When the data plane receives uplink traffic that needs to be sent to one of multiple data processors DPU, a destination rule is specified in the uplink traffic, which indicates that the load balancing strategy used is of the Kalman type. At this time, the control plane will call the Kalman-type load balancing strategy variable in response to the destination rule specified in the uplink traffic, determine the state prediction model required for the load balancing operation, and then predict the state information of multiple data processors DPU.
[0049] In an embodiment of the present application, by setting a load balancing strategy in the control plane, when the data plane receives uplink traffic that needs to be sent to one of the multiple data processors DPU, the corresponding state prediction model can be called to predict the state information of the multiple data processors DPU.
[0050] Figure 2is a flowchart of the steps of the state prediction model training method of an embodiment of the present application, such as Figure 2 As shown, the state prediction model training method includes the following steps:
[0051] Step 201: input data traffic to multiple data processors DPU, collect second state information of the multiple data processors DPU at a first moment, and determine the initial value of each parameter in the second state information.
[0052] Step 202: Obtain third state information of multiple data processors DPU at the next moment after the first moment, and determine the change value of each parameter according to the third state information.
[0053] Step 203: Obtain a pre-trained model according to the initial value of each parameter and the change value of each parameter.
[0054] Step 204: Obtain fourth state information of the plurality of data processors DPU at the third moment, and determine a state value of each parameter in the fourth state information.
[0055] Step 205: Obtain the predicted value of each parameter output by the pre-trained model at the third moment.
[0056] Step 206: Optimize the pre-trained model according to the state value of each parameter and the predicted value of each parameter to obtain a state prediction model.
[0057] In order to train the state prediction model, it is first necessary to input a certain amount of data flow into multiple data processors DPU so that the multiple data processors DPU are in working state. Then, the multiple data processors DPU obtain the second state information at the first moment. Each parameter in the obtained second state information is the initial value reflecting the state of the data processor DPU. Each parameter in the second state information may include the number of flow bytes, the number of flow requests, the flow delay time value, the memory usage rate of the data processor DPU, the flow packet loss rate and the CPU usage rate of the data processor DPU. Further obtain the third state information of the multiple data processors DPU at the next moment after the first moment, and determine the change value of each parameter according to the third state information. At this time, the change of each parameter reflecting the state of the multiple data processors DPU has been known, and then the variance of each parameter at the next moment after the first moment and the first moment can be determined, and the initial matrix P of the state covariance can be further determined. At the same time, the state transfer matrix F can be determined according to the change value of each parameter, and then the pre-training model is constructed according to P and F. Then, the predicted value of each parameter at the third moment is predicted by the pre-trained model, and the third state information of multiple data processors DPU at the next moment after the first moment is obtained. The change value of each parameter is determined according to the third state information. By comparing the predicted value and the change value of each parameter, the prediction error can be obtained, and the state transition covariance matrix Q is determined according to the variance of the prediction error. Furthermore, the control matrix B that represents the influence of the external control quantity on the flow value can be determined according to the system, business requirements, external events and other information including multiple data processors DPU, and the initial state values of multiple data processors DPU are corrected according to B. Then, according to Q and the observed values of each parameter obtained by real-time observation of multiple data processors DPU, the pre-trained model is iteratively optimized to obtain a state prediction model.
[0058] In the embodiment of the present application, by describing the change training model of each parameter of the data processor DPU state at different times, the obtained state prediction model can predict the state information of the data processor DPU that changes over time.
[0059] Figure 3 Schematic diagram of a service grid of a DPU according to an embodiment of the present application. Figure 3 The service grid 300 of the DPU includes: a data plane 301 , a control plane 302 , and a state prediction model 303 , wherein the state prediction model 303 is deployed in the data plane 301 .
[0060] The data plane 301 is used for proxy processing of data traffic of multiple data processors DPU30. The control plane 302 is used for, when the data plane 301 receives uplink traffic that needs to be sent to one of the multiple data processors DPU30, obtaining first state information of the multiple data processors DPU30, inputting the first state information of each data processor DPU30 and the uplink traffic into the state prediction model 303 deployed on the data plane 301, obtaining the predicted state information corresponding to each data processor DPU30 output by the state prediction model 303, and determining the target data processor DPU for receiving the uplink traffic according to the predicted state information corresponding to the multiple data processors DPU30, wherein the predicted state information is used to indicate the state of the uplink traffic after being input into the data processor DPU30.
[0061] In the seven-layer (application layer) load balancing, when the data sender, such as a client, needs to send uplink traffic, such as inbound traffic, to a system including multiple data processors DPU, the inbound traffic will first be sent to the data plane (Envoy) 301 of the DPU service grid 300. Since the data traffic of multiple data processors DPU30 is processed by the same data plane 301, that is, the data plane 301 needs to control which data processor DPU30 the inbound traffic flows to, and is the agent that actually processes the traffic, and the control plane (Istiod) 302 of the DPU service grid 300 needs to control the behavior of the data plane 301, in order to achieve load balancing, it is necessary to first obtain the first state information of the multiple data processors DPU30 controlled by the data plane 301, the first state information indicates the real-time running state of the data processor DPU30, and then perform a prediction operation based on the first state information and the uplink traffic, that is, predict the result of the change of the first state information of the multiple data processors DPU30 after receiving the uplink traffic, which can characterize the state after the uplink traffic enters the data processor DPU30, that is, predict the state information. After obtaining the predicted state information, the predicted state information can be judged to determine the most suitable target data processor DPU from multiple data processors DPU30. The control plane 302 will control the data plane 301 so that the data plane 301 controls the uplink traffic to be sent to the target data processor DPU.
[0062] In an embodiment of the present application, by predicting the states of multiple data processors DPU30 after receiving uplink traffic, predicted state information after the first state information characterizing the actual traffic state of multiple data processors DPU30 is obtained, and load balancing can be performed based on the real-time load of the data processor DPU30. The change trend of future dynamic traffic of multiple data processors DPU30 is integrated to make the load balancing result more accurate.
[0063] In this embodiment, an electronic device 400 is provided, such as Figure 4 As shown, the electronic device 400 may include: a processor 401, a communications interface 402, a memory 403, and a communication bus 404. Among them:
[0064] The processor 401 , the communication interface 402 , and the memory 403 communicate with each other via the communication bus 404 .
[0065] The communication interface 402 is used to communicate with other electronic devices or servers.
[0066] The processor 401 is used to execute the program 405, and specifically can execute the relevant steps in the aforementioned DPU-based service grid load balancing method embodiment.
[0067] Specifically, the program 405 may include program codes, which include computer operation instructions.
[0068] The processor 401 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or may be configured as one or more integrated circuits. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0069] The memory 403 is used to store the program 405. The memory 403 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0070] The program 405 can be specifically used to enable the processor 401 to execute the load balancing method of the DPU-based service grid in the aforementioned embodiment.
[0071] The specific implementation of each step in program 405 can refer to the corresponding description of the corresponding steps and units in the aforementioned load balancing method embodiment based on the service grid, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiment, which will not be repeated here.
[0072] The electronic device 400 of the embodiment of the present application predicts the state of multiple data processors DPU after receiving uplink traffic, obtains predicted state information after the first state information characterizing the actual traffic state of multiple data processors DPU changes, and can perform load balancing based on the real-time load of the data processor DPU, and integrates the change trend of future dynamic traffic of multiple data processors DPU to make the load balancing result more accurate.
[0073] In this embodiment, a computer-readable storage medium is provided, storing instructions for causing a machine to execute the load balancing method for a DPU-based service grid as described herein. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device is enabled to read and execute the program code stored in the storage medium.
[0074] In this case, the program code read from the storage medium itself can implement the functions in the above method embodiments, so the program code and the storage medium storing the program code constitute part of the present application.
[0075] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0076] In this embodiment, a computer program product is provided, including computer instructions, which instruct a computing device to perform operations corresponding to the above method embodiments.
[0077] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0078] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here. Although the present application has been shown and described with respect to one or more implementations, those skilled in the art will think of equivalent deformations and modifications based on the reading and understanding of this specification and the accompanying drawings. The present application includes all such modifications and variations, and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-described components, the terms used to describe such components are intended to correspond to any component that performs the specified function of the component (e.g., which is functionally equivalent) (unless otherwise indicated), even if not structurally equivalent to the disclosed structure that performs the function in the exemplary implementation of the present specification shown herein.
[0079] That is, the above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, such as the mutual combination of technical features between the embodiments, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
[0080] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0081] In order to enable any technician in the field to implement and use the application, the application provides the above description. In the above description, various details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the application can also be implemented without using these specific details. In other embodiments, the well-known process will not be elaborated in detail to avoid unnecessary details that make the description of the application obscure. Therefore, the application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the application.
[0082] It should be noted that, under the premise of no conflict, the various embodiments and / or the technical features in the various embodiments described in this application can be arbitrarily combined with each other, and the technical solution obtained after the combination should also fall within the protection scope of this application.
[0083] It should be understood that the specific examples in the embodiments of the present application are only to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and these improvements or modifications all fall within the scope of protection of the present application. The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.
Claims
1. A load balancing method for a service grid based on a DPU, characterized in that: include: When the data plane receives uplink traffic that needs to be sent to a data processor DPU among multiple data processors DPU, first state information of the multiple data processors DPU is obtained, wherein the data traffic of the multiple data processors DPU is processed by the same data plane agent; Determine predicted state information corresponding to each data processor DPU according to the first state information of each data processor DPU and the uplink traffic, wherein the predicted state information is used to indicate the state of the uplink traffic after it is input into the data processor DPU; A target data processor DPU for receiving the uplink traffic is determined according to the prediction state information corresponding to the multiple data processors DPU.
2. The method according to claim 1, characterized in that The step of determining predicted state information corresponding to each data processor DPU according to the first state information of each data processor DPU and the uplink traffic includes: The first state information of each data processor DPU and the uplink traffic are input into a state prediction model deployed on the data plane to obtain the predicted state information output by the state prediction model.
3. The method according to claim 2, characterized in that The method further comprises: When the data plane receives uplink traffic that needs to be sent to a data processor DPU among the multiple data processors DPU, a preset load balancing strategy is called, and the state prediction model is determined according to the load balancing strategy.
4. The method according to claim 1, characterized in that: The first status information includes the number of traffic bytes, the number of traffic requests, the traffic delay time value, the memory usage rate and the traffic packet loss rate of the data processor DPU.
5. The method according to claim 4, characterized in that The first status information also includes the usage rate of the CPU on which the data processor DPU is deployed.
6. The method according to claim 2, characterized in that The state prediction model is trained in the following way: Inputting data traffic to a plurality of data processors DPU, collecting second state information of the plurality of data processors DPU at a first moment, and determining an initial value of each parameter in the second state information; Acquire third state information of the multiple data processors DPU at a time point next to the first time point, and determine a change value of each parameter according to the third state information; Obtaining a pre-trained model according to the initial values of the parameters and the change values of the parameters; Acquire fourth state information of the multiple data processors DPU at a third moment, and determine a state value of each parameter in the fourth state information; Obtaining predicted values of each parameter output by the pre-trained model at the third moment; The pre-trained model is optimized according to the state values of the parameters and the predicted values of the parameters to obtain the state prediction model.
7. A DPU service grid, comprising: A data plane, a control plane and a state prediction model, wherein the state prediction model is deployed in the data plane; The data plane is used for proxy processing of data traffic of multiple data processors DPU; The control plane is used to obtain first status information of the multiple data processors DPUs when the data plane receives uplink traffic that needs to be sent to a data processor DPU among the multiple data processors DPUs, input the first status information of each data processor DPU and the uplink traffic into a state prediction model deployed on the data plane, obtain the predicted status information corresponding to each data processor DPU output by the state prediction model, and determine the target data processor DPU for receiving the uplink traffic based on the predicted status information corresponding to the multiple data processors DPUs, wherein the predicted status information is used to indicate the state of the uplink traffic after being input into the data processor DPU.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the method according to any one of claims 1 to 6.
9. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the method according to any one of claims 1 to 6.