Network traffic load balancing method, apparatus, computer device and storage medium
By acquiring elastic network interface cards, sending queues, and service information of target network traffic in the data center, and using port mapping tables for traffic distribution, the problem of insufficient load balancing stability in network traffic processing in the data center is solved, achieving stable network traffic distribution and bandwidth utilization.
Patent Information
- Application Number
- CN202411770476.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-04
AI Technical Summary
As the scale of servers and the number of business users increase in data centers, network traffic processing involves frequent migrations, leading to insufficient load balancing stability.
By acquiring the elastic network interface card, sending queue, and service information of the target network traffic, the traffic identifier is determined, and the traffic is distributed to the corresponding physical port according to the pre-configured port mapping table. The port mapping table is used to distribute traffic based on network traffic demand, avoiding dynamic migration and improving load balancing stability.
It achieves balanced traffic distribution in any host-side application scenario, reduces the probability of unbalanced physical port load, and improves the stability of network traffic load balancing and bandwidth utilization.
Smart Images

Figure CN119520408B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network communication, and in particular to a network traffic load balancing method and device, a computer device, a storage medium and a computer program product. BACKGROUND
[0002] Servers in a data center can be equipped with various types of network cards to provide network transmission services for different services. The network cards can include ordinary standard network cards, acceleration network cards and intelligent network cards. The network cards in the servers can distribute traffic in the servers to ensure that each service and user can stably use network services. The traffic can be distributed through multiple physical ports.
[0003] In the related art, the intelligent network card on the server side can perceive the load pressure of the physical port and perform event-based feedback adjustment, thereby dynamically adjusting the network traffic and migrating the network traffic to a physical port with a relatively low bandwidth utilization rate. However, as the scale of the data center server increases, the number of services and users to be processed by the data center increases, and the traffic application scenario is more complex, the related technology can cause frequent network traffic migration, which causes the network traffic processing to have a sequential problem, thereby resulting in insufficient stability of load balancing. SUMMARY
[0004] Therefore, it is necessary to provide a network traffic load balancing method, device, computer device, computer readable storage medium and computer program product capable of improving the stability of physical port load balancing to solve the above technical problems.
[0005] In a first aspect, the present application provides a network traffic load balancing method. The method comprises:
[0006] obtaining target network traffic sent by a host side, determining an elastic network card to which the target network traffic belongs, a sending queue to which the target network traffic belongs, and a service to which the target network traffic belongs, and determining a traffic identifier of the target network traffic according to the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs;
[0007] determining a physical port number corresponding to the traffic identifier in a link aggregation group according to a preconfigured port mapping table; the port mapping table is determined based on network traffic requirements configured by the host side; the network traffic requirements are determined based on basic information of the elastic network card, basic information of the sending queue of each elastic network card, and bandwidth of the service; and the link aggregation group is used to implement network traffic requirements of different services in each host side and share physical link bandwidth;
[0008] The target network traffic is shunted to a physical port corresponding to the physical port number, so that the physical port processes the target network traffic.
[0009] In one of the embodiments, the method further comprises:
[0010] The ID of the elastic network card to which the target network traffic belongs, the ID of the sending queue to which the target network traffic belongs, and the ID of the service to which the target network traffic belongs are combined to obtain an identification combination.
[0011] The identification combination is processed by a preset hash algorithm to obtain a hash value corresponding to the identification combination, and the hash value is determined as the traffic ID of the target network traffic.
[0012] In one of the embodiments, the method further comprises:
[0013] Configuration information of each host side when an instance is created is obtained; the configuration information includes basic information corresponding to an elastic network card, a sending queue, and a service bandwidth of the host side; the basic information includes at least one of a service type, a quantity, a bandwidth, a bandwidth type, and a belonging relationship;
[0014] According to the configuration information, network traffic requirements of each host side under various service conditions are determined; the service conditions are application scenarios in which services of each service type are forwarded in different elastic network cards and different sending queues;
[0015] According to the network traffic requirements of each host side and the total bandwidth of a link aggregation group corresponding to the host side, a port mapping table of the host side under each service condition is determined; the port mapping table includes physical port numbers corresponding to traffic identifiers under each service condition.
[0016] In one of the embodiments, the method further comprises:
[0017] For each service condition of the host side, an estimated bandwidth corresponding to each service condition is determined according to the network traffic requirement of the host side;
[0018] According to a service type corresponding to the service condition, a number range of the physical port number is determined; the physical port number and the service type have a corresponding relationship; a total bandwidth of a port corresponding to the physical port number is not greater than a total bandwidth of a link aggregation group corresponding to the host side;
[0019] According to the actual bandwidth of each physical port in the number range and the estimated bandwidth corresponding to the service case, a target port number matched in the link aggregation group is determined;
[0020] A mapping relationship between a flow identifier in the service case and the target port number is determined, and mapping relationships in each service case are combined to obtain the port mapping table.
[0021] In one embodiment, the method further comprises:
[0022] The target network flow is distributed to a physical port corresponding to the physical port number, so that the physical port determines a forwarding queue corresponding to the target network flow according to a network flow requirement corresponding to the target network flow; the network flow requirement and the forwarding queue have a corresponding relationship.
[0023] The physical port determines scheduling information of each flow in the forwarding queue according to the order of the forwarding queue, and forwards the flow in the forwarding queue according to the scheduling information.
[0024] In one embodiment, the method further comprises:
[0025] The information of the elastic network card to which the target network flow belongs and the service information to which the target network flow belongs are sent to the physical port, so that the physical port determines a priority corresponding to the target network flow according to the elastic network card information and the service information, and allocates the target network flow to a forwarding queue corresponding to the priority.
[0026] In a second aspect, the application also provides a network flow load balancing device. The device comprises:
[0027] An identifier determination module is configured to obtain target network flow sent by a host side, determine an elastic network card to which the target network flow belongs, a sending queue to which the target network flow belongs, and a service to which the target network flow belongs, and determine a flow identifier of the target network flow according to the elastic network card to which the target network flow belongs, the sending queue to which the target network flow belongs, and the service to which the target network flow belongs.
[0028] The physical port determining module is configured to determine a physical port number corresponding to the traffic identifier in a link aggregation group according to a pre-configured port mapping table; the port mapping table is determined based on network traffic requirements configured on the host side; the network traffic requirements are determined based on basic information of the elastic network cards, basic information of the sending queues of the elastic network cards, and bandwidth of the services; the link aggregation group is configured to implement network traffic requirements of different services in each host side and share physical link bandwidth;
[0029] The network traffic shunting module is configured to shunt the target network traffic to a physical port corresponding to the physical port number, so that the physical port processes the target network traffic.
[0030] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to the first aspect when executing the computer program.
[0031] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0032] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0033] The network traffic load balancing method, device, computer equipment, storage medium and computer program product can obtain the target network traffic sent by the host side, determine the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs. According to the elastic network card, the sending queue and the service, the traffic identifier of the target network traffic is determined to identify the target network traffic. According to the preconfigured port mapping table, the physical port number corresponding to the traffic identifier can be determined, so that the physical port corresponding to the physical port number is determined. Since the port mapping table is determined according to the network traffic demand configured by each host side, the traffic identifier corresponding to different network traffic demands and the physical port number corresponding to the traffic identifier can be searched in the port mapping table. The network traffic demand is determined based on the basic information of the elastic network card, the basic information of the sending queue of each elastic network card, and the bandwidth of the service. Then, the target network traffic can be distributed to the physical port corresponding to the physical port number according to the physical port number, so as to complete the distribution of the network traffic. Different target network traffic can be distributed to different physical ports according to the respective physical port numbers, so that the pre-distribution according to the port mapping table can be performed in any application scenario of the host side, and the port mapping table is determined according to the network traffic demand of the host side, so that the distribution is balanced, the probability of unbalanced physical port load is reduced, and the network traffic is not dynamically migrated, so as to improve the stability of the network traffic load balancing. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0035] Figure 1 The application environment diagram of the network traffic load balancing method in an embodiment;
[0036] Figure 2 The flowchart of the network traffic load balancing method in an embodiment;
[0037] Figure 3 The flowchart of the network traffic load balancing method in another embodiment;
[0038] Figure 4 The schematic diagram of the port mapping table in an embodiment;
[0039] Figure 5 The structural block diagram of the network traffic load balancing device in an embodiment;
[0040] Figure 6 Fig. 1 is a schematic diagram of an internal structure of a computer device in an embodiment. DETAILED DESCRIPTION
[0041] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0042] The network traffic load balancing method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 . The host side 102 communicates with the server 104 through a network, and the server 104 includes an intelligent network card and multiple physical ports. The host side 102 can generate target network traffic of various services and send the target network traffic to the intelligent network card of the server 104. The intelligent network card can determine the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs. According to the information of the elastic network card, the sending queue and the service to which the target network traffic belongs, the intelligent network card can determine the traffic identifier corresponding to the target network traffic. The intelligent network card can take the traffic identifier as a retrieval object and determine the physical port number corresponding to the traffic identifier in the preconfigured port mapping table. The port mapping table is determined according to the network traffic demand configured by the host side, and the physical port number corresponding to different network traffic demands is different. In addition, the network traffic demand is determined according to the basic information of the elastic network card, the basic information of the sending queue, and the bandwidth amount of different types of services after combination. The intelligent network card can distribute the target network traffic to the physical port corresponding to the physical port number, thereby completing the classification of the network traffic and completing the load balancing of the network traffic.
[0043] The host side 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0044] In an exemplary embodiment, as shown in Figure 2 , a network traffic load balancing method is provided. The method is applied to Figure 1The intelligent network card in the middle server 104 is taken as an example for illustration, including the following steps S202 to S206. Among them:
[0045] Step S202, obtaining the target network traffic sent by the host side, determining the elastic network card, the sending queue and the service to which the target network traffic belongs, and determining the traffic identifier of the target network traffic according to the elastic network card, the sending queue and the service to which the target network traffic belongs.
[0046] Among them, the elastic network card is a virtual network card created by the intelligent network card for each user, which can support multiple IP addresses and multiple network interfaces. The intelligent network card can manage multiple elastic network cards at the same time. Each elastic network card can contain multiple sending queues, and each sending queue can temporarily store the corresponding network traffic. The service can include multiple service types, such as network service and storage service. Each service can be configured with a corresponding bandwidth. The traffic identifier is used to represent the target network traffic, and the traffic identifiers of different types and different application scenarios of network traffic are different. The application scenarios of network traffic corresponding to the same traffic identifier can be the same.
[0047] Specifically, the intelligent network card can receive the target network traffic sent from the host side, and identify the information of a specific field in the target network traffic to obtain the elastic network card, the sending queue and the service to which the target network traffic belongs. The intelligent network card can perform identification processing on the information corresponding to the elastic network card, the sending queue and the service to which the target network traffic belongs, respectively, to obtain the traffic identifier of the target network traffic. In one example, the intelligent network card can superimpose the identification information of the elastic network card to which the target network traffic belongs, the identification information of the sending queue to which the target network traffic belongs, and the identification information of the service to which the target network traffic belongs, and determine the superimposed identification information as the traffic identifier of the target network traffic. For example, the identification information of the elastic network card is 01, the identification information of the sending queue is 12, and the identification information of the service is 32, then the superimposed traffic identifier can be 011232. Among them, the first two bits are the identification information of the elastic network card, the middle two bits are the identification information of the sending queue, and the last two bits are the identification information of the service.
[0048] Optionally, the elastic network card can contain multiple queues. Different types of services can choose to use multiple elastic network cards or several queues of a single elastic network card on the host side. Different services can also share the sending queues of the elastic network card.
[0049] Step S204, determining the physical port number corresponding to the traffic identifier in the link aggregation group according to the preconfigured port mapping table.
[0050] The port mapping table is determined based on network traffic requirements configured on the host side; the network traffic requirements are determined based on basic information of the elastic network cards, basic information of the sending queues of the elastic network cards, and bandwidth of services; and the link aggregation group is used to realize network traffic requirements of different services in each host side and share physical link bandwidth. The link aggregation group can reasonably allocate bandwidth of the physical link corresponding to each physical port.
[0051] Specifically, the intelligent network card can read the pre-configured port mapping table, and the port mapping table records physical port numbers corresponding to various traffic identifiers. The intelligent network card can search whether the traffic identifier exists in the port mapping table, and in the case of searching the traffic identifier, determine the physical port number corresponding to the traffic identifier. If the traffic identifier is not searched, it is determined that the target network traffic is abnormal, and no shunting processing is performed. It should be understood that the traffic identifier has a corresponding relationship with the network traffic requirement, and for various network traffic requirements existing on the host side, the network traffic requirements can be determined in the form of data quantization through the basic information of the elastic network cards, the basic information of the sending queues of the elastic network cards, and the bandwidth of the services.
[0052] Optionally, one traffic identifier in the port mapping table can correspond to at least one physical port number; and one physical port number can correspond to multiple different traffic identifiers.
[0053] In step S206, the target network traffic is shunted to the physical port corresponding to the physical port number, so that the physical port processes the target network traffic.
[0054] Specifically, after the intelligent network card determines the physical port number corresponding to the traffic identifier, it can establish a communication connection with the physical port corresponding to the physical port number. The intelligent network card can send the target network traffic to the physical port, and the physical port can distribute the target network traffic according to the pre-configured traffic distribution strategy after receiving the target network traffic, thereby completing load balancing of the network traffic. In one example, the target network traffic can be shunted to a first physical port and a second physical port. The first physical port can contain unprocessed network traffic, and the first physical port can continue to distribute the target network traffic after completing the distribution of the unprocessed network traffic. The second physical port has no unprocessed network traffic, and can directly distribute the target network traffic.
[0055] In the network traffic load balancing method, the target network traffic sent by the host side is obtained, and the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs are determined. According to the elastic network card, the sending queue and the service, the traffic identifier of the target network traffic is determined to identify the target network traffic. According to the preconfigured port mapping table, the physical port number corresponding to the traffic identifier can be determined, so as to determine the physical port corresponding to the physical port number. Since the port mapping table is determined according to the network traffic demand configured by each host side, the traffic identifier corresponding to different network traffic demands and the physical port number corresponding to the traffic identifier can be searched in the port mapping table. The network traffic demand is determined based on the basic information of the elastic network card, the basic information of the sending queue of each elastic network card, and the bandwidth of the service. Then, the target network traffic can be distributed to the physical port corresponding to the physical port number according to the physical port number, so as to complete the distribution of the network traffic. Different target network traffics can be distributed to different physical ports according to their respective physical port numbers, so that the pre-distribution according to the port mapping table can be performed in any application scenario of the host side, and the port mapping table is determined according to the network traffic demand of the host side, so that the distribution is balanced, the probability of unbalanced physical port load is reduced, and the network traffic is not dynamically migrated, thereby improving the stability of the network traffic load balancing.
[0056] In an exemplary embodiment, the specific implementation process of the step "determining the traffic identifier of the target network traffic according to the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs" includes:
[0057] The identification number ID of the elastic network card to which the target network traffic belongs, the ID of the sending queue to which the target network traffic belongs, and the ID of the service to which the target network traffic belongs are combined to obtain an identification combination. The identification combination is processed by a preset hash algorithm to obtain a hash value corresponding to the identification combination, and the hash value is determined as the traffic ID of the target network traffic.
[0058] The identification number ID is used to represent the unique identifiers corresponding to the elastic network card, the sending queue and the service respectively. The preset hash algorithm can be a preconfigured calculation strategy of multiple hash values. The hash algorithm used in the embodiment of the application should correspond globally in the intelligent network card, so as to ensure that the hash values obtained by the same identification number or the same identification combination by the hash algorithm are also the same.
[0059] Specifically, the intelligent network card can read information of a specific field in the target network traffic, obtain an ID of the elastic network card to which the target network traffic belongs, an ID of the sending queue in the elastic network card to which the target network traffic belongs, and an ID of the service to which the target network traffic corresponds. In an example, the target network traffic can belong to multiple elastic network cards, belong to at least one sending queue of the multiple elastic network cards, and belong to multiple services. For the target network traffic, the target network traffic can be segmented, an elastic network card corresponding to each segment of the network traffic, a sending queue corresponding to the elastic network card, and a service to which the segment of the network traffic belongs are determined, so as to obtain the ID of the elastic network card, the ID of the sending queue, and the ID of the service of each segment of the network traffic.
[0060] For the ID of the elastic network card, the ID of the sending queue, and the ID of the service to which the target network traffic belongs, the intelligent network card can combine the ID of the elastic network card, the ID of the sending queue, and the ID of the service, for example, perform addition operation, subtraction operation, or connection operation on the IDs to obtain a combined identifier combination. The intelligent network card can input the identifier combination into a preset hash algorithm to obtain a hash value corresponding to the identifier combination, and determine the hash value as a traffic ID of the target network traffic. In an example, if the target network traffic is segmented into multiple segments of network traffic, a hash value of the identifier combination corresponding to each segment of the network traffic can be determined, and the hash values of the segments of the network traffic are determined as the traffic ID of the target network traffic.
[0061] In an example, for example, the number of elastic network cards is 32, a single elastic network card contains at most 16 sending queues, and the services can be divided into four types of network services, storage services, elephant flow services, and management and control services. At this time, a hash algorithm is used to map traffic messages of different elastic network cards, different sending queues, and different service types to corresponding traffic IDs. The same traffic ID can be forwarded using the same physical port.
[0062] In this embodiment, the hash value of the combined identifier combination is determined as the traffic ID of the target network traffic by combining the ID of the elastic network card, the ID of the sending queue, and the ID of the service to which the target network traffic belongs, which can combine the ID information of the elastic network card, the sending queue, and the service to obtain the traffic ID exclusive to the target network traffic, reduce the complexity of the traffic ID, and reduce the consumption of computing resources.
[0063] In an example embodiment, the method further comprises:
[0064] First, configuration information of each host side when an instance is created is obtained.
[0065] The configuration information includes basic information corresponding to the elastic network card, the sending queue, and the service bandwidth of the host side respectively; and the basic information includes at least one of a service type, a quantity, a bandwidth, a bandwidth type, and a belonging relationship.
[0066] Specifically, the intelligent network card can obtain the configuration information of the host side when the instance is created, and read the basic information corresponding to the plurality of elastic network cards, the sending queue of the elastic network card, and the service bandwidth of the host side contained in the configuration information. For example, the number of elastic network cards is determined, the number of sending queues contained in each elastic network card is determined, the bandwidth that each elastic network card can process is determined, the bandwidth that each sending queue can process is determined, the service type of the service is determined, the bandwidth required for each service type is determined, the belonging relationship between the elastic network card and the sending queue is determined, and the like.
[0067] Secondly, after obtaining the configuration information of each host side when the instance is created, the network traffic demand corresponding to each host side under various service situations can be determined according to the configuration information.
[0068] The service situation is an application scenario in which the services of each service type are forwarded in different elastic network cards and different sending queues. The creation of the instance is used to represent the installation process of each server or cloud server.
[0069] Specifically, the intelligent network card can arrange and combine each configuration information to obtain a service situation composed of the basic information corresponding to the plurality of elastic network cards, the sending queue, and the service bandwidth. The bandwidth required for each service situation can be determined to determine the network traffic demand corresponding to the service situation. In one example, the intelligent network card can determine that the elastic network card A contains one sending queue 1, the elastic network card B contains the sending queue 2 and the sending queue 3, wherein the sending queue 1, the sending queue 2, and the sending queue 3 correspond to the service 1, the service 2, and the service 3 respectively. The bandwidth of the sending queue 1, the sending queue 2, and the sending queue 3 is greater than the required bandwidth of the corresponding service respectively. Based on this, the intelligent network card can take the information of the above service situation and the bandwidth required for the intelligent network card and the sending queue in the service situation as the network traffic demand.
[0070] Finally, according to each network traffic demand of the host side and the total bandwidth of the link aggregation group corresponding to the host side, a port mapping table of the host side under each service situation is determined.
[0071] The port mapping table includes the physical port number corresponding to the traffic identifier under each service situation. Each service situation can correspond to one traffic identifier. One traffic identifier can correspond to at least one physical port number.
[0072] Specifically, the intelligent network card can match in the corresponding link aggregation group on the host side according to the network traffic demand, and obtain the physical port that best matches the network traffic demand. The physical port can be obtained by pre-allocating the bandwidth of the link aggregation group, and the total bandwidth of all physical ports cannot exceed the total bandwidth of the link aggregation group. The intelligent network card can determine whether the network traffic demand matches according to the service type and bandwidth that each physical port can handle. For the matching network traffic demand and physical port, the traffic ID corresponding to the network traffic demand can be determined, and the physical port number corresponding to the physical port can be obtained, and the traffic ID and the physical port number are stored in the port mapping table as a group of data.
[0073] In this embodiment, by obtaining the configuration information of the host side when creating an instance, and combining the configuration information, the network traffic demand of the host side under various service conditions can be obtained, and the bandwidth required by the elastic network card, the sending queue and each service under different application scenarios can be accurately obtained. Finally, according to the network traffic demand under each service condition, the total bandwidth of the link aggregation group corresponding to the host side can be allocated to the network traffic demand, so as to determine the physical port corresponding to each network traffic demand, obtain the physical port number corresponding to the traffic identifier under each service condition, and store the traffic identifier and the physical port number in the port mapping table, which can improve the data integrity and accuracy of the port mapping table.
[0074] In one exemplary embodiment, the specific implementation process of the step "determining the port mapping table of the host side under each service condition according to the network traffic demand of the host side and the total bandwidth of the link aggregation group corresponding to the host side" includes:
[0075] For each service condition of the host side, the estimated bandwidth corresponding to each service condition is determined according to the network traffic demand of the host side; the number range of the physical port number is determined according to the service type corresponding to the service condition; the target port number in the link aggregation group that matches is determined according to the actual bandwidth of each physical port in the number range and the estimated bandwidth corresponding to the service condition; the mapping relationship between the traffic identifier and the target port number under the service condition is determined, and the mapping relationship under each service condition is combined to obtain the port mapping table.
[0076] In this system, physical port numbers correspond to service types; the total bandwidth of the port corresponding to a physical port number is no greater than the total bandwidth of the corresponding link aggregation group on the host side; the estimated bandwidth is the sum of the basic bandwidth and burst bandwidth required by network traffic demand; each physical port can handle at least one service type, and the same service type can be handled by multiple physical ports, therefore, the range of physical port numbers corresponding to that service type can be obtained through the physical port numbers corresponding to multiple physical ports. Actual bandwidth is the actual bandwidth that each physical port can handle.
[0077] Specifically, the smart NIC can iterate through various service scenarios to determine the network traffic requirements corresponding to the current service scenario and obtain the estimated bandwidth for the current service scenario. The smart NIC can obtain the service type of the current service scenario and the physical port numbers corresponding to each physical port capable of handling that service type, thus obtaining a range of physical port numbers. The smart NIC can iterate through the physical ports within the number range to determine the actual bandwidth of each physical port. If the estimated bandwidth corresponding to the current service scenario is less than or equal to the actual bandwidth of a physical port, the smart NIC can determine that the physical port matches the current service scenario, thus determining the physical port number of that physical port as the target port number. At this point, the smart NIC obtains at least one target port number corresponding to the current service scenario. The smart NIC can determine the traffic identifiers in the current service scenario, which are determined by the IDs corresponding to the elastic NIC, the sending queue, and the service, respectively, as the traffic identifiers corresponding to the current service scenario. The mapping relationship between each traffic identifier and the target port number is determined and added to the port mapping table, thus obtaining a port mapping table containing the mapping relationships between traffic identifiers and physical port numbers corresponding to various service scenarios.
[0078] In this embodiment, based on the service type of each service scenario, multiple physical ports capable of handling that service type are identified among the physical ports. Then, based on the estimated bandwidth of the service type and the actual bandwidth of each physical port, physical ports with actual bandwidth greater than or equal to the estimated bandwidth are identified to obtain target port numbers. Finally, the mapping relationship between the target port numbers and the traffic identifiers corresponding to the service scenarios is determined, thereby obtaining a port mapping table, which can improve the completeness and accuracy of the port mapping table.
[0079] In an exemplary embodiment, the specific implementation process of the step "shunting the target network traffic to the physical port corresponding to the physical port number so that the physical port can process the target network traffic" includes:
[0080] The target network traffic is shunted to a physical port corresponding to the physical port number, so that the physical port determines a forwarding queue corresponding to the target network traffic according to network traffic demand corresponding to the target network traffic. The network traffic demand and the forwarding queue have a corresponding relationship.
[0081] The physical port determines scheduling information of each flow in the forwarding queue according to the order of the forwarding queue, and forwards the flow in the forwarding queue according to the scheduling information.
[0082] Specifically, the intelligent network card can establish a communication connection with the physical port according to the physical port number, and shunt the target network traffic to the physical port corresponding to the physical port number. The physical port can obtain network traffic demand corresponding to the target network traffic, and determine a forwarding queue corresponding to the target network traffic according to the network traffic demand. The physical port can send the target network traffic to the forwarding queue. The physical port can forward the flow according to the order of the flow in the forwarding queue.
[0083] In this embodiment, by sending the target network traffic to the physical port and sending the target network traffic to the corresponding forwarding queue through the physical port, the target network traffic can be forwarded through the forwarding strategy of the forwarding queue, the rationality of the target network traffic forwarding can be improved, and the bandwidth utilization of the physical port can be improved.
[0084] In one exemplary embodiment, after the step of "shunting the target network traffic to a physical port corresponding to the physical port number", the method further comprises:
[0085] The intelligent network card sends the elastic network card information to which the target network traffic belongs, and the service information to which the target network traffic belongs, to the physical port, so that the physical port determines a priority corresponding to the target network traffic according to the elastic network card information and the service information, and allocates the target network traffic to a forwarding queue corresponding to the priority.
[0086] Specifically, the intelligent network card can send the elastic network card information to which the target network traffic belongs, and the service information to which the target network traffic belongs, to the physical port corresponding to the physical port number in the form of a special field. The physical port can read the elastic network card information and the service information, and determine a VLAN priority or an IP priority corresponding to the target network traffic according to the elastic network card information and the service information. The physical port can allocate the target network traffic to a forwarding queue corresponding to the VLAN priority or the IP priority according to the VLAN priority or the IP priority corresponding to the target network traffic. The forwarding queue can forward the target network traffic.
[0087] In this embodiment, the VLAN priority or IP priority corresponding to the target network traffic is determined through the elastic network card information and the service information, and the forwarding queue corresponding to the target network traffic can be determined according to the priority, important network traffic can be distributed preferentially, and the network communication quality can be ensured.
[0088] The specific execution process of the network traffic load balancing method is described in detail below in combination with a specific embodiment. The present application embodiment may have multiple professional terms, and the explanation of each professional term is as follows:
[0089] CX5 (Connect-X 5): an acceleration network card that provides a series of innovative offloading and accelerators in hardware to improve the efficiency of data center network and storage connection.
[0090] BF2 (BlueField 2): an intelligent network card chip used for software-defined storage, network, security and management workloads.
[0091] I / O (Input / Output): input / output.
[0092] GE (Gigabit Ethernet): Gigabit Ethernet, which is an Ethernet that provides a data transmission rate of 1000 Mbps.
[0093] LACP (Link Aggregation Control Protocol): Link Aggregation Control Protocol, which is a protocol for realizing dynamic link aggregation.
[0094] FPGA (Field Programmable Gate Array): Field Programmable Gate Array, which is a programmable logic device composed of programmable logic cells and programmable interconnection resources. It has the characteristics of flexibility and reconfigurability, and is widely used in communication, digital signal processing, embedded systems and other fields.
[0095] SOC (System on Chip): System on Chip or System on Chip, which is an integrated circuit with a specific target, containing a complete system and all contents of embedded software.
[0096] HQos (Hierarchical QoS): Hierarchical Quality of Service, which is a technology for solving multi-user and multi-service bandwidth guarantee through multi-level queue scheduling mechanism.
[0097] It should be understood that the network cards mounted in the servers in the data center are ordinary standard network cards, acceleration network cards (such as the CX5 network card of Nvidia), and intelligent network cards (such as the BF2 network card of Nvidia). The intelligent network card has a processor and a general-purpose programmable hardware engine, and cooperates to process various scene requirements of I / O virtualization, storage and network service offloading, security service offloading and the like of the data center. The network communication in the network architecture of the data center is mainly Ethernet. The scene to which the method of the embodiment of the application is directed is network packet multi-port load balancing in Ethernet communication.
[0098] The intelligent network card plugged into the data center server has a multi-tenant support feature. One intelligent network card can meet the network transmission requirements of different services of different users, and one intelligent network card needs to have a virtual switch and needs to be configured with hierarchical Qos to provide differential services and manage network traffic congestion and forwarding. One intelligent network card is configured with 2 or 4 Ethernet optical ports, such as 25GE, 10GE, 40GE and 100GE ports. Generally, the network traffic in the intelligent network card communicates through multiple Ethernet ports and switches. In order to improve the redundancy fault tolerance and service bandwidth capability of interconnection, the link aggregation mode 4 working mode is adopted. The link aggregation mode 4 uses the LACP link aggregation control protocol to negotiate the aggregation state of the physical ports of both parties. The physical port in a normal working state can be added to the aggregation group. The physical port in an abnormal working state needs to be removed from the aggregation group.
[0099] The link aggregation group of the intelligent network card needs to carry the network transmission requirements of different services of different users, realize bandwidth sharing, and maximize the utilization of physical link bandwidth. The physical port packet forwarding in the link aggregation group needs virtual queue scheduling to avoid head congestion. However, which traffic packets are forwarded from a certain physical port affects the utilization efficiency of the physical bandwidth. When the traffic shunting is unbalanced, the bandwidth of the to-be-forwarded traffic exceeds the bandwidth of the to-be-transferred physical port, and then traffic congestion is formed, which affects the forwarding of other traffic packets from the host side. The port shunting of the link aggregation group generally adopts the exclusive or mode or other hash algorithm to select the physical port. However, the shunting mode based on the hash algorithm cannot guarantee balanced shunting.
[0100] In addition, the server-side intelligent network card can perceive the load pressure of the physical port, perform event feedback to adjust the sending bandwidth of the sending end on the host side, and can improve the bandwidth utilization of the link aggregation group. However, the event definition of the load pressure and the feedback adjustment process are a constantly changing closed loop process, and need to adjust the operating parameters to achieve a better final bandwidth utilization. The event feedback adjustment method is relatively complex in calculation process, and requires good real-time adjustment capability of hardware. The adjustment method corresponding to the load pressure is a passive optimization of traffic distribution method, which has the risk of being unable to respond to traffic changes in time. Therefore, the embodiment of the present application focuses on the traffic forwarding of the intelligent network card itself, and forms a proactive traffic distribution strategy, that is, a top-down traffic distribution method.
[0101] In the embodiment of the present application, the top layer is the server-side intelligent network card facing different users and different bandwidth requirements of services. The bandwidth requirements of the top layer can be configured with basic bandwidth and burst bandwidth, and the traffic bandwidth requirements of specific services. The intelligent network card can explicitly indicate the network service bandwidth, storage service bandwidth, elephant flow service bandwidth, ant flow service bandwidth, and control service bandwidth carried by the elastic network card when creating the elastic network card, in addition to the number of sending queues of the elastic network card. The intelligent network card can use various bandwidth requirements and queues for hierarchical HQos configuration.
[0102] In addition, the intelligent network card can establish a traffic mapping table to distribute different queues and different services of the elastic network card to the corresponding physical port according to the actual bandwidth of the physical port bandwidth, so as to realize the sharing of the link aggregation group physical port bandwidth, thereby customizing the forwarding topology of the bottom traffic from the demand side, meeting the bandwidth requirements of users, and combining the capacity of the physical port bandwidth to realize the maximum utilization of the physical port bandwidth.
[0103] Overall, the user sends network traffic on the host side, which can process the bandwidth limit of different users through HQos, and distinguish each service into network service, storage service and control service. The traffic message is forwarded from the Bond link aggregation group according to the preset method. The traffic message is output from the physical layer line of the physical port (Ethernet port) after being scheduled on multiple queues of the physical port (Ethernet port).
[0104] Specifically, in the physical port traffic forwarding scene of the data center server-side intelligent network card link aggregation mode 4, the traffic message distribution forwarding process is as follows Figure 3 As shown in the figure, the traffic message distribution forwarding process includes:
[0105] In a first step, when a user creates a device (bare metal, cloud host) instance on a cloud, the user configures the number of elastic network cards, the number of queues of the elastic network cards, the basic bandwidth and burst bandwidth of network services and storage services, and can select to configure the basic bandwidth and burst bandwidth of elephant flow service and control service. All types of traffic share the total bandwidth of the link aggregation group. The elephant flow service is generally a high-bandwidth connection application.
[0106] In a second step, a network traffic processing module identifies the elastic network card ID, the sending queue ID, and the service ID to which a traffic packet belongs. An elastic network card can include multiple queues. A service can select to use multiple elastic network cards or multiple queues of a single elastic network card. Different services can also share the sending queues of an elastic network card.
[0107] The elastic network card ID, the sending queue ID, and the service ID are combined to form a traffic ID, which is used as a basic operation object for allocating a physical port. To reduce resource consumption, the strategy of combining the elastic network card ID, the sending queue ID, and the service ID to form a traffic ID can consider the data bit width of the traffic ID, use a hash algorithm to generate a traffic ID with a smaller data bit width, and thereby construct a smaller traffic ID port mapping table. According to the network traffic requirements configured by the user when creating the device instance (as shown in the first step), an intelligent network card generates a traffic ID port mapping table. In the network traffic processing module, the intelligent network card can query the port mapping table by using the traffic ID to obtain the forwarding physical port number of the traffic packet. The traffic ID port mapping table is as shown in Figure 4
[0108] In an example, for example, the number of elastic network cards is 32, a single elastic network card has at most 16 sending queues, and the services are classified into four types of network services, storage services, elephant flow services, and control services. At this time, a hash algorithm is used to map traffic packets of different elastic network cards, different sending queues, and different service types into a plurality of traffic IDs. The same traffic ID uses the same physical port for forwarding.
[0109] In a third step, a physical port forwarding interface allocates a packet to a forwarding queue of different priority according to the VLAN priority or IP priority of the packet, and the packet in the forwarding queue is forwarded out from a physical port after being scheduled.
[0110] In an example, in the FPGA+SOC chip intelligent network card scheme widely used at present, an FPGA chip provides flexible programmable customization capability and can provide a customized hardware logic engine according to different service scenarios. The HQos and the network traffic processing module in the FPGA chip provide an implementation verification platform of the embodiments of the present application.
[0111] The embodiment has been applied to a certain type of intelligent network card. The intelligent network card has two 25GE physical ports and runs in link aggregation mode 4. The physical port is an interface for providing management messages and service data messages by an FPGA chip. The FPGA chip hardware engine constructs four levels of traffic bandwidth control of queue-elastic network card-service-port, which meets the basic bandwidth demand of a single user (elastic network card) and provides the capability support of the overall aggregated link group bandwidth. For example, the intelligent network card in the cloud host server selects the CPU, memory, hard disk and network card configuration of the virtual machine when the cloud host is created. In particular, the detailed configuration of the network card lists the number of elastic network cards, the number of queues of a single network card, the basic bandwidth and the maximum bandwidth of the network card. In this way, the SOC processor of the intelligent network card allocates the network bandwidth allocation and physical port mapping of the newly added cloud host instance in combination with the existing cloud host instances of the intelligent network card. In particular, when the intelligent network card only creates one elastic network card, it needs to be mapped to a certain physical port through a queue, thereby maximizing the utilization of the link aggregation group bandwidth.
[0112] The embodiment of the present application aims to maximize the utilization of the link aggregation group physical port bandwidth, constructs four levels of traffic bandwidth control of queue-elastic network card-service-port in the hardware engine through a top-down design strategy, meets the differentiated service demand of different users and different services, and improves the utilization rate of the link aggregation group physical port bandwidth. The embodiment of the present application also avoids traditional traffic message shunting bandwidth optimization means such as pure hash shunting optimization, traffic dynamic migration optimization and event feedback bandwidth optimization, and simplifies the hardware implementation. The embodiment of the present application guarantees user demand and bandwidth utilization rate through a top-down bandwidth allocation implementation strategy. A unified and flexible physical port mapping selection mechanism is provided through a port mapping table of a traffic ID. The traffic ID contains an elastic network card ID, a sending queue ID and a service ID of a traffic message, meets the traffic identification and compilation demand of bare metal and cloud host scenes, is not a simple use of an elastic network card or a queue number to map and select a physical port, and improves the explainability of the traffic ID.
[0113] It should be understood that although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0114] Based on the same inventive concept, the embodiments of the present application also provide a network traffic load balancing device for implementing the network traffic load balancing method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more network traffic load balancing device embodiments provided below can refer to the limitations of the network traffic load balancing method described above, which will not be repeated here.
[0115] In an exemplary embodiment, as shown in Figure 5 a network traffic load balancing device 500 is provided, comprising an identifier determining module 501, a physical port determining module 502 and a network traffic shunting module 503, wherein:
[0116] The identifier determining module 501 is configured to obtain target network traffic sent by the host side, determine the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs, and determine the traffic identifier of the target network traffic according to the elastic network card to which the target network traffic belongs, the sending queue to which the target network traffic belongs, and the service to which the target network traffic belongs.
[0117] The physical port determining module 502 is configured to determine the physical port number corresponding to the traffic identifier in the link aggregation group according to a preconfigured port mapping table; the port mapping table is determined based on the network traffic demand configured by the host side; the network traffic demand is determined based on the basic information of the elastic network card, the basic information of the sending queue of each elastic network card, and the bandwidth of the service; the link aggregation group is used to implement the network traffic demand of different services in each host side and share the physical link bandwidth.
[0118] The network traffic shunting module 503 is configured to shunt the target network traffic to the physical port corresponding to the physical port number, so that the physical port processes the target network traffic.
[0119] Further, the identifier determining module 501 is specifically configured to combine the identification number ID of the elastic network card to which the target network traffic belongs, the ID of the sending queue to which the target network traffic belongs, and the ID of the service to which the target network traffic belongs to obtain an identification combination; process the identification combination through a preset hash algorithm to obtain a hash value corresponding to the identification combination, and determine the hash value as the traffic ID of the target network traffic.
[0120] Further, the apparatus further comprises a mapping table determining module, specifically configured to: obtain configuration information of each host side when creating an instance; the configuration information comprises basic information of an elastic network card, a sending queue and a service bandwidth corresponding to each host side; the basic information comprises at least one of a service type, a quantity, a bandwidth quantity, a bandwidth type and a belonging relationship; determine network traffic requirements of each host side under various service conditions according to the configuration information; the service condition is an application scenario in which services of each service type are forwarded in different elastic network cards and different sending queues; determine a port mapping table of each host side under each service condition according to the network traffic requirements of each host side and a total bandwidth of a link aggregation group corresponding to the host side; the port mapping table comprises a physical port number corresponding to a traffic identifier under each service condition.
[0121] Further, the mapping table determining module is specifically further configured to: for each service condition of the host side, determine an estimated bandwidth corresponding to each service condition according to the network traffic requirements of the host side; determine a number range of the physical port number according to a service type corresponding to the service condition; the physical port number and the service type have a corresponding relationship; a total bandwidth of a port corresponding to the physical port number is not greater than a total bandwidth of the link aggregation group corresponding to the host side; determine a target port number matched in the link aggregation group according to an actual bandwidth of each physical port in the number range and the estimated bandwidth corresponding to the service condition; determine a mapping relationship between the traffic identifier and the target port number under the service condition, and combine the mapping relationships under each service condition to obtain the port mapping table.
[0122] Further, the network traffic determining module 503 is specifically configured to: split the target network traffic to a physical port corresponding to the physical port number, so that the physical port determines a forwarding queue corresponding to the target network traffic according to a network traffic requirement corresponding to the target network traffic; the network traffic requirement and the forwarding queue have a corresponding relationship; wherein the physical port determines scheduling information of each flow in the forwarding queue according to an order of the forwarding queue, and forwards the flow in the forwarding queue according to the scheduling information.
[0123] Further, the network traffic determining module 503 is specifically further configured to: send elastic network card information and service information to which the target network traffic belongs to the physical port, so that the physical port determines a priority corresponding to the target network traffic according to the elastic network card information and the service information, and allocates the target network traffic to a forwarding queue corresponding to the priority.
[0124] The various modules in the network traffic load balancing apparatus described above can be implemented in whole or in part by software, hardware, and combinations thereof. The various modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be invoked by a processor to perform operations corresponding to the various modules.
[0125] In an exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 6 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store network traffic data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a network traffic load balancing method.
[0126] Those skilled in the art can understand that Figure 6 The structure shown in the above
[0127] In an exemplary embodiment, a computer device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0128] In an embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0129] In an embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0131] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0132] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A network traffic load balancing method, characterized in that, Applied to a smart network interface card (NIC), wherein the smart NIC is deployed on a server, the method includes: The system acquires the target network traffic sent by the host side, determines the elastic network interface card (NIC) to which the target network traffic belongs, the sending queue to which it belongs, and the service to which it belongs, and determines the traffic identifier of the target network traffic based on the elastic network interface card (NIC) to which the target network traffic belongs, the sending queue to which it belongs, and the service to which it belongs. Based on a pre-configured port mapping table, the physical port number corresponding to the traffic identifier in the link aggregation group is determined; the port mapping table is determined based on the network traffic requirements configured on the host side; the network traffic requirements are determined based on the basic information of the elastic network interface card, the basic information of the sending queue of each elastic network interface card, and the bandwidth of the service; the link aggregation group is used to realize the network traffic requirements of different services on each host side and share the physical link bandwidth. The target network traffic is diverted to the physical port corresponding to the physical port number, so that the physical port can process the target network traffic; The method further includes: Obtain the configuration information of each host when creating the instance; the configuration information includes the elastic network interface card, sending queue, and basic information corresponding to the service bandwidth of each host; the basic information includes at least one of service type, quantity, bandwidth amount, bandwidth type, and relationship; Based on the configuration information, the network traffic requirements of each host under various service scenarios are determined; the service scenarios refer to the application scenarios in which traffic is forwarded by different elastic network cards and different sending queues for each type of service. Based on the network traffic requirements of the host side and the total bandwidth of the corresponding link aggregation group on the host side, a port mapping table for the host side under each service scenario is determined; the port mapping table includes the physical port number corresponding to the traffic identifier under each service scenario.
2. The method according to claim 1, characterized in that, The step of determining the traffic identifier of the target network traffic based on the elastic network interface card (NIC), the sending queue, and the service to which the target network traffic belongs includes: The identifier combination is obtained by combining the ID of the elastic network interface to which the target network traffic belongs, the ID of the sending queue to which it belongs, and the ID of the service to which it belongs. The identifier combination is processed by a preset hash algorithm to obtain the hash value corresponding to the identifier combination, and then determined as the traffic ID of the target network traffic.
3. The method according to claim 1, characterized in that, The step of determining the port mapping table for each service scenario on the host side based on the network traffic requirements on the host side and the total bandwidth of the corresponding link aggregation group on the host side includes: For each service scenario on the host side, the estimated bandwidth corresponding to each service scenario is determined based on the network traffic requirements on the host side. The range of physical port numbers is determined based on the service type corresponding to the service scenario; there is a correspondence between the physical port numbers and the service types; the total bandwidth of the port corresponding to the physical port number is not greater than the total bandwidth of the link aggregation group corresponding to the host side; Based on the actual bandwidth of each physical port within the specified number range and the estimated bandwidth corresponding to the service scenario, determine the matching target port number in the link aggregation group; The mapping relationship between the traffic identifier and the target port number under the business scenario is determined, and the mapping relationships under each business scenario are merged to obtain the port mapping table.
4. The method according to any one of claims 1 to 3, characterized in that, The step of diverting the target network traffic to the physical port corresponding to the physical port number, so that the physical port can process the target network traffic, includes: The target network traffic is diverted to the physical port corresponding to the physical port number, so that the physical port determines the forwarding queue of the target network traffic according to the network traffic demand corresponding to the target network traffic; there is a correspondence between the network traffic demand and the forwarding queue. The physical port determines the scheduling information of each traffic in the forwarding queue according to the order of the forwarding queue, and forwards the traffic in the forwarding queue according to the scheduling information.
5. The method according to claim 4, characterized in that, After diverting the target network traffic to the physical port corresponding to the physical port number, the method further includes: The elastic network interface card (NIC) information to which the target network traffic belongs, as well as the service information to which it belongs, are sent to the physical port so that the physical port can determine the priority of the target network traffic based on the elastic NIC information and the service information, and allocate the target network traffic to the forwarding queue corresponding to the priority.
6. A network traffic load balancing device, characterized in that, The device includes: The identifier determination module is used to acquire the target network traffic sent by the host side, determine the elastic network interface card, the sending queue, and the service to which the target network traffic belongs, and determine the traffic identifier of the target network traffic based on the elastic network interface card, the sending queue, and the service to which the target network traffic belongs; The physical port determination module is used to determine the physical port number corresponding to the traffic identifier in the link aggregation group according to a pre-configured port mapping table; the port mapping table is determined based on the network traffic requirements configured on the host side; the network traffic requirements are determined based on the basic information of the elastic network interface card, the basic information of the sending queue of each elastic network interface card, and the bandwidth of the service; the link aggregation group is used to realize the network traffic requirements of different services on each host side and share the physical link bandwidth. A network traffic splitting module is used to split the target network traffic to the physical port corresponding to the physical port number, so that the physical port can process the target network traffic; The mapping table determination module is used to obtain the configuration information of each host when creating an instance. The configuration information includes the basic information of the elastic network interface card, sending queue, and service bandwidth corresponding to each host. The basic information includes at least one of the following: service type, quantity, bandwidth amount, bandwidth type, and relationship. Based on the configuration information, the module determines the network traffic requirements of each host under various service scenarios. The service scenarios are application scenarios in which services of different types forward traffic in different elastic network interfaces and different sending queues. Based on the network traffic requirements of each host and the total bandwidth of the link aggregation group corresponding to the host, the module determines the port mapping table of the host under each service scenario. The port mapping table includes the physical port number corresponding to the traffic identifier under each service scenario.
7. The apparatus according to claim 6, characterized in that, The identifier determination module is also used for: The identifier ID of the elastic network interface card to which the target network traffic belongs, the ID of the sending queue to which it belongs, and the ID of the service to which it belongs are combined to obtain an identifier combination; the identifier combination is processed by a preset hash algorithm to obtain the hash value corresponding to the identifier combination, and is determined as the traffic ID of the target network traffic.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data processing and conversion rule deployment method and device
CN113301174A
System and method for determining a data flow path in an overlay network
CN113973079A