Background technology
Software defined network (Software-defined networking, is abbreviated as SDN), is a kind of network virtualization (Network virtualization) technology, is proposed by the Clean State of History of United States of America University of Denver plan.Utilize OpenFlow agreement, the key-course of router (control plane) is separated from data Layer (data plane), realize with software mode.This framework can allow network manager, not changing under the prerequisite of hardware device, with center control, by program again planning network, provides new method for controlling network traffics, and the good platform of core network and application innovation is also provided.
Load balancing (Load Balance, LB) refers to carries out load (task) balance, shares on multiple operating units and carry out, thus the thought of the task of jointly finishing the work.In network application, bandwidth, increase throughput that it provides a kind of effective transparent method of cheapness to come extended network equipment and server, Strengthens network data-handling capacity, flexibility and the availability of raising network.Wherein the load balancing of server is modal for this.On the one hand, along with the fast development of Internet and improving constantly of traffic carrying capacity, network data access flow increases rapidly, and the server of data center, large enterprise and portal website etc. is gradually by data submerge.On the other hand, with respect to the development of network technology, the growth of processor-server speed and internal storage access speed is but well below the growth of the network bandwidth and application service, the growth of the number of users that the network bandwidth brings when growth, also make server resource consumption serious, server becomes network bottleneck.For this reason, by setting up server cluster, utilize load-balancing technique between server, to carry out business equilibrium, become a kind of low cost, extendible effective solution.
In server load balancing, according to pass-through mode, common are NAT mode and DR mode.NAT (Network Address Translation) mode is used after the destination address of real server address rewrite request message by network address translation, then is forwarded.Which networking flexibility, back-end server can be positioned at different physical locations, in different local area network (LAN)s.And DR (Direct routing) mode only has client's request message by LB equipment, the response message of server, without LB, has reduced the load of LB equipment like this, has alleviated the bottleneck effect of LB equipment.With regard to load-balancing algorithm, be mainly divided into static state and dynamic algorithm.State algorithm comprise wheel turn, at random, priority etc., their realize simple, but lack service-aware; Dynamic algorithm comprises and minimum connecting, fast mode, predictive mode etc., and their portfolio effects are better, but realize more complicated.The input of existing server load balancing mode is high, extensibility and very flexible, and the problems such as reliability deficiency can be introduced software defined network and solve, and the present invention therefore.
Summary of the invention
The object of the invention is to provide a kind of distributed server load-balancing method based on SDN, SDN controller management is through the turnover flow of SDN network access server cluster, and energy integrated network equipment, server load and user's particular demands, dispose dynamic extendible load balancing, guarantee continuity, reliability, the promptness of customer service.This method can solve the shortcomings such as in existing load balancing scheme, input cost is high, autgmentability is poor, reliability is not enough.
In order to solve these problems of the prior art, technical scheme provided by the invention is:
A distributed server load-balancing method based on SDN, is characterized in that said method comprising the steps of:
(1) user enters into SDN network to the access request of server by the access port of SDN network;
(2) if while having disposed the routing rule that mates this request on the SDN network equipment that user asks to arrive, the SDN network equipment is carried out network operation collection corresponding to coupling; Otherwise access request is passed to SDN controller by the SDN network equipment,, and network operation rule is deployed on the corresponding SDN network equipment and is carried out by the corresponding SDN network equipment according to load-balancing algorithm decision networks operation rules by controller;
(3) server is processed the access request of final arrival, and feedback request result;
(4) the SDN network equipment receives after the feedback result of server, if while having disposed the routing rule that mates this feedback result on the SDN network equipment that feedback result arrives, the SDN network equipment is carried out network operation collection corresponding to coupling; Otherwise feedback result is passed to SDN controller by the SDN network equipment,, and network operation rule is deployed on the corresponding SDN network equipment and is carried out by the corresponding SDN network equipment according to load-balancing algorithm decision networks operation rules by controller;
(5) user receives the feedback result of final arrival, finishes.
Preferred technical scheme is: in described method, network operation collection comprises forwarding data bag, packet discard, territory, modification packet header.
Preferred technical scheme is: described SDN network has multiple external access ports, and user enters into SDN network to the access request of server by any access port of SDN network.
Preferred technical scheme is: described SDN network design several servers server cluster, SDN controller, the SDN network equipments that form, the wherein SDN network equipment and server interconnect, for carrying out the forwarding of data Layer; SDN controller, for the realization of key-course, is the management level of network, is responsible for network monitor and routing management.
Preferred technical scheme is: described SDN controller operates on server, and SDN network is carried out centralized control or form cluster by multiple controllers jointly managing by a controller.
Preferred technical scheme is: the described SDN network equipment is SDN switch or conventional switch or the router device with SDN switch function.
Preferred technical scheme is: described access port is in SDN network edge, and the SDN network equipment being connected with outer net.
Preferred technical scheme is: described load-balancing algorithm is can be in conjunction with server and the each apparatus of load situation of network itself and application demand, realizes the load-balancing algorithm of dynamic routing scheduling.
Preferred technical scheme is: the server formation one-to-many network that is connected with multiple SDN network equipments in described SDN network, or a SDN network equipment is connected with multiple servers and forms one-to-many network, or the SDN network equipment and the cascade of the SDN network equipment.
Preferred technical scheme is: described SDN network forms the part that is selected from one of data center network, Web server cluster, content distributing network or combination of network.
The present invention is mainly devoted to solve in existing network server end load balancing mode and drops into high, extensibility and very flexible, the problems such as reliability deficiency.This method is utilized software defined network (SDN) key-course and is forwarded layer framework advantage being separated, user access request arrives on certain equipment of SDN network, by SDN controller according to network operation state, dynamically, by extremely suitable server of user's request scheduling, realize the load balancing of server.The method can provide from access, be forwarded to the comprehensive fault-tolerant of service, and the total capability for load of fully excavating server cluster improves autgmentability and the reliability of whole system operation.
With respect to scheme of the prior art, advantage of the present invention is:
1. this method can be collected each server in real time, and each load of network equipment situation, for keeper analyzes flow, deployment load-balancing decision provides data accurately and reliably.
2. this method moves to network route management unification on SDN controller and carries out, and keeper can dispose, change load balancing scheme neatly according to business demand and variation, and does not affect the normal work of server.
3. this method provides from access access, is forwarded to the omnibearing multipath mechanism of service, has both shared flow, has expanded power system capacity, and redundancy is provided again, has strengthened reliability.
4. this method is applied widely, is applicable to most load balancing scenes such as data center, Web service station.
Embodiment
Below in conjunction with specific embodiment, such scheme is described further.Should be understood that these embodiment are not limited to limit the scope of the invention for the present invention is described.The implementation condition adopting in embodiment can be done further adjustment according to the condition of concrete producer, and not marked implementation condition is generally the condition in normal experiment.
Embodiment
The distributed server load-balancing method based on SDN of the present embodiment, adopts topological join dependency equipment as shown in Figure 2, and controller is responsible for disposing the access burden that dynamic strategy is carried out balanced each Web server.As shown in Figure 1, in user access request distributed earth access load balancing network, SDN controller is according to network operation loading condition, unified decision-making, request is forwarded to suitable server by Dynamical Deployment route, completes the load balancing of server end, said method comprising the steps of:
(1) the SDN load balancing network that is deployed with server cluster has multiple external access ports, and to the access request of Web server, any from two access ports enters into SDN network to user;
(2) when on the SDN network equipment that request arrives while having disposed the routing rule that mates this request, carry out corresponding network action as being forwarded to down hop, abandon etc.;
(3) when not mating the routing rule of this request on the SDN network equipment that request reaches, request is delivered to SDN controller, is moved, and result is deployed on corresponding network equipment and is carried out by controller according to dynamic LB algorithm decision networks;
(4) server provides service to the request of final arrival, and feedback request result;
(5) the SDN network equipment receives after the feedback result of server, according to the step similar to (2) by feedback forward go back, but not necessarily along request come time process forward-path return.
SDN load balancing network refers to the network that is subject to SDN controller management, and it can provide the load balancing routing scheduling of service-oriented device.This network is mainly made up of SDN controller, network forwarding equipment, server.SDN controller is the management level of network, is responsible for network monitor and routing management, is normally operated on high performance server.Described controller may only have one, realizes simple centralized control, may be also multiple controller composition clusters, common supervising the network.The SDN network equipment mainly refers to SDN switch, for example Openflow switch.In network, also can comprise some traditional switches, router device, now network is mixed type, but will guarantee that controller is still controlled to network on the whole.
The access request of different user may enter into SDN load balancing network by different access ports.Here access port refers to SDN network edge, the SDN network equipment being connected with outer net.In the time of the situations such as some access port fault, obstruction, user's request can continue request service by other access ports.
Load-balancing algorithm mainly refers to can be in conjunction with server and the each apparatus of load situation of network itself and application demand, realizes the load-balancing algorithm of dynamic routing scheduling, continues to continue to use traditional load-balancing algorithm but do not get rid of through transformation.With regard to load-balancing algorithm, be mainly divided into static state and dynamic algorithm.State algorithm comprise wheel turn, at random, priority etc., their load Decision of Allocation is pre-determined, realize simple, but lack service-aware, often poor effect; Dynamic algorithm has: minimum connection, forward the server that new connection is carried out minimum connection processing to those; Fast mode, forwards and connects the server the fastest to those responses; Dynamic property is distributed, and according to the application program of collecting and server various performance parameters, dynamically adjusts assignment of traffic etc., and they can response server, network state, and portfolio effect is better, more complicated in realization.In traditional network, these dynamic algorithms are often by special LB device assumes, and input cost is high, and server cluster overall performance is easily restricted, and LB policy deployment can not meet the requirement of user to flexibility, autgmentability.This method has solved above problem, has given dynamic LB algorithm high reliability, autgmentability, more can meet the diversified demand of user.
Controller can active monitoring network operation state, and discovery server, network equipment failure etc. are abnormal in time, dynamically adjust route, the stability of maintenance service, continuity.In SDN network, a server can be connected with multiple SDN network equipments, and SDN network equipment can with zero, or multiple server is connected.Described method goes in the networks such as data center network, Web server cluster, content distributing network.
In this example, SDN load balancing network is by 4 SDN switches, and 2 controllers, 8 Web servers form.Wherein SDN switch adopts current application Openflow switch the most widely, and supports Openflow1.3 protocol version, to meet various demand for control.2 controllers are born by two high-performance servers on hardware, on software, dispose load balancing scheme based on the controller of increasing income (as Opendaylight, Floodlight etc.).Two controllers adopt two-node cluster hot backup work pattern, have also shared control flow when redundancy is provided.On 8 Web servers, there is identical web content, to wherein any to conduct interviews be of equal value.
The network that the present embodiment provides is by two external access ports, not only user ask can be from wherein any enters, and the request quantity of receiving when two access ports is when unbalanced, before request arrives server, just will first carry out the load balancing of inter-exchange, prevent that the congested server performance that causes of network itself from cannot give full play to.Two access ports externally provide identical IP address, and controller guarantees to be routed on correct server in the action of switch deploy address transition.
In the present embodiment, network monitoring module is installed in controller, it is mainly responsible for collecting following aspect data: the request scale 1) arriving by two access ports changes, as the foundation of assessment overall load.2) pass through the port of each switch, request quantity, the data transmit-receive speed etc. of stream list item, thereby judge the liveness of link load, request.3) response delay of server, available resources etc.Stand-by period after response delay can send by a request of the instrument tests such as Ping; Available resources are the measurement of load factor in other words, can bring in realization by install and measure client on server.Load-balancing algorithm, in implementation process, carries out LB decision-making according to above data, to reach following effect: and on the one hand, by 1) and 2) middle data, guaranteeing that each SDN switch and link there will not be overload, flow overall distribution in network is comparatively even; On the other hand, by 3) in data, guarantee the resource utilization of each server, average retardation is roughly suitable.
Map network monitoring modular, the load-balancing algorithm adopting in this example is dynamic optimal service device distribution method, be the first step determine select an optimal service device process request, selection according to being a performance function, determined by response delay and resource utilization.Response delay is less, and available resources (CPU, internal memory) are more, and performance is more excellent.Second step is determined forward-path, in the situation that can not causing switch and link to occur overload, selects one to postpone minimum path forwarding.Algoritic module runs on controller software, can dynamic load, adjustment, and keeper also can be according to safety, business demand oneself configuration forwarding strategy.At the beginning of the network operation, can first forward rule in respective switch deploy acquiescence, can avoid so new access to arrive time, because switch request controller issues the delay that stream table causes.Network monitoring module is periodically to each switch, server lookup service data, and to guarantee the real-time of LB strategy, the accumulative total of statistics can be used for the variation of analysis user flow simultaneously, improves the adaptability of LB algorithm.
In Fig. 2, some Web servers are connected with multiple switches, and what have is only connected with a switch.In theory, linking number is more, and redundancy is higher, and load capacity is stronger, but in fact will be in conjunction with server, switch ports themselves data and disposal ability, selects suitable linking number to realize Performance Match.In this example, between switch, between server and do not require that hardware performance is consistent, in the time of device upgrade, original equipment can continue to remain work, new switch, server apparatus configures rear startup operation, controller end can be found automatically, upgrades Global Topological, redeploys LB strategy.
In the present embodiment, access side has two switches to bear, full-mesh between four switches, and Single Point of Faliure can not affect the connectedness of network arbitrarily.We select 2 and have realized dual-port connection as example in 8 servers, are the impact bringing in order to reduce Single Point of Faliure equally.On the one hand, when switch, server, or when link occurs fault, the monitoring modular of controller can be found in the short period of time; On the other hand, also defined switch initiatively to controller reporting fault, abnormal mechanism in Openflow agreement, the combination of main quilt flowing mode can guarantee that controller makes route adjustment in time like this, allows flow walk around fault point and normally moves.Meanwhile, controller can generate fault and exception reporting, for keeper location, analysis of failure facilitate.
In the present embodiment, the feedback result of server is transferred to SDN network and mainly considers the load balancing of network self.Now, enter in network just as originally user's the request of the feedback of server, finally go out from certain access port through forwarding.Due to presence server problem of load balancing not, can not cause link overload to the main finger of equilibrium of feedback flow.For connecting the server of multiple switches, it can independently determine the link reply feedback result of whether coming along request.
Above-described embodiment is only explanation technical conceive of the present invention and feature, and its object is to allow person skilled in the art can understand content of the present invention and implement according to this, can not limit the scope of the invention with this.All equivalent transformations that Spirit Essence does according to the present invention or modification, within all should being encompassed in protection scope of the present invention.