{'fraction_non_alphanumeric': 0.023073989321128908, 'fraction_numerical': 0.006578947368421052, 'mean_word_length': 5.0630057803468205, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Distributed Dynamic Adaptive and Fast Balancing SDN Controller Management

Tradition Software Defined Network (SDN) suffers from single point failure and uneven load distribution problems. Multiple SDN controllers work together to construct a distributed dynamic adaptive cluster with dynamic load balancing for large scale SDN switch stream requesting. Introducing such features as CPU, memory and network load, a Dynamic Adaptive and Fast algorithm (DAF) can select source, target and destination SDN controllers to balance load dynamically. The results of experiments show that DAF works well and improve the cloud service system throughput.


Introduction
Software Defined Network (SDN) becomes a promising network paradigm, separating the control plane and data plane in networks. SDN supports the control and management of the network through software programming, improving the flexibility and maneuverability in the implementation of new network technologies and protocols [1]. A SDN based architecture for enhancing the data transmission performance in cloud based applications (smart grid, smart healthcare and smart city, etc) become more and more popular [2].
Solutions of load balancing schemes of multiple controllers can be divided into two categories: centralization and distribution. ElastiCon uses a centralized load adapter responsible for collecting load information of the all controllers and adjusting the number of controllers in the controller pool based on the workload information [3]. The method measures the migration cost with a single factor to achieve load balancing between multiple controllers. In the centralized controller system, once the controller fails, it will cause paralysis of the entire network [4] [5].
It becomes more and more important for the SDN controller to make balance decision locally by gathering load information of all controllers [6] [7]. A load balancing strategy allows every controller makes load balancing strategies locally in [6]. The authors of [7] present a load informing strategy based on [6] to lower the frequency of load informing. They use only a factor to evaluate the load state of controllers.
Aiming at the single point failure and uneven load distribution problems of the SDN management, we design a distributed dynamic load balancing SDN controller mechanism. The distributed SDN controller cluster technology is applied to manage the smart cloud network, which avoids the paralysis of the network due to the failure of the single controller. After comprehensively evaluate the load status of controllers from four aspects of CPU, memory, switch and message rate, a distributed dynamic adaptive and fast load balancing algorithm (DAF) is proposed for cloud service.
The remainder of this paper is organized as follows: Section 2 gives the distributed SDN controller

System Architecture
With the increasing number SDN switches, single SDN controller cannot satisfy the massive requesting stream. Multiple SDN controllers are constructed to a distributed system to control a lot of SDN switches corporately. The distributed SDN controller system architecture is shown in Fig.1.  Since the SDN switches with big scale on the data forward layer may cause massive control requirements, single SDN controller cannot support massive flow table refresh requirements. Multiple SDN controllers construct a distributed SDN controller cluster which control massive SDN switches through the southbound interface. Real time network state information (RNSI) is shared in the SDN control cluster and then used to balance the load. Through the northbound interface, the SDN controller cluster can interact with such flow aware system network applications as OpenStack to improve the application user experience and whole network utility. The integration between OpenStack and SDN can provide better services for users. Based on the OpenFlow protocol, switches matching and updating its flow table flexibly by the rules controller issued. Various applications realize various functions based on SDN, and the transferred data are the changing reason for the SDN switch. It is also the scheduling objective for SDN controller to make the cloud service application working faster and fairer.

Load Balancing Module
A load balancing module is designed to carry out the load balancing strategy in the SDN controller. The DAF algorithm is implement in the load balancing module. The main components of the load balancing module are shown in Fig. 2.  load information of each controller in the system. The load information interaction section is used for a controller sending its load information to other controllers. The load balancing decision section is liable for making load balancing decisions. The switch migration part is in charge of moving the selected switch to balance the load among controllers.

Dynmic Load Balancing Algorithm
It is important to realize a load balancing strategy to dynamically adjusts the load of controllers based on the real-time load state from SDN. When the system has an overloaded controller, it triggers the controller to execute the load balancing strategy.

Dynamic Adaptive and Fast Load Balancing Algorithm
Dynamic Adaptive and Fast Load Balancing (DAF) algorithm balances the load among controllers and improves the throughput of the cloud application system by dynamically adjusting switch-controller mapping in the whole cloud network. The detailed steps are shown in Algorithm 1. Where, L now / L pre is the current/previous load value, Thr is the load threshold, T and R t are the testing period and roundtrip time, count is the number of controllers, and q,x1,x2,µ1,µ2 are weight coefficients factors.
Each controller uses the load-aware part to periodically collect its own load information. A load interaction component judges whether controllers needs to send it to others to complete the load information interaction among controllers (algorithm 1 line 3). The controller triggers the switch migration action when the controller's load value exceeds its threshold. The overloaded controller use load balancing decision part to select the source controller, the target switch, and the destination controller (algorithm 1 line 5~7), then the target switch is migrated from the source controller to destination controller. Finally, after completing the migration, controllers continue to update its load information and to interact with other controllers.

Source, Target, and Destination Controller Algorithm
In DAF, the source, target and destination controller functions are completed in three functions: srcControllerSelect(L now , Thr, count), target Switch Select(R s , overLoadId), dstConSelect(x 1 , x 2 , µ 1 , µ 2 , targetSwId, targetR s , R t ), respectively. srcControllerSelect function performs separate processing according to the number of overloaded controllers. When there is only one controller in overloaded condition, this controller is selected as the source controller. We calculate the overload rate (R overload ) of each overloaded controller by Equation 1.

R overload = (L now -Thr)/Thr
(1) And then, we sort the overloaded controllers in descending order with their overload rate and select the controller with the highest overload rate as the source controller.
After selecting the source controller, we choose which switches to be migrated in the function targetSwitchSelect. Through the load awareness part, we obtain the average message request rate (R s ) from each switch. The bigger the R s value is, the switch brings more loads to source controller. In order to reduce the load of the source controller, we sort the switches controlled by the overloaded controller in descending order with R s and select the switch with the highest R s as the target switch.
In dstConSelect function, we take the load value of destination controllers and the RTT value between destination controllers and target switch into account. We choose the highest priority controller from controllers, which is not overloaded and satisfies the constraint given in Equation 2, as the destination controller. If there are several such controllers, we will choose randomly.

Experiment Analysis
To evaluate the effectiveness of DAF algorithm, we realize DAF based on Floodlight [8]. Mininet [9] is used to simulate SDN environment and Cbench [10] is used to measure the maximum rate of Packet-In messages.
Comparing the DAF algorithm with the static algorithm and injection proposed in [7], this scheme can verify whether the DAF algorithm can effectively improve the throughput of a cloud application system. We set load threshold to 80%, monitoring period is 1s. The total number of Packet-In messages processed per second by all controller in the system will be counted as system throughput. the switch is triggered to encapsulate the packets into Packet-In messages and report the messages to the controller. From 0 to 10s, packets is send to each controller in 8000 pps (Packet-In messages per second).. Secondly, we injected 15000 pps to C A , 6000 pps to C B and 3000 pps to C C at the time of 11s. We plot the results in Fig.3.  Fig. 3 shows, from 0 to 10s, in static algorithm, the system throughput is approximately equal to that in DAF algorithm. That is because the total number of Packet-In packets is less than the number that controllers of the cloud system can handle. However, from 11 to 20s, the system throughput in static algorithm is lower than that in DAF algorithm. Since the variance of Packet-In requests leads to load imbalance among controllers, C A is overloaded and Packet-In packets begin loss due to buffer overflow. In DAF algorithm, overloaded C A will trigger load balancing strategy, and the partial load of C A will be shift to C C dynamically without causing the C C to be overloaded, so the total throughput of cloud system gets increased.

Conclusion
Aiming at single point failure and load imbalance in SDN based cloud network, we designed a distributed SDN controller cluster system with dynamic balancing capability. DAF algorithm is proposed based on RNSI. DAF algorithm can support massive SDN switches with scalability. The experimental result shows that the distributed DAF based SDN controller cluster shortens the time of balancing and improves the throughput of cloud application system. In the future, we intended to optimize the load factors and load balancing decision scheme for the distributed SDN controller cluster.