Disclosure of Invention
The application provides a traffic scheduling method, a traffic scheduling device and related equipment.
In a first aspect, the present application provides a traffic scheduling method, applied to a controller, the method comprising:
acquiring full-network topology information and host ARP information, wherein the full-network topology information comprises all link relations and all access interface information included by all links;
Defining initial overhead values of links included in the whole network topology information, wherein the size of the initial overhead value of one link is inversely proportional to the maximum bandwidth value of the link;
Determining source and destination end information of a task to be trained, and determining a target path for transmitting traffic of the task to be trained based on overhead values of links included in the source and destination end information of the task to be trained, host ARP information and whole network topology information, wherein the target path includes a target link, and the sum of the overhead values of the target link is smaller than or equal to a preset value.
Optionally, the controller maintains a current overhead value for each link, and after determining a target path for transmitting the task traffic to be trained, the method further comprises:
And updating the current overhead value of each target link included in the target path.
Optionally, the step of updating the current overhead value of each target link included in the target path includes:
and accumulating the current overhead value of each target link included in the target path by 1.
Optionally, determining source-destination information of the task to be trained, and determining a target path for transmitting traffic of the task to be trained based on the overhead values of links included in the source-destination information of the task to be trained, the host ARP information, and the full-network topology information includes:
According to the source destination information and the host ARP information, determining a first access device accessed by the source and a second access device accessed by the destination;
determining at least one path between the first access device and the second access device according to the whole network topology information;
Respectively calculating path overhead values of the at least one path according to overhead values of links included in the whole network topology information;
And determining a path with the path overhead value smaller than or equal to a preset value as a target path for transmitting the task flow to be trained according to the path overhead value of the at least one path.
Optionally, the method further comprises:
and when the training of the task to be trained is detected to be completed and the target path is released, accumulating and subtracting 1 from the current overhead value of each target link included in the target path.
In a second aspect, the present application provides a flow scheduling device, applied to a controller, the device comprising:
The system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring full-network topology information and host ARP information, wherein the full-network topology information comprises all link relations and all access interface information included by all links;
a defining unit, configured to define an initial overhead value of each link included in the network topology information of the whole network, where a size of the initial overhead value of one link is inversely proportional to a maximum bandwidth value of the link;
The system comprises a determining unit, a target path and a processing unit, wherein the determining unit is used for determining source and destination end information of a task to be trained, determining a target path for transmitting the traffic of the task to be trained based on overhead values of links included by host ARP information and whole network topology information of the task to be trained, wherein the target path includes a target link, and the sum of the overhead values of the target link is smaller than or equal to a preset value.
Optionally, the controller maintains a current overhead value for each link, and the apparatus further comprises:
and the updating unit is used for updating the current overhead value of each target link included in the target path.
Optionally, when updating the current overhead value of each target link included in the target path, the updating unit is further configured to:
and accumulating the current overhead value of each target link included in the target path by 1.
Optionally, determining source-destination information of a task to be trained, and determining a target path for transmitting traffic of the task to be trained based on overhead values of links included in the source-destination information of the task to be trained, host ARP information, and full-network topology information, where the determining unit is specifically configured to:
According to the source destination information and the host ARP information, determining a first access device accessed by the source and a second access device accessed by the destination;
determining at least one path between the first access device and the second access device according to the whole network topology information;
Respectively calculating path overhead values of the at least one path according to overhead values of links included in the whole network topology information;
And determining a path with the path overhead value smaller than or equal to a preset value as a target path for transmitting the task flow to be trained according to the path overhead value of the at least one path.
Optionally, the apparatus further comprises a detection unit:
and when the detection unit detects that the training of the task to be trained is completed and releases the target path, the updating unit is further used for subtracting 1 from the current overhead value of each target link included in the target path.
In a third aspect, an embodiment of the present application provides a traffic scheduling apparatus, including:
A memory for storing program instructions;
a processor for invoking program instructions stored in said memory, performing the steps of the method according to any of the first aspects above in accordance with the obtained program instructions.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the first aspects.
In summary, it can be seen that the traffic scheduling method provided by the embodiment of the application is applied to a controller, and the method comprises the steps of obtaining full-network topology information and host ARP information, wherein the full-network topology information comprises all link relations and access interface information contained in all links, defining initial overhead values of all links contained in the full-network topology information, wherein the initial overhead value of one link is inversely proportional to the maximum bandwidth value of the link, determining source and destination end information of a task to be trained, and determining a target path for transmitting traffic of the task to be trained based on the source and destination end information of the task to be trained, the host ARP information and the overhead values of all links contained in the full-network topology information, wherein the target path comprises target links, and the overhead value sum of the target links is smaller than or equal to a preset value.
By adopting the flow scheduling method provided by the embodiment of the application, the controller maintains the overhead value of each link in the whole network topology, calculates the total overhead value of each path when selecting the route, and selects the path with the minimum total overhead value as the forwarding path of the training flow to be currently scheduled, thereby avoiding network congestion caused by uneven equipment load.
Detailed Description
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to any or all possible combinations including one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. Depending on the context, furthermore, the word "if" used may be interpreted as "at..once" or "when..once" or "in response to a determination".
In an intelligent data center network, the uplink bandwidth and the downlink bandwidth are 1:1, more equivalent-Cost Multi-Path routing (ECMP) links exist in the networking, under the condition of forwarding flow by flow, the switch equipment performs hash routing forwarding according to five-tuple and other calculation factors of the traffic, load balancing in the network is realized, and the traffic of a plurality of inlets hash ECMP to the same outlet. Other outlets have no traffic, resulting in load sharing imbalance and network congestion. As shown in fig. 1 below, the red link indicates that two sets of training tasks (node 1 and node2, node3 and node 4) are scheduled to the same Spine and the same egress interface, when the traffic is loaded onto the same Leaf as in the previous figure during training, the traffic is likely to be loaded onto the same path (egress interface) when the Spine goes to Leaf2, resulting in uneven traffic load and congestion in route selection on the Spine.
That is, in the intelligent data center networking at present, the switch devices have uneven hash or load, which causes network traffic congestion to be unable to be solved. The embodiment of the application provides a scheme for planning a forwarding path of a whole network through a controller and solving network congestion caused by uneven load.
Exemplary, referring to fig. 2, a detailed flowchart of a flow scheduling method according to an embodiment of the present application is shown, where the method is applied to a controller, and the method includes the following steps:
step 200, acquiring whole network topology information and host ARP information, wherein the whole network topology information comprises all link relations and access interface information included by all links.
In the embodiment of the application, the controller receives the whole network equipment, and can normally acquire the whole network topology and host ARP (Address Resolution Protocol ) information through a link layer discovery protocol (LINK LAYER Discovery Protocol, LLDP), and record the link relation and the access interface information of each link included in the whole network topology, and the controller can perform primary networking processing on the topology, namely, the link information (the link relation, the access interface information of each link) and the host ARP information are stored in a memory, so that the controller has the topology relation of a global view angle and the host ARP information.
In practical applications, the controller may obtain information of accessing a specific access device interface to a server (node, for example, a network card of the server) through the ARP information of the host. The training task traffic refers to the traffic between two nodes (e.g., node1- > node 2), so that the access device (a specific interface of the access device) to which the node1 is connected can be obtained according to the ARP information of the host, and the specific interface of the access device to which the node2 is connected.
Step 210, defining initial overhead values of links included in the network topology information of the whole network.
Wherein the size of the initial overhead value for a link is inversely proportional to the maximum bandwidth value for the link.
In the embodiment of the application, a Spine-Leaf two-layer network architecture is taken as an example for illustration, and networking comprises Spine1, spine2, leaf-1, leaf-2 and Leaf-3, wherein:
Laef-1 of the uplink interface 1 is connected with the downlink interface 1 of the Spine1, 2 of the uplink interface 2 is connected with the downlink interface 2 of the Spine1, 3 of the leaf-1 is connected with the downlink interface 1 of the Spine2, and 4 of the uplink interface is connected with the downlink interface 1 of the Spine 2;
The uplink interface 1 of the Leaf-2 is connected with the downlink interface 3 of the Spine1, the uplink interface 2 is connected with the downlink interface 4 of the Spine1, the uplink interface 3 of the Leaf-2 is connected with the downlink interface 3 of the Spine2, and the uplink interface 4 is connected with the downlink interface 4 of the Spine 2;
The uplink interface 1 of the Leaf-3 is connected with the downlink interface 5 of the Spine1, the uplink interface 2 is connected with the downlink interface 6 of the Spine1, the uplink interface 3 of the Leaf-3 is connected with the downlink interface 5 of the Spine2, and the uplink interface 4 is connected with the downlink interface 6 of the Spine 2.
The connection between the respective upstream interfaces of the Leaf device and the respective downstream interfaces of the Spine device is defined as the respective links.
At the time of network initialization, it is necessary to define an overhead value (cost value) of a link according to a link quality (e.g., a maximum available bandwidth of the link) of each link. Preferably, if the maximum available bandwidth of each link is the same, the overhead value of each link may be defined as an equivalent (e.g., as 1). That is, the overhead value (current overhead value) of each link maintained in the memory by the controller is 1.
Step 220, determining source and destination end information of a task to be trained, and determining a target path for transmitting the traffic of the task to be trained based on the source and destination end information of the task to be trained, host ARP information and overhead values of links included in the whole network topology information.
The target path comprises a target link, and the sum of the overhead value of the target link is smaller than or equal to a preset value.
In the embodiment of the application, the source and destination end information of the task to be trained is determined, and the cost value of each link included by the host ARP information and the whole network topology information is based on the source and destination end information of the task to be trained, and when the target path for transmitting the traffic of the task to be trained is determined, a preferred implementation mode is as follows:
According to the source destination information and the host ARP information, determining a first access device accessed by the source and a second access device accessed by the destination;
determining at least one path between the first access device and the second access device according to the whole network topology information;
Respectively calculating path overhead values of the at least one path according to overhead values of links included in the whole network topology information;
And determining a path with the path overhead value smaller than or equal to a preset value as a target path for transmitting the task flow to be trained according to the path overhead value of the at least one path.
In the embodiment of the application, before starting a training task, five-tuple information (source and destination end information) such as source and destination of the training task can be imported through an interface of a platform call controller, so that the controller can determine a first access device accessed by the source end and a second device accessed by the destination end through host ARP information, then the controller determines at least one forwarding path (each link included in each forwarding path) from the first device to the second device through network topology information, and finally, the controller determines the forwarding path with the smallest total cost value of each link as a target path for transmitting the training task flow based on the current cost value of each link maintained locally.
For example, assuming that the forwarding path from the first device to the second device includes a path 1 and a path 2, the path 1 includes a link 1 and a link 3, the path 2 includes a link 2 and a link 4, the total overhead value of the link 1 and the link 3 included in the path 1 is 1+1=2, and the total overhead value of the link 2 and the link 4 included in the path 2 is 1+3=4, it is determined that the path 1 is a target path for forwarding the training task traffic.
In practical application, the controller makes each network device forward the task traffic to be trained based on the forwarding flow table in a mode of issuing the high-priority forwarding flow table to each network device included in the target path. After the training of the task to be trained is completed, each network device is instructed to delete the corresponding forwarding flow table.
In the embodiment of the application, since the controller maintains the current overhead value of each link, after determining the target path for transmitting the task flow to be trained, the flow scheduling method can further comprise the following steps:
And updating the current overhead value of each target link included in the target path.
Specifically, when updating the current overhead value of each target link included in the target path, one preferred implementation is:
and accumulating the current overhead value of each target link included in the target path by 1.
In the following, an example will be described in which path 1 (including link 1 and link 3) is selected as a target path for transmitting training task traffic, and the current overhead value of link 1 is 1 and the current overhead value of link 3 is also 1. At this time, the controller adds up the overhead value of the link 1 to 1 and updates it to 2, and similarly, the controller adds up the current overhead value of the link 3 to 1 and updates it to 2.
In practical application, when updating the current overhead value of a link, a fixed value can be accumulated, or custom setting can be performed according to the flow of the training task carried up to date, for example, when the flow of the training task carried up to date is larger, the accumulated value is larger when updating the current overhead value of the corresponding link. If the training task flow is smaller than a certain value, 1 is accumulated, and if the training task flow is larger than a certain value, 2 is accumulated. In the embodiment of the application, a specific implementation manner is not limited.
Further, in the embodiment of the present application, when it is detected that the task to be trained is completed and the target path is released, the current overhead value of each target link included in the target path is subtracted by 1.
That is, after one training task is completed and the path (each link) corresponding to the training task is released, the current overhead value of each link needs to be subtracted by the value accumulated when the training task is carried, if the accumulated value is 1, the subtracted value is also 1.
Based on the same inventive concept as the above-described embodiments of the present application, referring to fig. 3, an exemplary schematic structural diagram of a flow scheduling device according to an embodiment of the present application is provided, where the device is applied to a controller, and the device includes:
An obtaining unit 30, configured to obtain full-network topology information and host ARP information, where the full-network topology information includes each link relationship and ingress and egress interface information included in each link;
A defining unit 31, configured to define an initial overhead value of each link included in the network topology information of the whole network, where a size of the initial overhead value of one link is inversely proportional to a maximum bandwidth value of the link;
The determining unit 32 is configured to determine source-destination information of a task to be trained, and determine a target path for transmitting traffic of the task to be trained based on an overhead value of each link included in the source-destination information of the task to be trained, the host ARP information, and the full-network topology information, where the target path includes a target link, and the sum of the overhead values of the target links is less than or equal to a preset value.
Optionally, the controller maintains a current overhead value for each link, and the apparatus further comprises:
and the updating unit is used for updating the current overhead value of each target link included in the target path.
Optionally, when updating the current overhead value of each target link included in the target path, the updating unit is further configured to:
and accumulating the current overhead value of each target link included in the target path by 1.
Optionally, determining source-destination information of a task to be trained, and determining a target path for transmitting traffic of the task to be trained based on an overhead value of each link included in the source-destination information of the task to be trained, host ARP information, and full-network topology information, where the determining unit 32 is specifically configured to:
According to the source destination information and the host ARP information, determining a first access device accessed by the source and a second access device accessed by the destination;
determining at least one path between the first access device and the second access device according to the whole network topology information;
Respectively calculating path overhead values of the at least one path according to overhead values of links included in the whole network topology information;
And determining a path with the path overhead value smaller than or equal to a preset value as a target path for transmitting the task flow to be trained according to the path overhead value of the at least one path.
Optionally, the apparatus further comprises a detection unit:
and when the detection unit detects that the training of the task to be trained is completed and releases the target path, the updating unit is further used for subtracting 1 from the current overhead value of each target link included in the target path.
The above elements may be one or more integrated circuits configured to implement the above methods, such as one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors (DIGITAL SIGNAL processor, DSP), or one or more field programmable gate arrays (Field Programmable GATE ARRAY, FPGA), or the like. For another example, when a unit is implemented in the form of a processing element scheduler code, the processing element may be a general purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the flow scheduling device provided by the embodiment of the present application, as for the hardware architecture schematic of the flow scheduling device, as shown in fig. 4, the flow scheduling device may include a memory 40 and a processor 41,
The memory 40 is used for storing program instructions and the processor 41 invokes the program instructions stored in the memory 40 to execute the above-described method embodiments according to the obtained program instructions. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present application also provides a controller comprising at least one processing element (or chip) for performing the above-described method embodiments.
Alternatively, the application also provides a program product, such as a computer-readable storage medium, having stored thereon computer-executable instructions for causing a computer to perform the above-described method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, or the like. For example, the machine-readable storage medium may be RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., hard drive), a solid state disk, any type of storage disk (e.g., optical disk, dvd, etc.), or a similar storage medium, or a combination thereof.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Moreover, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.