# Load Balancing Oriented Predictive Routing Algorithm for Data Center Networks
## 3 Algorithm Design
### Implementation of the Algorithm
The main feature of the Dijkstra algorithm is that an array is used to save the shortest path distance from the starting point to other points, and the strategy of a greedy algorithm is adopted to traverse each time to the adjacent node of the nearest and unvisited vertex from the starting point and constantly update the array until it is extended to the end point. This work uses the Dijkstra algorithm as a part of the LLBR algorithm to calculate the path with the least cost [41]. ``` Input: The result of predict:\(R\); Source host:\(S\); Destination host:\(D\) Output: The path :\(P\)
1\(P\gets NULL\);\(C\gets NULL\);\(times\gets 0\);forall links:\(i,j\in(0,81)\)do
2 iftimes is odd numberthen
3\(C_{ij}\gets R_{ij}+L_{ij}+jump_{ij}\);
4 else
5\(C_{ij}\gets L_{ij}+jump_{ij}\);
6
7 Use dijsktra to compute path \(P\) final

## 4 Simulation Experiment

To verify the effectiveness and feasibility of the LLBR algorithm proposed in this paper, an experimental simulation environment was constructed. The proposed LLBR algorithm was verified experimentally by simulating the Fat-Tree topology of the data center network. In the same experimental environment, the experimental results of different network performance indicators of the LLBR, WRRS and RRS algorithms were compared and analyzed. ### Experimental Environment

The K = 8 Fat-Tree network topology was constructed on Mininet, as shown in Figure 4 (several switches and hosts were omitted). The topology consisted of 128 hosts and 80 switches. The Poisson distribution was used to simulate the request of data transmission in a DCN. A Floodlight controller collected the link occupation state of the data traffic transmission in the DCN. The Keras learning library was utilized to implement the model. ### Simulation Result

In this section, the simulation results for the transmission time, bandwidth, delay jitter, and packet loss rate of the three algorithms are compared and analyzed. The transmitted data in the experiment measure 185 Kbytes. Figure 5 depicts the cumulative distribution function of the time spent on the transmission data recorded by the three algorithms at 22 terminals within an hour. The LLBR algorithm had 90% port transfer time within 250 ms, while the RRS and WRRS algorithms had 40% port transfer time above 250 ms(Figure 5). The LLBR algorithm had a gentle transmission time, whereas the transmission time jitters of the WRRS and RRS algorithms were relatively large. Thus, the LLBR algorithm was reasonable for data transmission link allocation and reduced the delay. Figure 6 shows the cumulative distribution function of the bandwidth used to transmit data in the DCN as recorded by 22 terminals within an hour using the three algorithms. The bandwidth of the LLBR algorithm was better than that of the WRRS and RRS algorithms (Figure 6). Thus, the LLBR algorithm improved link utilization and reduced the numbers of idle links. Figure 4: Fat-Tree topology (K = 8). Figure 7 presents the cumulative distribution function of the delay jitter of the transmitted data recorded by 22 terminals within an hour using the three algorithms. When the LLBR algorithm and WRRS algorithms were used for data transmission, the delay jitter of 90% of the ports was within 1000 ms. By contrast, the delay jitter of 90% of the ports was all over 2000 ms when RRS algorithm was used for data transmission. This outcome indicated that the LLBR algorithm could be used to reasonably transfer large-scale and small-scale flows on the corresponding links, thereby reducing network congestion. Figure 8 illustrates the cumulative distribution function of the packet loss rate of the DCN transmitted by the 22 terminals recorded within an hour using the three algorithms. The packet loss rate of the LLBR algorithm was 0.02%, a figure which was far lower than that of the other two algorithms. Thus, the LLBR algorithm guaranteed the data transmission and reduced packet loss. Figure 5: Transmission time of three algorithms. Figure 6: Transmission bandwidth of three algorithms.