6. Discussion and conclusion
In this paper, we discuss the problem of controller placement and propose a general algorithm, named as Density Based Con troller Placement (DBCP), which finds the optimal controller number based on the density clustering and then places the controllers. We demonstrate that DBCP has several advantages compared with other methods. First, it provides the fast response and optimal solution. To obtain the solution of controller placement, DBCP only needs to run the algorithm at one time. In contrary, most conventional approaches obtain the solutions using an iterative method. Thus, for the large-scale network, the conventional approaches are infeasible. DBCP uses the density based clustering to analyze the whole network and separate the network into several internal tightly connected sub-networks, which helps to find the global optimal solution. Second, it can be implemented for a variety of applications and can be easily extended. DBCP only needs to configure one parameter dc, thus it can be implemented easily. Also, we can implement DBCP for different applications by changing the distance function and the placement objective functions. In this paper, the distance between two switches is the shortest path hops. In other applications, the distance function can be changed as the delay or physical distance. Using different objective functions, DBCP can provide different solutions to meet the requirements. Third, it can be easily deployed in the SDN maintenance stage. For a SDN network, a variety of reasons lead to the changes of network structure can occur due to different reasons. We can keep the value of ρ and δ, and update the value of the associated changed nodes to redeploy the networks within little cost.