ONOS: Load-balanced routing algorithm and application development (I.)

Source: Internet
Author: User

ONOS: Load-balanced routing algorithm and application development (I.)

First, Application introduction

When new traffic is initiated, the application chooses a route path for it with the least weight (weight/cost) in the sense of global load balancing.
This application will open source in the author's GitHub "Https://github.com/MaoJianwei/ONOS_LoadBalance_Routing_Forward"
This series of articles will also be synchronized in the author's blog "http://maojianwei.github.io/"

For load balancing, a simple example, in a three-node ring network, Host2 want to access Host1, there are some background traffic in the network, the current load of three lines are 800M, 600M, 400M, then take into account the 600M and 400M the path of the load smaller ( 600M), we will select this detour path for Host2 's visit. Is the author in the Onos Community mail-list "Https://groups.google.com/a/onosproject.org/forum/#!forum/onos-discuss" with the use of a picture.

The load balancing algorithm of this application mainly considers the load balance of path bandwidth. The bandwidth weights of a path are closely related to the bandwidth weights of each line that makes up the path. The bandwidth weights of a line can be divided into two kinds: one is the remaining bandwidth of the line, the other is the remaining bandwidth ratio of the line, that is, the proportion of the remaining bandwidth to the total bandwidth. Correspondingly, the bandwidth weight of a path corresponds to the minimum value of the remaining bandwidth of each line, and the minimum of the remaining bandwidth ratio of each line. From the point of view of balanced load, it is more suitable to use the latter as the bandwidth weight of the path.

Consider such a situation, although it may be relatively rare in the current network? There is a, b two paths between two points, but the work bandwidth of a path is larger than the B path, assuming A is 400g,b 350G, if the remaining bandwidth is the weight, then the first 50G traffic will pass through the a path completely, and the B path is completely idle. Back to the common scenario in the lab, the a path may be the fiber 10g,b path may be twisted pair 1G, in a different order of magnitude of the background, most of the time traffic will pass through a path, and B path will likely continue to idle. Therefore, if the residual bandwidth is measured, it is easy to cause the network traffic to cover only the high-speed link, and the low-speed link basically idle situation.

This application will use the remaining bandwidth ratio as the standard for the bandwidth weights, the formula is as follows:
Weight = linkrestbandwidth÷linklinespeedx100

In addition, Onos existing routing algorithm and weight calculation tool class, by default with smaller weights to represent a better link, so this application as one of the applications deployed in Onos, the above-mentioned weights have been transformed, the same with the minimum weight is the best, the final formula is as follows:
Weight =-(linkrestbandwidth÷linklinespeedx100)

second, the algorithm and the Onos realization correlation

The work of this application is divided into four parts: exploring, calculating weights, choosing roads and paving roads. The selection of the road section can be divided into a selection and selection of two parts. The first three parts are scoped to the load balancing algorithm. During the operation of the algorithm, our path result set will undergo gradual filtering:

Optional route path →→ preferred routing path →→ optimal routing path

Here is the author for everyone to explain the various parts:

1. Pathfinder

Starting from the beginning, we use the whole network topology diagram as input parameters, start the algorithm. Topology diagram is a graph of the data structure, the application of the source host as the starting point, the target host as the end point, recursive way, the DFS depth-first search, and to traverse through the entire topology map as the goal.

When each node is experienced, the node is logged and the link is passed, and the recursion is removed when it is returned. When the discovery reaches the target host, all node and link information logged at this time is consolidated into an optional routing path, recorded in the result set. During the discovery of the nodes that were experienced before the arrival, the routing loop is determined, and the backtracking is performed upward.
Finally, we will get multiple loops from the source host to the destination host, calling it an optional routing path.

2. Weight value

We will calculate the bandwidth weights for each optional route path. First, calculate the weights for each link on the path. We need to get the current operating rate of the link, and also to get the current traffic rate of the link, and calculate the weights by the formula described above:

Weight =-(linkrestbandwidth÷linklinespeedx100)

Second, select the maximum value of the weights for all links on the path, as the bandwidth weights for that path. Because the load of each link is different, according to the barrel effect, the link with the maximum load becomes the short plate of the whole path.

iii. selection of roads3.1 Preferred

By comparing the bandwidth weights of each path, we select a set of paths with lesser weights as the preferred route path. The weights for at least one path in this set of paths are the minimum values in the weights of all optional route paths. The difference between the weights of the remaining preferred route paths and the weights of the path is within the preset tolerance range.

Here the author wants to interrupt to introduce the meaning and function of the tolerance limits.
The meaning of tolerance range is that tolerance is not timely due to the existence of periodic interval because of the problem of collecting some information of different links, different equipment working parameters and statistics, and tolerating the problem of data error caused by the small positive and negative deviations of the underlying equipment in statistics. These two points are the systematic errors in the measurement, and some methods should be adopted to tolerate them.

In addition, the possibility of applying more routing strategies can be provided by first selecting a set of paths with similar loads. The "selected" Step in the routing section of the text algorithm below is an example.

The optimal selection scheme for the tolerance ratio should be differentiated and selected according to the operating rate of the different links, taking into account the deviation range of the actual equipment in the measurement and the length of the measurement cycle interval. Table 1 below shows the tolerance bandwidth range of the two sets of operating rates at different tolerance ratios, the smaller the tolerance ratio, the more accurate the load-balancing effect can be obtained in the case of device measurement accuracy and measurement interval permitting. The highlights in the table are the coarse tolerance reference values that can be selected under normal circumstances. Hope that the experience of the current network of predecessors and friends can be more advice, I am eager to reap the experience of engineering practice, thank you very much

Tolerance ratio

100M

1000M

Ten G

- G

100G

300G

350G

400G

0.1%

0.1M

1M

10M

25M

100M

300M

350M

400M

0.05%

0.05M

0.5M

5 M

A . 5 M

40,

150M

175M

200M

0.02%

0.02M

0.2M

2M

5M

20M

60M

70M

80M

3.2 Selected

After a preferred step, we have got a load-balanced sense of the routing path. At this point, we can apply additional routing strategies for further selection. This step is the optimization of the routing results, and it is also a method to introduce multiple route strategies for joint decision-making.

In this application, the selected strategy is a simple minimum hop count strategy. In the preferred routing path, select the first path with least hops as the optimal route path selected by the algorithm. The load balancing algorithm has also fulfilled its mission.

Four, paving

In Onos, the link between the network element devices is abstracted as link, and the device-to-terminal-host link is abstracted to edgelink. In the topology map we can get, we don't include the last kilometer of Edgelink. Therefore, you need to add a previous two edgelink to the entire path result, forming the complete path, and then sending the path decision to the network:
Sourceedgelink→→links→→destinationedgelink

ONOS: Load-balanced routing algorithm and application development (I.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.