CN105577729B - Load balancing method and device - Google Patents

Load balancing method and device Download PDF

Info

Publication number
CN105577729B
CN105577729B CN201410555510.5A CN201410555510A CN105577729B CN 105577729 B CN105577729 B CN 105577729B CN 201410555510 A CN201410555510 A CN 201410555510A CN 105577729 B CN105577729 B CN 105577729B
Authority
CN
China
Prior art keywords
controller
switch
data
switches
characterization parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410555510.5A
Other languages
Chinese (zh)
Other versions
CN105577729A (en
Inventor
喻敬海
张道伟
吴少勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201410555510.5A priority Critical patent/CN105577729B/en
Priority to PCT/CN2015/071446 priority patent/WO2015131699A1/en
Publication of CN105577729A publication Critical patent/CN105577729A/en
Application granted granted Critical
Publication of CN105577729B publication Critical patent/CN105577729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/645Splitting route computation layer and forwarding layer, e.g. routing according to path computational element [PCE] or based on OpenFlow functionality

Abstract

The invention discloses a method and a device for load balancing, wherein the method comprises the following steps: collecting data of characterization parameters of a plurality of switches managed and controlled in each SDN controller of a cluster Software Defined Network (SDN) controller; according to the data of the characterization parameters of the plurality of exchangers, predicting the data of the characterization parameters of the plurality of exchangers at the next moment; and according to the estimated data of the characterization parameters of the switches at the next moment, carrying out load balancing on each SDN controller of the cluster SDN controllers. According to the method and the device, the problem of uneven load of the cluster SDN controller in the related technology is solved, load balancing is performed through the estimated data, the method is high in realizability, and the resource utilization efficiency of the cluster SDN controller is improved.

Description

Load balancing method and device
Technical Field
The invention relates to the field of communication, in particular to a load balancing method and device.
Background
Software Defined Networking (SDN) technology was originally a new network innovation architecture proposed by the university of stanford clean slate research group, usa. The Openflow (OF for short) protocol OF the core technology realizes flexible control OF network flow by separating a control plane and a data plane OF network equipment, and provides a good platform for innovation OF a core network and application.
An SDN network consists of three parts: including SDN controllers, secure channels, and SDN switches. The SDN controller is network control software designed according to an OpenFlow protocol, and is used to manage data flow, configure network devices, formulate a flow table (FlowTable), and undertake communication between network services and the network devices. There may be multiple controllers in a domain, but typically only one controller is in a control, management state. The SDN switch is managed and controlled by an SDN controller, a flow table formulated by the controller is stored, and the processing mode of the message is determined by inquiring table items of the flow table, wherein the processing mode comprises forwarding, caching, submitting the controller or discarding and the like. The secure channel under the OpenFlow protocol is used for connecting the switch and the controller for the communication between the switch and the controller.
With the development of the SDN technology, the SDN controller cluster technology is also increasingly applied. Under the multi-controller architecture OF the SDN network, each controller controls a certain number OF switches, if packet-in messages reported by a switch controlled by a certain controller are too much or the number OF issued flow tables and the OF interaction information amount OF the switch are too large, the controller can generate a large control flow at a certain time, and the controller can become a bottleneck OF the whole controller cluster for processing network flow, so that the performance OF the whole controller cluster is affected.
When network flow fluctuation is large, a switch under a certain controller reports a large amount OF packet-in messages (a special message OF an OpenFlow protocol, which is specially used for sending a flow which cannot be matched or a specified matched flow to a controller) or other OF (OpenFlow) messages, the controller may also issue a large amount OF flow tables, and other controllers only receive a small amount OF packet-in messages and other OF messages, at this time, the number OF flow tables issued by the controller is not large, which may cause some controllers to control overload, and some controllers far do not reach a control load saturation state. In order to alleviate the occurrence of such a situation, the switches managed and controlled by each controller need to be adjusted at any time, so that load balancing of the controllers is achieved at any time, and the control performance of the whole controller cluster is improved.
The related art only proposes to add a shared storage area among a plurality of controllers to realize inter-controller communication, and does not realize load balancing of the controllers, however, when network traffic fluctuation is large, the problem of load imbalance of the controllers is not solved.
For the problem of uneven load of a cluster SDN controller in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The invention provides a load balancing method and device, which are used for at least solving the problem of uneven load of a cluster SDN controller in the related technology.
According to an embodiment of the present invention, there is provided a load balancing method, including: collecting data of characterization parameters of a plurality of switches managed and controlled in each SDN controller of a cluster Software Defined Network (SDN) controller; according to the data of the characterization parameters of the plurality of exchangers, predicting the data of the characterization parameters of the plurality of exchangers at the next moment; and according to the estimated data of the characterization parameters of the switches at the next moment, carrying out load balancing on each SDN controller of the cluster SDN controllers.
In this embodiment, the characterization parameter includes at least one of: packet-in message number, flow table number, and OF message number except for the packet-in message number.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time includes: and predicting data of the characterization parameters of the plurality of switches at the next moment by using a least square method.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time by using a least square method includes: for each switch, calculating the data of the characterization parameter of each switch at the next moment by using the following least square mathematical model: y ═ α + β × x, where x is data of the characterization parameter at the current time, and y is data of the characterization parameter at the next time; the values of the parameters α and β are calculated according to the following equations:
Figure GDA0002132464100000021
wherein n is the number of times in the current statistical period, X is a timestamp corresponding to the time, and Y is the value of the characterization parameter of each switch.
In this embodiment, the data of the characterization parameter includes sample history data of the characterization parameter and data of the characterization parameter at each time in the current statistical period; according to the data of the characterization parameters of the switches, estimating the data of the characterization parameters of the switches at the next moment comprises the following steps: and predicting the data of the characterization parameters of the plurality of switches at the next moment according to the sample historical data of the characterization parameters of the plurality of switches and the data of the characterization parameters at each moment in the current statistical period.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time includes: estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters at each moment in the current statistical period; and summing and averaging the sample historical data of the characterization parameters and the estimated data of the characterization parameters at the next moment.
In this embodiment, load balancing, according to the estimated data of the characterization parameters of the switches at the next time, each SDN controller of the cluster SDN controllers includes: calculating the ratio P of the estimated value of each controller to the corresponding historical maximum value of the characteristic parameter according to the estimated data of the characteristic parameters of the plurality of switches at the next momentYHi: calculating a ratio P of the total estimated value of the whole controller cluster to the maximum value of the total history for the characterization parameterYHv: will PYHiAnd PYHvAnd comparing, and adjusting the switch controlled by the controller according to the comparison result.
In this example, PYHiCalculated by the following formula:
Figure GDA0002132464100000031
wherein n is the number of switches managed by each controller, YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximum values for the characterization parameters for each switch managed by the controller; and/or, PYHvCalculated by the following formula:
Figure GDA0002132464100000032
wherein m represents the number of controllers, n represents the number of switches managed by each controller, and YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximums for the characterization parameters for each switch controller managed.
In this embodiment, P isYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes: to a plurality ofAnd setting a proportionality coefficient for different characterization parameters, wherein the proportionality coefficient is used for expressing the proportion of each characterization parameter in the comparison process.
In this embodiment, P isYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes: for each controller, when it is PYHiGreater than PYHvCalculating the switch to be called out, and calling out the switch according to the calculation result; and/or, for each controller, when it is PYHiLess than PYHvAnd calculating the switch to be called in, and calling in the switch according to the calculation result.
In this embodiment, calculating the switch to be called out, and calling out the switch according to the calculation result includes: for controller calculation
Figure GDA0002132464100000033
Is set as ByosizeAnd obtaining B according to the previously set proportionality coefficientosizeWherein the proportionality coefficient is used for representing the proportion of the plurality of characterization parameters in the comparison process; deriving B from the predicted data for each switchinext=Yinext(ii) a According to BinextThe values of the data are arranged in an ascending order for the switches controlled by the controller to obtain a switch queue; selecting switches from the switch queue from top to bottom, and cumulatively counting B to move out of the switchinextIf not greater than BosizeContinuing to select the switch; and adding the selected switch to be mobilized into a switch pool to be mobilized, wherein the switch pool to be mobilized is used for storing the information of the switch to be mobilized.
In this embodiment, calculating the switch to be accessed, and calling the switch according to the calculation result includes: for controller calculation
Figure GDA0002132464100000034
Is set as ByisizeAnd obtaining B according to the previously set proportionality coefficientisizeWherein the proportionality coefficient is used for representing the proportion of the plurality of characterization parameters in the comparison process; according to BisizeValue of (A)And (4) performing descending arrangement on the controllers, and then sequentially calling the switches according to the load of the controllers.
In this embodiment, sequentially calling the switch according to the controller load includes: according to B of each switch to be transferred in the switch pool to be transferredinextThe values of the switches are arranged in a descending order to obtain a switch queue, wherein the switch pool to be mobilized is used for storing the information of the switches to be mobilized; for each controller, selecting a switch from the queue from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextThen the next switch is checked until the last switch.
According to another embodiment of the present invention, there is provided a load balancing apparatus including: the system comprises a collection module, a processing module and a processing module, wherein the collection module is used for collecting data of characterization parameters of a plurality of switches managed and controlled in each SDN controller of the cluster software defined network SDN controllers; the estimation module is used for estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters of the plurality of switches; and the load balancing module is used for carrying out load balancing on each SDN controller of the cluster SDN controllers according to the estimated data of the characterization parameters of the switches at the next moment.
According to the method, data of the characteristic parameters of a plurality of switches managed and controlled in each SDN controller of a cluster software defined network SDN controller are collected; according to the data of the characterization parameters of the plurality of exchangers, predicting the data of the characterization parameters of the plurality of exchangers at the next moment; according to the estimated data of the characterization parameters of the switches at the next moment, a load balancing mode is performed on each SDN controller of the cluster SDN controllers, the problem that the cluster SDN controllers in the related technology are uneven in load is solved, the estimated data are used for performing load balancing, the method is high in realizability, and the resource use efficiency of the cluster SDN controllers is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of load balancing according to an embodiment of the invention;
FIG. 2 is a block diagram of an apparatus for load balancing according to an embodiment of the present invention;
figure 3 is a block diagram of a SDN controller according to a preferred embodiment of the invention;
FIG. 4 is a flow diagram of a switch tuning into a controller in accordance with a preferred embodiment of the present invention;
FIG. 5 is a flow diagram of a cluster controller load balancing scheduling in accordance with a preferred embodiment of the present invention;
FIG. 6 is a schematic diagram of intra-domain controller and switch allocation according to the preferred embodiment 1 of the present invention;
fig. 7 is a schematic diagram of intra-domain stack controller and switch allocation according to preferred embodiment 3 of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The related art only proposes that a shared storage area is added among a plurality of controllers to realize communication among the controllers, and load balance among the controllers is not realized, however, when network traffic fluctuation is large, the problem of load imbalance of the controllers is not solved, and the problem is solved by the method of predicting and scheduling the switches managed by the controllers through the network traffic.
In this embodiment, a method for load balancing is provided, and fig. 1 is a flowchart of a method for load balancing according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, collecting data of characterization parameters of a plurality of switches managed and controlled in each Software Defined Network (SDN) controller of a cluster SDN controller;
step S104, estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters of the plurality of switches;
step S106, carrying out load balancing on each SDN controller of the cluster SDN controllers according to the estimated data of the characterization parameters of the switches at the next moment.
According to the method, the data of the characterization parameters of the multiple switches controlled in each SDN controller are collected, the data at the next moment are pre-estimated according to the collected data, and then the load balancing is performed on each SDN controller according to the pre-estimated data at the next moment of the characterization parameters, so that the load balancing of the cluster SDN controllers is achieved, the problem that the cluster SDN controllers in the related technology are not uniform in load is solved, the load balancing is performed through the pre-estimated data, the method is high in realizability, and the resource use efficiency of the cluster SDN controllers is improved.
In this embodiment, the characterization parameter includes at least one of: packet-in message number, flow table number, and OF message number except for the packet-in message number.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time includes: and predicting data of the characterization parameters of the plurality of switches at the next moment by using a least square method.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time by using a least square method includes: for each switch, calculating the data of the characterization parameter of each switch at the next moment by using the following least square mathematical model: y ═ α + β × x, where x is data of the characterization parameter at the current time, and y is data of the characterization parameter at the next time; the values of the parameters α and β are calculated according to the following equations:
Figure GDA0002132464100000051
wherein n is the number of times in the current statistical period, X is a timestamp corresponding to the time, and Y is the value of the characterization parameter of each switch.
In this embodiment, the data of the characterization parameter includes sample history data of the characterization parameter and data of the characterization parameter at each time in the current statistical period; according to the data of the characterization parameters of the switches, estimating the data of the characterization parameters of the switches at the next moment comprises the following steps: and predicting the data of the characterization parameters of the plurality of switches at the next moment according to the sample historical data of the characterization parameters of the plurality of switches and the data of the characterization parameters at each moment in the current statistical period.
In this embodiment, estimating data of the characterizing parameters of the switches at the next time includes: estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters at each moment in the current statistical period; and summing and averaging the sample historical data of the characterization parameters and the estimated data of the characterization parameters at the next moment.
In this embodiment, load balancing, according to the estimated data of the characterization parameters of the switches at the next time, each SDN controller of the cluster SDN controllers includes: calculating the ratio P of the estimated value of each controller to the corresponding historical maximum value of the characteristic parameter according to the estimated data of the characteristic parameters of the plurality of switches at the next momentYHi: calculating a ratio P of the total estimated value of the whole controller cluster to the maximum value of the total history for the characterization parameterYHv: will PYHiAnd PYHvAnd comparing, and adjusting the switch controlled by the controller according to the comparison result.
In this example, PYHiCalculated by the following formula:
Figure GDA0002132464100000061
wherein n is the number of switches managed by each controller, YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximum values for the characterization parameters for each switch managed by the controller; and/or the presence of a gas in the gas,
PYHvcalculated by the following formula:
Figure GDA0002132464100000062
wherein m represents the number of controllers, n represents the number of switches managed by each controller, and YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximums for the characterization parameters for each switch managed by the controller. Wherein, Y hereinextI.e. the result y obtained by the least squares mathematical model calculation.
In this embodiment, P isYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes: setting a proportionality coefficient for a plurality of different characterization parameters, wherein the proportionality coefficient is used for expressing the proportion of each characterization parameter in the comparison process.
In this embodiment, P isYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes: for each controller, when it is PYHiGreater than PYHvCalculating the switch to be called out, and calling out the switch according to the calculation result; and/or, for each controller, when it is PYHiLess than PYHvAnd calculating the switch to be called in, and calling in the switch according to the calculation result.
In this embodiment, calculating the switch to be called out, and calling out the switch according to the calculation result includes: for controller calculation
Figure GDA0002132464100000063
Is set as ByosizeAnd obtaining B according to the previously set proportionality coefficientosizeWherein the scaling factor is used to represent a plurality of characterization parametersThe specific gravity taken up in the comparison process; deriving B from the predicted data for each switchinext=Yinext(ii) a According to BinextThe values of the data are arranged in an ascending order for the switches controlled by the controller to obtain a switch queue; selecting switches from the switch queue from top to bottom, and cumulatively counting B to move out of the switchinextIf not greater than BosizeContinuing to select the switch; and adding the selected switch to be mobilized into a switch pool to be mobilized, wherein the switch pool to be mobilized is used for storing the information of the switch to be mobilized.
In this embodiment, calculating the switch to be accessed, and calling the switch according to the calculation result includes: for controller calculation
Figure GDA0002132464100000071
Is set as ByisizeAnd obtaining B according to the previously set proportionality coefficientisizeWherein the proportionality coefficient is used for representing the proportion of the plurality of characterization parameters in the comparison process; according to BisizeAnd the values of the data are sorted in a descending order, and then are sequentially called into the switch according to the load of the controller.
In this embodiment, sequentially calling the switch according to the controller load includes: according to B of each switch to be transferred in the switch pool to be transferredinextThe values of the switches are arranged in a descending order to obtain a switch queue, wherein the switch pool to be mobilized is used for storing the information of the switches to be mobilized; for each controller, selecting a switch from the queue from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextThen the next switch is checked until the last switch.
Corresponding to the above load balancing method, a load balancing apparatus is also provided in this embodiment, and the apparatus is used to implement the above embodiments and preferred embodiments, and the description of the apparatus is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 2 is a structural diagram of a load balancing apparatus according to an embodiment of the present invention, and as shown in fig. 2, the apparatus includes: a collection module 22, a prediction module 24, and a load balancing module 26, each of which is described in detail below:
a collecting module 22, configured to collect data of characterization parameters of a plurality of switches managed in each SDN controller of the cluster software defined network SDN controllers; the estimation module 24 is connected with the collection module 22 and is used for estimating the data of the characterization parameters of the switches at the next moment according to the data of the characterization parameters of the switches; and a load balancing module 26 connected to the estimation module 24, configured to perform load balancing on each SDN controller of the cluster SDN controllers according to the estimated data of the characterization parameters of the switches at the next time.
The following description is made with reference to a preferred embodiment, and the following preferred embodiment mainly takes the three types OF the above characterizing parameters, namely packet-in message number, issued flow table and other OF information, as examples for detailed description, and the preferred embodiment combines the above embodiment and its preferred embodiment.
In the following preferred embodiments, a method and a device for realizing load balancing optimization OF an SDN controller are provided, that is, in a distributed SDN network controller cluster scene, a method and a device for reasonably predicting and optimizing the number OF packet-in messages received by a controller, a flow distribution table and other OF information are provided, so that each controller realizes load balancing.
The preferred embodiment is mainly applied to an SDN network domain, where a plurality OF controllers are provided in the domain, each controller controls a certain number OF switches, only one controller is in a control state and the others are in standby states for each switch, and according to data prediction OF packet _ in messages, the number OF flow tables and other OF messages, averaging is performed with corresponding historical statistical data, data synthesis is performed, and the data synthesis is used as a basis for adjusting and optimizing controller loads, and switches controlled by the controllers are dynamically adjusted. The preferred embodiment includes the following two parts, which are respectively a new cluster controller scheduling device added in the SDN controller and a detailed implementation step:
the cluster controller scheduling device: fig. 3 is a block diagram of an SDN controller according to a preferred embodiment of the present invention, and as shown in fig. 3, a cluster controller scheduling apparatus is added to the SDN controller, which mainly includes the following four internal modules:
an information collection module: and collecting sample historical data OF the number OF packet-in messages, the number OF flow tables and the number OF OF messages except the number OF the packet-in messages OF each managed switch according to the sampling time period, or collecting the number OF packet-in messages, the number OF flow tables and the number OF messages except the number OF the packet-in messages OF each managed switch at present. The time cycle can be the time stamp of the same time interval every day in a week or the time stamp of the same time interval every day in several weeks, and is determined according to the actual use scene.
A data processing module: and performing data comprehensive processing by adopting a relevant algorithm according to the collected packet-in, flow table number and other OF information statistics OF each switch to obtain expected data.
A scheduling module: and adjusting the switch controlled by each controller according to the comparison of the load pressure of each controller obtained by the data processing module and the load pressure of the cluster controller, so that the load pressures of the controllers are balanced.
A switching module: and (3) according to the dispatching result of each controller to the managed switch, adopting a slave-master mechanism (which can also be written as master-slave) mechanism to exchange the roles of each controller to the managed switch.
Based on the above structure, the implementation steps of the preferred embodiment are as follows:
s1, the cluster controller starts scheduling: the controller sets the historical maximum value of the number of packets-in to HipmaxThe maximum value of the history of the number of flow tables is HifmaxAnd other OF messages have a historical maximum OF HimmaxAnd are set to 0, respectively.
And S2, collecting sample information by using an information collection module in the cluster controller, wherein the sample information can be sample data of the same time period in each day in a week, or the sample data of the same time period in the same day in several weeks, and determining the sample data according to the actual application scene. Collecting sample data information is realized by the following substeps:
s2.1, in the same time interval, a super node in the cluster initiates an information collection command of a controller of the controlled cluster; all controllers in the cluster begin to collect packet-in message number, flow table number and other OF information from the switches controlled by the controllers;
s2.2, when the controller collects the statistical information OF all the control switches, the statistical information OF the flow table, the packet _ in and other OF messages is sent to the cluster distributed shared storage system and is respectively marked as Fi、PiAnd MiIn which F isiThe method comprises the following steps: controller numbering, switch number, switch flow table statistics and time stamping; piThe method comprises the following steps: controller number, exchanger number, packet-in message number sent by the exchanger, and time stamp; miThe method comprises the following steps: controller number, switch label, other OF information except packet _ in for switch and controller, timestamp. The timestamp refers to the time when the response messages of all the managed switches are collected. All information is used as historical reference or prediction in time.
S3, the super node uses the data processing module in the controller to predict the packet-in message number reported by the switch under each controller, the flow table number issued by the controller and other OF message statistics in the next time interval according to the mathematical model OF least square method, and the steps are respectively realized through S4, S5 and S6:
s4, according to the timestamp, the super node reads packet-in message statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized through the following substeps:
s4.1, determining the number N of the timestamps, namely trying to acquire a complete packet-in message statistical information set of the N timestamps; the complete packet-in message statistical information set refers to packet-in message statistical information reported by all different switches with the same timestamp of the same controller, and the timestamp is the latest;
s4.2 if the number of the complete packet-in message statistical information sets of the acquired timestamps is less than N, circularly executing S2 until packet-in message statistical information sets of the N timestamps are acquired;
s4.3, according to the packet-in message statistical information set, the super node accumulatively obtains information statistics P of packet-in messages with N timestamps for each switch1、P2、……、PNNamely, data is obtained that: piController number, switch number, timestamp X, packet-in message statistics Y }.
S4.4, if the packet-in message information of the controller with the N timestamps has the largest statistics, the historical packet-in message statistics H of the controller with the largest statisticsipmaxThen, then
Figure GDA0002132464100000091
S4.5, for each switch under the control of the cluster controller, using a least square mathematical model:
y ═ α + β x, (formula 1-1)
Calculating packet-in message statistical information P of each switch under the control of each controller of the next timestamp through regression analysisinextThe calculation formula is as follows:
Figure GDA0002132464100000092
Figure GDA0002132464100000093
wherein: n represents the number of sample data, X is equivalent to a timestamp, Y is the packet-in message number statistic value of each switch, the values of parameters alpha and beta are respectively solved, and then packet-in message information of the switch at the next moment is estimated.
And S4.6, in order to enable the predicted value to be closer to the actual value, actually measuring the actual value of the packet-in message quantity of the timestamp switch in the previous periods according to the sampling period of the sample data, and then summing and averaging the actual value and the predicted value to obtain a more accurate predicted value.
S5, according to the timestamp, the super node reads the flow table statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized by the following substeps:
s5.1, determining the number N of the timestamps, namely trying to acquire a complete flow table statistical information set of the N timestamps; the complete flow table statistical information set refers to flow table statistical information on all different switches with the same controller and the same timestamp, and the timestamp is the latest;
s5.2, if the number of the complete flow table statistical information sets of the acquired timestamps is less than N, circularly executing S2 until the flow table statistical information sets of the N timestamps are acquired;
s5.3, according to the flow table statistical information set, the super node accumulatively obtains flow table statistical information F of N timestamps for each switch1、F2、……、FNNamely, data is obtained that: fiController number, switch number, timestamp X, flow table statistics Y.
S5.4, if the controller flow table with the N timestamps has the largest historical flow table statistics H of the controllerifmaxThen, then
Figure GDA0002132464100000101
S5.5, calculating flow table statistical information F of each switch of the next timestamp by using a least square method mathematical model (see formula 1-1) through regression analysis for each switch controlled by each controller in the cluster controllerinextThe calculation formula is shown in formula 1-2 and formula 1-3.
And S5.6, in order to enable the estimated value to be closer to the actual value, according to the sampling period of the sample data, taking the actual value of the flow table statistical information of the timestamp switch in several periods before actual measurement, and then summing the actual value and the estimated value to average, so as to obtain a more accurate estimated value.
S6, according to the timestamp, the supernode reads, from the cluster distributed shared storage system, other OF interaction information (hereinafter referred to as other OF information for short) reported by each controller except packet _ in, and is implemented by the following sub-steps:
s6.1, determining the number N OF the timestamps, namely trying to acquire complete other OF information statistical sets OF the N timestamps; the complete other OF information set refers to all OF interaction statistical information OF all different switches and controllers with the same timestamp OF the same controller except for packet _ in, and the timestamp is the latest;
s6.2, if the number OF the complete other OF information statistical sets OF the acquired timestamps is less than N, circularly executing S2 until other OF information statistical sets OF the N timestamps are acquired;
s6.3, according to the other OF information statistic set, the super node accumulatively obtains other OF information statistics M with N timestamps for each switch1、M2、……、MNNamely, data is obtained that: miController number, switch number, timestamp X, other information statistic Y.
S6.4, if the other OF information statistics OF the controller with the N timestamps is maximum, the historical other OF information statistics H OF the controller with the N timestampsimmaxThen, then
Figure GDA0002132464100000102
S6.5, calculating other OF statistical information M OF each switch OF the next timestamp by using a least square method mathematical model (see formula 1-1) through regression analysis for each switch controlled by each controller in the cluster controllerinextThe calculation formula is shown in formula 1-2 and formula 1-3.
S6.6, in order to enable the estimated value to be closer to the actual value, according to the sampling period OF the sample data, the actual values OF other OF statistical information OF the timestamp switch in the first few periods OF actual measurement are obtained, and then the actual values and the estimated value are summed and averaged to obtain a more accurate estimated value.
S7, respectively calculating the ratio OF the estimated value OF each controller to the packet-in, flow table statistic information and other OF information to the corresponding historical maximum value according to the number OF the packet-in messages OF the controller at a certain moment, the estimation OF the flow table statistic information and other OF information, and respectively recording the ratio as PPHi、PFHiAnd PMHiNamely:
Figure GDA0002132464100000103
Figure GDA0002132464100000111
Figure GDA0002132464100000112
where n denotes the number of switches managed by each controller. Then, the ratio OF the total estimated packet-in message number OF the whole controller cluster to the total maximum packet-in message number, the ratio OF the total estimated statistical flow table to the total maximum flow table statistics, and the ratio OF the total estimated statistics OF other OF messages to the total maximum OF message statistics are calculated and respectively marked as PPHv、PFHvAnd PMHvNamely:
Figure GDA0002132464100000113
Figure GDA0002132464100000114
Figure GDA0002132464100000115
wherein m represents the number of controllers, and n represents the number of switches managed by each controller.
S8, calculating P according to the actual dataPHi、PFHiAnd PMHiRespectively and calculated to obtainP ofPHv、PFHvAnd PMHvComparing, and adjusting the switches controlled by the controllers by using an internal scheduling module according to the comparison result to realize load balancing, wherein the step is realized by the following substeps:
s8.1, setting the switch pool to be dispatched as empty, and loading the element EF in the switch pool to be dispatched, wherein the element EF is { the serial number of a roll-out controller, the serial number of a switch, the statistics of a switch flow table and the serial number of a roll-in controller }; EP ═ out controller number, exchanger number, packet-in message number, and in controller number }; EM is as follows, { roll-out controller number, switch number, other OF message statistics, and roll-in controller number }.
And S8.2, setting the proportionality coefficients x and y according to the specific application scene OF the cluster controller, wherein the proportionality coefficients x and y are used for representing that the exchanger controlled by each controller is adjusted according to the packet-in message number, the flow table number or other OF message statistical number so as to achieve the purpose OF load balancing OF each controller. The following formula is derived:
Pi=(1-y)*(x*PPHi+(1-x)*PMHi)+y*PFHi(formulae 1 to 10)
Pv=(1-y)*(x*PPHv+(1-x)*PMHv)+y*PFHv(formulae 1 to 11)
Wherein: 0< x < 1, 0< y < 1;
reference PiAnd S8.3 is executed for each controller in descending order, and S8.6 is executed after the execution is finished.
S8.3, for each controller, when P isiGreater than PvIf so, 8.4 is executed, otherwise, S8.5 is executed.
S8.4, calculating a list of switches to be called out, wherein the step is realized by the following substeps:
s8.4.1 calculated separately for the controller
Figure GDA0002132464100000121
Is set as Bposize
Figure GDA0002132464100000122
Is set as Bfosize
Figure GDA0002132464100000123
Is set as BmosizeThen, according to the previously set scaling factor, we can:
Bosize=(1-y)*(x*Bposize+(1-x)*Bmosize)+y*Bfosize(formulae 1 to 12)
Wherein 0< x < 1, 0< y < 1;
s8.4.2, the following formula is derived from the estimates for each switch:
Binext=(1-y)*(x*Pinext+(1-x)*Minext)+y*Finext(formulae 1 to 13)
According to BinextThe switches controlled by the controller are arranged in an ascending order to obtain a switch queue;
s8.4.3, selecting the switch from the queue from top to bottom;
s8.4.4, cumulative calculation of B to move out of the switchinextIf not greater than BosizeContinue execution S8.4.4, otherwise execute S8.4.5;
s8.4.5, numbering the exchanges to be mobilized, together with the controller number, BinextAnd adding the switch to be dispatched into a switch pool, wherein the serial number of the switching-in controller is null.
S8.5, calculating a list of switches to be called in, wherein the step is realized by the following substeps:
s8.5.1 calculated separately for the controller
Figure GDA0002132464100000124
Is set as Bpisize
Figure GDA0002132464100000125
Is set as Bfisize
Figure GDA0002132464100000126
Is set as Bmisize. Then from the previously set scaling factor:
Bisize=(1-y)*(x*Bpisize+(1-x)*Bmisize)+y*Bfisize(formulae 1 to 14)
Wherein 0< x < 1, 0< y < 1.
S8.5.2, according to BisizeThe size of the controller is arranged in a descending order, and then the controller is sequentially called into the switch according to the load of the controller, and the method is specifically realized by the following substeps:
s8.5.2.1, according to the switch pool B to be transferredinextAnd (4) arranging the switches in descending order to obtain a switch queue.
S8.5.2.2, for each controller, selecting switch from the above queues from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextAnd then checking the next switch until the last switch is checked, fig. 4 is a flow chart of calling the switch into the controller according to the preferred embodiment of the present invention, and the specific steps are shown in fig. 4.
S8.6, the controller adopts an internal switching control module to reconstruct a corresponding switch to realize load balancing, and the step is realized through the following substeps:
s8.6.1, if the number of the transfer-in controller is not null, the super node transfers the switch command to the switch corresponding to the number of the transfer-out controller and the number of the transfer-in controller and executes S8.6.2, otherwise, the super node skips over the element.
S8.6.2, exchanging according to the slave-master mechanism to realize the switch dispatching; the slave-master mechanism is exchanged with OpenFlow protocol setting and is used for changing roles of different controllers during multi-controller control.
S9, the scheduling is finished, and S2 is repeated at the next time interval.
The preferred embodiment provides a solution for the load imbalance phenomenon of the cluster controller, the core idea of the solution is to adopt a mathematical model of a least square method, predicting packet-in messages, flow table numbers and other OF messages OF all switches at the future time, taking historical data OF the same time period as reference, averaging the historical data with a predicted value, then, the statistical information of each controller is obtained according to the new average value, the ratio of the statistical information of the controllers to the historical statistical maximum value is compared with the load pressure value of the whole controller cluster, when network flow jitter is large, the number OF switches controlled by each controller is adjusted in time, so that packet-in messages received by all the controllers, issued flow tables and other OF messages interacted with the switches reach a balanced state, and the control performance OF the whole controller cluster is improved. Fig. 5 is a flowchart of cluster controller load balancing scheduling according to the preferred embodiment of the present invention, and the whole process flow is shown in fig. 5.
Example 1:
fig. 6 is a schematic diagram of intra-domain controller and switch allocation according to preferred embodiment 1 of the present invention, and as shown in fig. 6 as an example, SDN controller nodes A, B, C are distributed in a domain. The switch controlled by the A controller node comprises sw1, sw2 and sw 3; the switches controlled by the B controller node comprise sw4 and sw 5; the switches controlled by the C controller node comprise sw6, sw7 and sw 8; the present preferred embodiment is described in detail with reference to tables 1, 2, 3, 4, 5, 6, and 7.
S1, the cluster controller starts scheduling: the controller sets the historical maximum value of the number of packets-in to HipmaxThe maximum value of the history of the number of flow tables is HifmaxAnd other OF messages have a historical maximum OF HimmaxAnd are set to 0, respectively.
And S2, collecting sample information by using an information collection module in the cluster controller, wherein the sample data collected in the example is statistical information of different time stamps in a certain time period on a certain day in a week. Meanwhile, the actual measurement information in the time interval in the previous week is collected as reference, so that the estimated information is closer to the actual value. Collecting sample data information is realized by the following substeps:
s2.1, in the same time interval, a super node in the cluster initiates an information collection command of a controller of the controlled cluster; all the controllers A, B and C OF the cluster start to collect the number OF packet-in messages to the switches controlled by the controllers A, B and C and count the number OF flow tables and other OF messages issued to each switch;
s2.2, when the controller collects the statistical information OF all the control switches, the statistical information OF the flow table, the packet _ in and other OF messages is sent to the cluster distributed shared storage system and is respectively marked as Fi、PiAnd MiIn which F isiThe method comprises the following steps: controller numbering, switch number, switch flow table statistics and time stamping; piThe method comprises the following steps: controller number, exchanger number, packet-in message number sent by the exchanger, and time stamp; miThe method comprises the following steps: controller number, switch label, other OF information except packet _ in for switch and controller, timestamp. The timestamp refers to the time when the response messages of all the managed switches are collected. All information is used as historical reference or prediction in time.
S3, the super node uses the data processing module in the controller to predict the packet-in message number reported by the switch under each controller in the next time interval, the flow table number issued to the switch by the controller and other OF messages according to the mathematical model OF least square method, and the steps are respectively realized through the steps S4, S5 and S6:
s4, according to the timestamp, the super node A reads the packet-in message statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized through the following substeps:
s4.1, the number N of the timestamps is taken to be 5, namely, a complete packet-in message statistical information set of the 5 timestamps is tried to be obtained; the complete packet-in message statistical information set refers to packet-in message statistical information reported by all different switches with the same timestamp of the same controller, and the timestamp is the latest;
s4.2, acquiring less than 5 complete packet-in message statistical information sets of the timestamps, and executing S2 in a circulating manner until the packet-in message statistical information sets of the 5 timestamps are acquired, wherein the acquired packet-in message statistical information is shown in Table 1;
table 1: packet-in message initial number statistical table
Figure GDA0002132464100000141
S4.3, according to the packet-in message statistical information set, the super node cumulatively obtains the information statistics P of the packet-in message with 5 timestamps for each switch1、P2、P3、P4、P5Namely, data is obtained that: piController number, switch number, timestamp X, packet-in message statistics Y }.
S4.4, if the largest packet-in message information statistic sum in the controllers with the 5 timestamps is larger than the historical packet-in message statistic H of the controlleripmaxThen, then
Figure GDA0002132464100000151
S4.5, for each switch under the control of the cluster controller, calculating packet-in message statistical information P of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 and according to formulas 1-2 and 1-3inextThe predicted results are shown in table 2.
Table 2 predicted packet-in packet T6 time packet quantity
Figure GDA0002132464100000152
S4.6, in order to enable the estimated value to be closer to the actual value, the actual measured value of the number of the received packet-in messages of the timestamp in one week is taken, the actual measured value and the estimated value are summed and averaged, and the result is shown in a table 3;
TABLE 3 average of actual measured and predicted values of packet-in packet number in one week
Figure GDA0002132464100000153
S5, according to the timestamp, the super node A reads the flow table statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized by the following substeps:
s5.1, here, taking the number N of timestamps to be 5, that is, trying to obtain a complete flow table statistical information set with 5 timestamps; the complete flow table statistical information set refers to flow table statistical information which is issued to all different switches by the same controller at the same timestamp, and the timestamp is the latest;
s5.2, if the number of the complete flow table statistical information sets with the acquired timestamps is less than 5, circularly executing S2 until the flow table statistical information sets with the 5 timestamps are acquired;
s5.3, according to the flow table statistical information set, the super node accumulatively obtains flow table statistics F with 5 timestamps for each switch1、F2、F3、F4、F5Namely, data is obtained that: fiController number, switch number, timestamp X, flow table statistics Y.
S5.4, if the flow table statistic sum in the controller flow of the 5 timestamps is maximum, the flow table statistic sum is larger than the historical flow table statistic H of the controllerifmaxThen, then
Figure GDA0002132464100000161
S5.5, for each switch controlled by each controller in the cluster controller, calculating flow table statistical information F of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 according to formulas 1-2 and 1-3inext
S5.6, in order to enable the estimated value to be closer to the actual value, taking the flow table statistics actual measurement value of the timestamp in one week, and summing the flow table statistics actual measurement value with the estimated value to take the average;
s6, according to the timestamp, the supernode reads, from the cluster distributed shared storage system, statistics OF other OF interaction information (hereinafter referred to as other OF information for short) reported by each controller except packet _ in, and is implemented by the following sub-steps:
s6.1, determining the number N OF the timestamps, namely trying to acquire complete other OF information statistical sets OF the N timestamps; the complete other OF information set refers to all OF interaction statistical information OF all different switches and controllers with the same timestamp OF the same controller except for packet _ in, and the timestamp is the latest;
s6.2, if the number OF the complete other OF information statistical sets OF the acquired timestamps is less than N, circularly executing S2 until other OF information statistical sets OF the N timestamps are acquired;
s6.3, according to the other OF information statistic set, the super node accumulatively obtains other OF information statistics M with N timestamps for each switch1、M2、……、MNNamely, data is obtained that: miController number, switch number, timestamp X, other OF info statistics Y.
S6.4, if the largest one OF the other OF information statistics OF the controller with the N timestamps is larger than the historical other OF information statistics H OF the controllerimmaxThen, then
Figure GDA0002132464100000162
S6.5, calculating other OF statistical information M OF each switch OF the next timestamp by using a least square method mathematical model (see formula 1-1) through regression analysis for each switch controlled by each controller in the cluster controllerinextThe calculation formula is shown in formula 1-2 and formula 1-3.
S6.6, in order to enable the estimated value to be closer to the actual value, according to the sampling period OF the sample data, the actual values OF other OF statistical information OF the timestamp switch in the first few periods OF actual measurement are obtained, and then the actual values and the estimated value are summed and averaged to obtain a more accurate estimated value.
S7, calculating P according to the actual data by using the formulas 1-4, 1-5 and 1-6PHi、PFHiAnd PMHiRespectively with P calculated by equations 1-7, 1-8 and 1-9PHv、PFHvAnd PMHvComparing, adjusting switches controlled by each controller according to the comparison result, and realizing load balancing, wherein the step is realized through the following substeps:
s7.1, in this embodiment, it is assumed that the coefficient x is 1, and y is 0, that is, the number of managed switches is adjusted according to the packet _ in packet reported by each switch;
s7.2, setting the switch pool to be mobilized to be empty; the packet-in message number of the obtained 5 timestamps is calculated to obtain: pPH1=1.09,PPH2=0.39,PPH31.11; calculating the ratio P of the total estimated received packet-in message number of the controller to the total maximum packet-in message numberPHv0.95; the load pressure gauges of the controller are shown in table 4, respectively. The switch pool to be dispatched is loaded with the element EP ═ out of controller number, switch number, packet-in message number, and in controller number.
TABLE 4 controller load pressure gauge derived from packet-in messages
Controller numbering A B C Summing
Predicting flow 75 13 62 150
Controller maximum flow 69 33 56 158
PPHi 1.09 0.39 1.11 0.95
S7.3, P can be obtained according to the formulas 1 to 10 and 1 to 11i=PPHi,Pv=PPHvReference PiAnd S7.4 is executed for each controller in descending order, and S7.7 is executed after the execution is finished.
S7.4, for each controller, when P isiGreater than PvIf so, executing S7.5, otherwise, executing S7.6;
s7.5, calculating a list of switches to be called out, wherein the step is realized by the following substeps:
s7.5.1, in this embodiment, the number of managed switches is adjusted according to the packet _ in message data of each switch received by the controller, and can be obtained according to formulas 1 to 12: b isosize=1*Bposize
S7.5.2, and then calculating B according to equations 1-13inextAccording to BinextA plurality of pairs of switches controlled by the controller are arranged in an ascending order to obtain a switch queue;
s7.5.3, selecting the switch from the queue from top to bottom;
s7.5.4, cumulative calculation is moved out of switch BinextIf not greater than BosizeContinue execution S7.5.4, otherwise execute S7.5.5;
s7.5.5, numbering the exchanges to be mobilized, together with the controller number, BinextAdding the switching device into a switch pool to be transferred, wherein the serial number of the transferred controller is null, and the list to be moved is obtained at the moment and is shown in a table 5;
table 5 example 1 controller resource sharing area pending call pool table before tuning
Figure GDA0002132464100000171
S7.6, calculating a list of switches to be called in, wherein the step is realized by the following substeps:
s7.6.1, in this embodiment, the number of managed switches is adjusted according to packet _ in message data reported by each switch received by the controller, and B can be obtained according to formulas 1 to 14isize=1*Bpisize
S7.6.2, according to BisizeThe size of the controller is arranged in a descending order, and then the controller is sequentially called into the switch according to the load of the controller, and the method is specifically realized by the following substeps:
s7.6.2.1, according to the switch pool B to be transferredinextThe size makes descending order arrangement to the exchangers to obtain an exchanger queue;
s7.6.2.2, for each controller, selecting switch from the above queues from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextThen, the next switch is checked until the last switch is checked, the specific steps are shown in the flow chart 4, and the list to be dropped is obtained at this time and is shown in table 6;
table 6 example 1 adjusted pool table to be mobilized for controller resource sharing area
Figure GDA0002132464100000181
S7.7, reconstructing a corresponding switch to realize load balancing, wherein the step is realized through the following substeps:
s7.7.1, if the number of the transfer-in controller is not empty, the super node transfers the switch command to the switch corresponding to the number of the transfer-out controller and the number of the transfer-in controller and executes S7.7.2, otherwise, the super node skips the element;
s7.7.2, exchanging according to the slave-master mechanism to realize the switch dispatching; the slave-master mechanism is exchanged with OpenFlow protocol setting and is used for changing the roles of different controllers during multi-controller control; the flow rate state after completion is shown in table 7.
Table 7 load pressure gauges of controllers adjusted according to packet _ in packet in example 1
Figure GDA0002132464100000191
S8, the scheduling is finished, and S2 is repeated at the next time interval.
Example 2:
taking fig. 6 as an example, SDN controller nodes A, B, C are distributed in the domain. The switch controlled by the A controller node comprises sw1, sw2 and sw 3; the switches controlled by the B controller node comprise sw4 and sw 5; the switches controlled by the C controller node comprise sw6, sw7 and sw 8; the present preferred embodiment will be described in detail below.
S1, the cluster controller starts scheduling: the controller sets the historical maximum value of the number of packets-in to HipmaxThe maximum value of the history of the number of flow tables is HifmaxAnd other OF messages have a historical maximum OF HimmaxAnd are set to 0, respectively.
And S2, collecting sample information by using an information collection module in the cluster controller, wherein the sample data collected in the example is statistical information of different time stamps in a certain time period on a certain day in a week. Meanwhile, the actual measurement information in the time interval in the previous week is collected as reference, so that the estimated information is closer to the actual value. Collecting sample data information is realized by the following substeps:
s2.1, in the same time interval, a super node in the cluster initiates an information collection command of a controller of the controlled cluster; all the controllers A, B and C OF the cluster start to collect the number OF packet-in messages to the switches controlled by the controllers A, B and C and count the number OF flow tables and other OF messages issued to each switch;
s2.2, when the controller collects the statistical information OF all the control switches, the statistical information OF the flow table, the packet _ in and other OF messages is sent to the cluster distributed shared storage system and is respectively marked as Fi、PiAnd MiIn which F isiThe method comprises the following steps: controller numbering, switch number, switch flow table statistics and time stamping; piThe method comprises the following steps: controller number, exchanger number, packet-in message number sent by the exchanger, and time stamp; miThe method comprises the following steps: controller number, switch label, other OF information except packet _ in for switch and controller, timestamp. The timestamp refers to the time when the response messages of all the managed switches are collected. All information is used as historical reference or prediction in time.
S3, the super node uses the data processing module in the controller to predict the packet-in message number reported by the switch under each controller in the next time interval, the flow table number issued to the switch by the controller and other OF messages according to the mathematical model OF least square method, and the steps are respectively realized through the steps S4, S5 and S6:
s4, according to the timestamp, the super node A reads the packet-in message statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized through the following substeps:
s4.1, the number N of the timestamps is taken to be 5, namely, a complete packet-in message statistical information set of the 5 timestamps is tried to be obtained; the complete packet-in message statistical information set refers to packet-in message statistical information reported by all different switches with the same timestamp of the same controller, and the timestamp is the latest;
s4.2, if the number of the complete packet-in message statistical information sets of the acquired timestamps is less than 5, circularly executing S2 until the packet-in message statistical information sets of the 5 timestamps are acquired;
s4.3, according to the packet-in message statistical information set, the super node cumulatively obtains the information statistics P of the packet-in message with 5 timestamps for each switch1、P2、P3、P4、P5Namely, data is obtained that: piThe controller number, the switch number, and the timestamp X, packet-in message statistics Y };
s4.4, if the largest packet-in message information statistic sum in the controllers with the 5 timestamps is larger than the historical packet-in message statistic H of the controlleripmaxThen, then
Figure GDA0002132464100000201
S4.5, for each switch under the control of the cluster controller, calculating packet-in message statistical information P of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 and according to formulas 1-2 and 1-3inext
And S4.6, in order to enable the estimated value to be closer to the actual value, taking the actual measured value of the number of the received packet-in messages of the timestamp in one week, and summing the actual measured value and the estimated value to average.
S5, according to the timestamp, the super node A reads the flow table statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized by the following substeps:
s5.1, here, taking the number N of timestamps to be 5, that is, trying to obtain a complete flow table statistical information set with 5 timestamps; the complete flow table statistical information set refers to flow table statistical information which is issued to all different switches by the same controller at the same timestamp, and the timestamp is the latest;
s5.2, if the number of the complete flow table statistical information sets with the acquired timestamps is less than 5, circularly executing S2 until the flow table statistical information sets with the 5 timestamps are acquired;
s5.3, according to the flow table statistical information set, the super node accumulatively obtains flow table statistics F with 5 timestamps for each switch1、F2、F3、F4、F5Namely, data is obtained that: fiThe controller number, the switch number, the timestamp X, and the flow table statistic Y are set to { the controller number, the switch number, the timestamp X, and the flow table statistic Y };
s5.4, if the flow table statistics sum in the controller flow of the 5 timestamps is maximum, determining the flow table statistics sum to be the maximumA historical flow table statistic H greater than the controllerifmaxThen, then
Figure GDA0002132464100000202
S5.5, for each switch controlled by each controller in the cluster controller, calculating flow table statistical information F of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 according to formulas 1-2 and 1-3inext
And S5.6, in order to enable the estimated value to be closer to the actual value, taking the flow table statistics actual measurement value of the time stamp in one week, and summing the flow table statistics actual measurement value with the estimated value for averaging.
S6, according to the timestamp, the supernode reads, from the cluster distributed shared storage system, statistics OF other OF interaction information (hereinafter referred to as other OF information for short) reported by each controller except packet _ in, and is implemented by the following sub-steps:
s6.1, determining the number N OF the timestamps, namely trying to acquire complete other OF information statistical sets OF the N timestamps; the complete other OF information set refers to all OF interaction statistical information OF all different switches and controllers with the same timestamp OF the same controller except for packet _ in, and the timestamp is the latest;
s6.2, if the number OF the complete other OF information statistical sets OF the acquired timestamps is less than N, circularly executing S2 until other OF information statistical sets OF the N timestamps are acquired;
s6.3, according to the other OF information statistic set, the super node accumulatively obtains other OF information statistics M with N timestamps for each switch1、M2、……、MNNamely, data is obtained that: miController number, switch number, timestamp X, other OF info statistics Y.
S6.4, if the largest one OF the other OF information statistics OF the controller with the N timestamps is larger than the historical other OF information statistics H OF the controllerimmaxThen, then
Figure GDA0002132464100000211
S6.5, calculating other OF statistical information M OF each switch OF the next timestamp by using a least square method mathematical model (see formula 1-1) through regression analysis for each switch controlled by each controller in the cluster controllerinextThe calculation formulas are shown as formula 1-2 and formula 1-3;
s6.6, in order to enable the estimated value to be closer to the actual value, according to the sampling period OF the sample data, the actual values OF other OF statistical information OF the timestamp switch in the first few periods OF actual measurement are obtained, and then the actual values and the estimated value are summed and averaged to obtain a more accurate estimated value.
S7, calculating P according to the actual data by using the formulas 1-4, 1-5 and 1-6PHi、PFHiAnd PMHiRespectively with P calculated by equations 1-7, 1-8 and 1-9PHv、PFHvAnd PMHvComparing, adjusting switches controlled by each controller according to the comparison result, and realizing load balancing, wherein the step is realized through the following substeps:
s7.1, in this embodiment, it is assumed that the coefficient x is 0.5 and y is 0.5, that is, the number OF managed switches is adjusted according to the packet _ in packet reported by each switch, the flow table issued by each switch, and other OF messages at the same time;
s7.2, setting the switch pool to be mobilized to be empty; the packet-in message number of the obtained 5 timestamps is calculated to obtain: pPH1、PPH2And PPH3(ii) a The flow table statistics of the acquired 5 timestamps are calculated to obtain: pFH1、PFH2And PFH3(ii) a The statistical calculation OF other OF messages with the acquired 5 timestamps results in that: pMH1、PMH2And PMH3(ii) a Calculating the ratio of the total estimated received packet-in message number of the controller to the total maximum packet-in message number as PPHv(ii) a Calculating the ratio of the total predicted issued flow table number of the controller to the total maximum issued flow table number as PFHv(ii) a Calculating the ratio OF the total estimated other OF messages OF the controller to the total maximum other OF messages as PMHv(ii) a The pool of switches to be commissioned is loaded with the elements EP ═ roll-out controller number, switch number,packet-in message number, and switching to controller number }; the EF is equal to { the serial number of a roll-out controller, the serial number of a switch, the number of a flow table and the serial number of a roll-in controller }; EM is as follows, the serial number OF the roll-out controller, the serial number OF the exchanger and the serial number OF the other OF messages are as follows;
s7.3, P can be obtained according to the formulas 1 to 10 and 1 to 11iAnd PvReference PiAnd S7.4 is executed for each controller in descending order, and S7.7 is executed after the execution is finished.
S7.4, for each controller, when P isiGreater than PvIf so, executing S7.5, otherwise, executing S7.6;
s7.5, calculating a list of switches to be called out, wherein the step is realized by the following substeps:
s7.5.1, the number OF switches to be controlled is adjusted according to the packet _ in message OF each switch received by the controller, the number OF flow tables issued by the controller, and other OF message data, and can be obtained according to formulas 1 to 12:
Bosize=(1-0.5)*(0.5*Bposize+0.5*Bfosize)+0.5*Bmosize
s7.5.2, and then calculating B according to equations 1-13inextAccording to BinextA plurality of pairs of switches controlled by the controller are arranged in an ascending order to obtain a switch queue;
s7.5.3, selecting the switch from the queue from top to bottom;
s7.5.4, cumulative calculation is moved out of switch BinextIf not greater than BosizeContinue execution S7.5.4, otherwise execute 7.5.5;
s7.5.5, numbering the exchanges to be mobilized, together with the controller number, BinextAdding the switch to be dispatched into a switch pool, wherein the serial number of the transferred-in controller is null;
s7.6, calculating a list of switches to be called in, wherein the step is realized by the following substeps:
s7.6.1, in this embodiment, the number OF managed switches is adjusted according to the packet _ in message received by each switch by the controller, the number OF flow tables issued by the controller, and other OF message data, and the number OF managed switches can be obtained according to formulas 1 to 14
Bisize=(1-0.5)*(0.5*Bpisize+0.5*Bfisize)+0.5*Bmisize
S7.6.2, according to BisizeThe size of the controller is arranged in a descending order, and then the controller is sequentially called into the switch according to the load of the controller, and the method is specifically realized by the following substeps:
s7.6.2.1, according to the switch pool B to be transferredinextThe size makes descending order arrangement to the exchangers to obtain an exchanger queue;
s7.6.2.2, for each controller, selecting switch from the above queues from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextThen the next switch is checked until the last switch is checked, and the specific steps are shown in the flowchart of fig. 4.
S7.7, reconstructing a corresponding switch to realize load balancing, wherein the step is realized through the following substeps:
s7.7.1, if the number of the transfer-in controller is not empty, the super node transfers the switch command to the switch corresponding to the number of the transfer-out controller and the number of the transfer-in controller and executes S7.7.2, otherwise, the super node skips the element;
s7.7.2, exchanging according to the slave-master mechanism to realize the switch dispatching; the slave-master mechanism is exchanged with OpenFlow protocol setting and is used for changing roles of different controllers during multi-controller control.
S8, the scheduling is finished, and S2 is repeated at the next time interval.
Example 3:
fig. 7 is a schematic diagram of the intra-domain overlay controller and switch allocation according to the preferred embodiment 3 of the present invention, and as shown in fig. 7, an SDN controller node A, B, C and a super controller node D are distributed in a domain. The switch controlled by the A controller node comprises sw1, sw2 and sw 3; the switches controlled by the B controller node comprise sw4 and sw 5; the switches controlled by the C controller node comprise sw6, sw7 and sw 8; the present preferred embodiment will be described in detail below.
S1, the cluster controller starts scheduling: the controller sets the historical maximum value of the number of packets-in to HipmaxThe maximum value of the history of the number of flow tables is HifmaxAnd other OF messages have a historical maximum OF HimmaxAnd are set to 0, respectively.
And S2, collecting sample information by using an information collection module in the cluster controller, wherein the sample data collected in the example is statistical information of different time stamps in a certain time period on a certain day in a week. Meanwhile, the actual measurement information in the time interval in the previous week is collected as reference, so that the estimated information is closer to the actual value. Collecting sample data information is realized by the following substeps:
s2.1, in the same time interval, a super node in the cluster initiates an information collection command of a controller of the controlled cluster; all the controllers A, B and C OF the cluster start to collect the number OF packet-in messages to the switches controlled by the controllers A, B and C and count the number OF flow tables and other OF messages issued to each switch;
s2.2, when the controller collects the statistical information OF all the control switches, the statistical information OF the flow table, the packet _ in and other OF messages is sent to the cluster distributed shared storage system and is respectively marked as Fi、PiAnd MiIn which F isiThe method comprises the following steps: controller numbering, switch number, switch flow table statistics and time stamping; piThe method comprises the following steps: controller number, exchanger number, packet-in message number sent by the exchanger, and time stamp; miThe method comprises the following steps: controller number, switch label, other OF information except packet _ in for switch and controller, timestamp. The timestamp refers to the time when the response messages of all the managed switches are collected. All information is used as historical reference or prediction in time.
S3, the super node D uses the data processing module in the controller to predict the packet-in message number reported by the switch under each controller in the next time interval, the flow table number issued to the switch by the controller and other OF messages according to the mathematical model OF the least square method, and the steps are respectively 4, 5 and 6:
s4, according to the timestamp, the super node D reads the packet-in message statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized through the following substeps:
s4.1, the number N of the timestamps is taken to be 5, namely, a complete packet-in message statistical information set of the 5 timestamps is tried to be obtained; the complete packet-in message statistical information set refers to packet-in message statistical information reported by all different switches with the same timestamp of the same controller, and the timestamp is the latest;
s4.2, if the number of the complete packet-in message statistical information sets of the acquired timestamps is less than 5, circularly executing S2 until the packet-in message statistical information sets of the 5 timestamps are acquired;
s4.3, according to the packet-in message statistical information set, the super node cumulatively obtains the information statistics P of the packet-in message with 5 timestamps for each switch1、P2、P3、P4、P5Namely, data is obtained that: piThe controller number, the switch number, and the timestamp X, packet-in message statistics Y };
s4.4, if the largest packet-in message information statistic sum in the controllers with the 5 timestamps is larger than the historical packet-in message statistic H of the controlleripmaxThen, then
Figure GDA0002132464100000231
S4.5, for each switch under the control of the cluster controller, calculating packet-in message statistical information P of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 and according to formulas 1-2 and 1-3inext
And S4.6, in order to enable the estimated value to be closer to the actual value, taking the actual measured value of the number of the received packet-in messages of the timestamp in one week, and summing the actual measured value and the estimated value to average.
S5, according to the timestamp, the super node D reads the flow table statistical information reported by each controller from the cluster distributed shared storage system, and the method is realized through the following substeps:
s5.1, here, taking the number N of timestamps to be 5, that is, trying to obtain a complete flow table statistical information set with 5 timestamps; the complete flow table statistical information set refers to flow table statistical information which is issued to all different switches by the same controller at the same timestamp, and the timestamp is the latest;
s5.2, if the number of the complete flow table statistical information sets with the acquired timestamps is less than 5, circularly executing S2 until the flow table statistical information sets with the 5 timestamps are acquired;
s5.3, according to the flow table statistical information set, the super node accumulatively obtains flow table statistics F with 5 timestamps for each switch1、F2、F3、F4、F5Namely, data is obtained that: fiThe controller number, the switch number, the timestamp X, and the flow table statistic Y are set to { the controller number, the switch number, the timestamp X, and the flow table statistic Y };
s5.4, if the flow table statistic sum in the controller flow of the 5 timestamps is maximum, the flow table statistic sum is larger than the historical flow table statistic H of the controllerifmaxThen, then
Figure GDA0002132464100000241
S5.5, for each switch controlled by each controller in the cluster controller, calculating flow table statistical information F of each switch of the next timestamp by using a least square mathematical model of a formula 1-1 according to formulas 1-2 and 1-3inext
And S5.6, in order to enable the estimated value to be closer to the actual value, taking the flow table statistics actual measurement value of the time stamp in one week, and summing the flow table statistics actual measurement value with the estimated value for averaging.
S6, according to the timestamp, the supernode D reads, from the cluster distributed shared storage system, statistics OF other OF interaction information (hereinafter referred to as other OF information for short) reported by each controller except packet _ in, and is implemented by the following sub-steps:
s6.1, determining the number N OF the timestamps, namely trying to acquire complete other OF information statistical sets OF the N timestamps; the complete other OF information set refers to all OF interaction statistical information OF all different switches and controllers with the same timestamp OF the same controller except for packet _ in, and the timestamp is the latest;
s6.2, if the number OF the complete other OF information statistical sets OF the acquired timestamps is less than N, circularly executing S2 until other OF information statistical sets OF the N timestamps are acquired;
s6.3, according to the other OF information statistic set, the super node accumulatively obtains other OF information statistics M with N timestamps for each switch1、M2、……、MNNamely, data is obtained that: miController number, switch number, timestamp X, other OF info statistics Y.
S6.4, if the largest one OF the other OF information statistics OF the controller with the N timestamps is larger than the historical other OF information statistics H OF the controllerimmaxThen, then
Figure GDA0002132464100000242
S6.5, calculating other OF statistical information M OF each switch OF the next timestamp by using a least square method mathematical model (see formula 1-1) through regression analysis for each switch controlled by each controller in the cluster controllerinextThe calculation formulas are shown as formula 1-2 and formula 1-3;
s6.6, in order to enable the estimated value to be closer to the actual value, according to the sampling period OF the sample data, the actual values OF other OF statistical information OF the timestamp switch in the first few periods OF actual measurement are obtained, and then the actual values and the estimated value are summed and averaged to obtain a more accurate estimated value.
S7, calculating P according to the actual data by using the formulas 1-4, 1-5 and 1-6PHi、PFHiAnd PMHiRespectively with P calculated by equations 1-7, 1-8 and 1-9PHv、PFHvAnd PMHvMaking a comparison, based on the magnitude of the comparisonAdjusting switches controlled by various controllers to realize load balancing, wherein the step is realized by the following substeps:
s7.1, in this embodiment, it is assumed that the coefficient x is 0.5 and y is 0.5, that is, the number OF managed switches is adjusted according to the packet _ in packet reported by each switch, the flow table issued by each switch, and other OF messages at the same time;
s7.2, setting the switch pool to be mobilized to be empty; the packet-in message number of the obtained 5 timestamps is calculated to obtain: pPH1、PPH2And PPH3(ii) a The flow table statistics of the acquired 5 timestamps are calculated to obtain: pFH1、PFH2And PFH3(ii) a The statistical calculation OF other OF messages with the acquired 5 timestamps results in that: pMH1、PMH2And PMH3(ii) a Calculating the ratio of the total estimated received packet-in message number of the controller to the total maximum packet-in message number as PPHv(ii) a Calculating the ratio of the total predicted issued flow table number of the controller to the total maximum issued flow table number as PFHv(ii) a Calculating the ratio OF the total estimated other OF messages OF the controller to the total maximum other OF messages as PMHv(ii) a The switch pool to be dispatched is loaded with the element EP ═ { the serial number of the out-going controller, the serial number of the switch, the number of packet-in messages and the serial number of the in-going controller }; the EF is equal to { the serial number of a roll-out controller, the serial number of a switch, the number of a flow table and the serial number of a roll-in controller }; EM is as follows, the serial number OF the roll-out controller, the serial number OF the exchanger and the serial number OF the other OF messages are as follows;
s7.3, P can be obtained according to the formulas 1 to 10 and 1 to 11iAnd PvReference PiAnd S7.4 is executed for each controller in descending order, and S7.7 is executed after the execution is finished.
S7.4, for each controller, when P isiGreater than PvIf so, executing S7.5, otherwise, executing S7.6;
s7.5, calculating a list of switches to be called out, wherein the step is realized by the following substeps:
s7.5.1, the number OF switches to be controlled is adjusted according to the packet _ in message OF each switch received by the controller, the number OF flow tables issued by the controller, and other OF message data, and can be obtained according to formulas 1 to 12:
Bosize=(1-0.5)*(0.5*Bposize+0.5*Bfosize)+0.5*Bmosize
s7.5.2, and then calculating B according to equations 1-13inextAccording to BinextA plurality of pairs of switches controlled by the controller are arranged in an ascending order to obtain a switch queue;
s7.5.3, selecting the switch from the queue from top to bottom;
s7.5.4, cumulative calculation is moved out of switch BinextIf not greater than BosizeContinue execution S7.5.4, otherwise execute S7.5.5;
s7.5.5, numbering the exchanges to be mobilized, together with the controller number, BinextAdding the switch to be dispatched into a switch pool, wherein the serial number of the transferred-in controller is null;
s7.6, calculating a list of switches to be called in, wherein the step is realized by the following substeps:
s7.6.1, in this embodiment, the number OF managed switches is adjusted according to the packet _ in message received by each switch by the controller, the number OF flow tables issued by the controller, and other OF message data, and can be obtained according to formulas 1 to 14;
Bisize=(1-0.5)*(0.5*Bpisize+0.5*Bfisize)+0.5*Bmisize
s7.6.2, according to BisizeThe size of the controller is arranged in a descending order, and then the controller is sequentially called into the switch according to the load of the controller, and the method is specifically realized by the following substeps:
s7.6.2.1, according to the switch pool B to be transferredinextThe size makes descending order arrangement to the exchangers to obtain an exchanger queue;
s7.6.2.2, for each controller, selecting switch from the above queues from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeThen the exchange pool to be dispatched is merged with the exchange poolThe transfer-in controller number of the element corresponding to each switch is set as the controller number, and Bisize=Bisize-BinextThen the next switch is checked until the last switch is checked, and the specific steps are shown in the flowchart of fig. 4.
S7.7, reconstructing a corresponding switch to realize load balancing, wherein the step is realized through the following substeps:
s7.7.1, if the number of the transfer-in controller is not null, the super node transfers the switch command to the switch corresponding to the number of the transfer-out controller and the number of the transfer-in controller and executes S7.7.2, otherwise, the super node skips over the element
S7.7.2, exchanging according to the slave-master mechanism to realize the switch dispatching; the slave-master mechanism is exchanged with OpenFlow protocol setting and is used for changing roles of different controllers during multi-controller control.
S8, the scheduling is finished, and S2 is repeated at the next time interval.
In another embodiment, a software is provided, which is used to execute the technical solutions described in the above embodiments and the preferred embodiments.
In another embodiment, a storage medium is provided, wherein the software is stored in the storage medium, and the storage medium includes, but is not limited to, an optical disc, a floppy disc, a hard disc, a rewritable memory, and the like.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method of load balancing, comprising:
collecting data of characterization parameters of a plurality of switches managed and controlled in each SDN controller of a cluster Software Defined Network (SDN) controller;
according to the data of the characterization parameters of the plurality of exchangers, predicting the data of the characterization parameters of the plurality of exchangers at the next moment;
and according to the estimated data of the characterization parameters of the switches at the next moment, carrying out load balancing on each SDN controller of the cluster SDN controllers.
2. The method of claim 1, wherein the characterization parameters comprise at least one of: packet-in messages, flow table numbers and OF messages except the packet-in messages.
3. The method of claim 1, wherein predicting data for the characterization parameters of the plurality of switches at a next time comprises:
and predicting data of the characterization parameters of the plurality of switches at the next moment by using a least square method.
4. The method of claim 3, wherein estimating data for the characterizing parameters of the plurality of switches at a next time using a least squares method comprises:
for each switch, calculating the data of the characterization parameter of each switch at the next moment by using the following least square mathematical model: y ═ α + β × x, where x is data of the characterization parameter at the current time, and y is data of the characterization parameter at the next time; the values of the parameters α and β are calculated according to the following equations:
Figure FDA0002583735080000011
wherein n is the number of times in the current statistical period, X is a timestamp corresponding to the time, and Y is the value of the characterization parameter of each switch.
5. The method of claim 1, wherein the data of the characterization parameters comprises sample history data of the characterization parameters and data of the characterization parameters at various times in a current statistical cycle; according to the data of the characterization parameters of the switches, estimating the data of the characterization parameters of the switches at the next moment comprises the following steps:
and predicting the data of the characterization parameters of the plurality of switches at the next moment according to the sample historical data of the characterization parameters of the plurality of switches and the data of the characterization parameters at each moment in the current statistical period.
6. The method of claim 5, wherein predicting data for the characterizing parameters of the plurality of switches at a next time comprises:
estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters at each moment in the current statistical period;
and summing and averaging the sample historical data of the characterization parameters and the estimated data of the characterization parameters at the next moment.
7. The method of claim 1, wherein load balancing the SDN controllers of the cluster SDN controllers according to pre-estimated data of the characterization parameters of the plurality of switches at a next time comprises:
calculating the ratio P of the estimated value of each controller to the corresponding historical maximum value of the characteristic parameter according to the estimated data of the characteristic parameters of the plurality of switches at the next momentYHi
Calculating a ratio P of the total estimated value of the whole controller cluster to the maximum value of the total history for the characterization parameterYHv
Will PYHiAnd PYHvAnd comparing, and adjusting the switch controlled by the controller according to the comparison result.
8. The method of claim 7,
PYHicalculated by the following formula:
Figure FDA0002583735080000021
wherein n is the number of switches managed by each controller, YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximum values for the characterization parameters for each switch managed by the controller; and/or the presence of a gas in the gas,
PYHvcalculated by the following formula:
Figure FDA0002583735080000022
wherein m represents the number of controllers, n represents the number of switches managed by each controller, and YinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximums for the characterization parameters for each switch managed by the controller.
9. The method of claim 7, wherein P is addedYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes:
setting a proportionality coefficient for a plurality of different characterization parameters, wherein the proportionality coefficient is used for expressing the proportion of each characterization parameter in the comparison process.
10. The method of claim 9, wherein P is addedYHiAnd PYHvThe switch that carries out the comparison, and adjust controller management and control according to the result of comparison includes:
for each controller, when it is PYHiGreater than PYHvCalculating the switch to be called out, and calling out the switch according to the calculation result; and/or the presence of a gas in the gas,
for each controller, when it is PYHiLess than PYHvAnd calculating the switch to be called in, and calling in the switch according to the calculation result.
11. The method of claim 10, wherein computing the switches to be called out and calling out the switches according to the computation comprises:
for controller calculation
Figure FDA0002583735080000031
Is set as ByosizeAnd obtaining B according to the proportionality coefficientosizeThe proportionality coefficient is used for representing the proportion of a plurality of characterization parameters in the comparison process, wherein n represents the number of switches managed and controlled by each controller, and Y represents the number of switches managed and controlled by each controllerinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximum values for the characterizing parameters for each managed switch controller;
deriving B from the predicted data for each switchinext=Yinext
According to BinextThe values of the data are arranged in an ascending order for the switches controlled by the controller to obtain a switch queue;
selecting switches from the switch queue from top to bottom, and cumulatively counting B to move out of the switchinextIf not greater than BosizeContinuing to select the switch;
and adding the selected switch to be mobilized into a switch pool to be mobilized, wherein the switch pool to be mobilized is used for storing the information of the switch to be mobilized.
12. The method of claim 10, wherein computing the switch to be entered and invoking the switch based on the computation comprises:
for controller calculation
Figure FDA0002583735080000032
Is set as ByisizeAnd obtaining B according to the proportionality coefficientisizeThe proportionality coefficient is used for representing the proportion of a plurality of characterization parameters in the comparison process, wherein n represents the number of switches managed and controlled by each controller, and Y represents the number of switches managed and controlled by each controllerinextA predicted value for the characteristic parameter for each switch managed by the controller, HiymaxHistorical maximum values for the characterizing parameters for each managed switch controller;
according to BisizeAnd the values of the data are sorted in a descending order, and then are sequentially called into the switch according to the load of the controller.
13. The method of claim 12, wherein sequentially tuning into the switch based on the controller load comprises:
deriving B from the predicted data for each switchinext=YinextThen according to B of each switch to be transferred in the switch pool to be transferredinextThe values of the switches are arranged in a descending order to obtain a switch queue, wherein the switch pool to be mobilized is used for storing the information of the switches to be mobilized;
for each controller, selecting a switch from the queue from top to bottom, and respectively selecting BinextAnd BisizeMaking a comparison, if Binext>BisizeThen select the next switch, if Binext<BisizeSetting the transferred controller number of the element corresponding to the switch in the switch pool to be transferred as the controller number, and setting Bisize=Bisize-BinextThen the next switch is checked until the last switch.
14. An apparatus for load balancing, comprising:
the system comprises a collection module, a processing module and a processing module, wherein the collection module is used for collecting data of characterization parameters of a plurality of switches managed and controlled in each SDN controller of the cluster software defined network SDN controllers;
the estimation module is used for estimating the data of the characterization parameters of the plurality of switches at the next moment according to the data of the characterization parameters of the plurality of switches;
and the load balancing module is used for carrying out load balancing on each SDN controller of the cluster SDN controllers according to the estimated data of the characterization parameters of the switches at the next moment.
CN201410555510.5A 2014-10-17 2014-10-17 Load balancing method and device Active CN105577729B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410555510.5A CN105577729B (en) 2014-10-17 2014-10-17 Load balancing method and device
PCT/CN2015/071446 WO2015131699A1 (en) 2014-10-17 2015-01-23 Load balancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410555510.5A CN105577729B (en) 2014-10-17 2014-10-17 Load balancing method and device

Publications (2)

Publication Number Publication Date
CN105577729A CN105577729A (en) 2016-05-11
CN105577729B true CN105577729B (en) 2020-09-29

Family

ID=54054547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410555510.5A Active CN105577729B (en) 2014-10-17 2014-10-17 Load balancing method and device

Country Status (2)

Country Link
CN (1) CN105577729B (en)
WO (1) WO2015131699A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3472973B1 (en) * 2016-06-20 2021-09-08 Telefonaktiebolaget LM Ericsson (PUBL) Method and device for determining resource utilization
CN106330558A (en) * 2016-08-31 2017-01-11 哈尔滨工业大学(威海) Controller load prediction system and method applied to software defined network
US10887786B2 (en) * 2016-10-25 2021-01-05 Extreme Networks, Inc. Near-uniform load balancing in a visibility network via usage prediction
CN106941456B (en) * 2017-05-17 2019-08-30 华中科技大学 The load-balancing method and system of plane are controlled in a kind of software defined network
CN107425987B (en) * 2017-09-12 2019-11-01 中国联合网络通信集团有限公司 A kind of Switch control method, apparatus and system
CN112685170B (en) * 2019-10-18 2023-12-08 伊姆西Ip控股有限责任公司 Dynamic optimization of backup strategies
CN114826923B (en) * 2021-01-27 2023-04-28 华中科技大学 Network stiffness evaluation method of SDN (software defined network)
CN114338537B (en) * 2021-12-29 2024-01-19 安徽大学 SDN load balancing dual-weight switch migration method and system based on prediction

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074449A1 (en) * 2001-10-12 2003-04-17 Rory Smith Bandwidth allocation in a synchronous transmission network for packet oriented signals
US9210615B2 (en) * 2012-09-17 2015-12-08 Brocade Communications Systems, Inc. Method and system for elastic and resilient 3G/4G mobile packet networking for subscriber data flow using virtualized switching and forwarding
CN103731307B (en) * 2013-12-30 2017-01-04 浙江大学 A kind of for multiple services standardized data face dynamic reconfiguration method
CN103795805B (en) * 2014-02-27 2017-08-25 中国科学技术大学苏州研究院 Distributed server load-balancing method based on SDN
CN103929333A (en) * 2014-05-08 2014-07-16 陈桂芳 Implementation method for SDN controller pool
CN104065585B (en) * 2014-07-16 2017-07-04 福州大学 A kind of method that controller load is dynamically adjusted in software defined network
CN104092774B (en) * 2014-07-23 2018-03-09 新华三技术有限公司 Control method and device are established in software defined network connection
CN104065509B (en) * 2014-07-24 2017-07-11 大连理工大学 A kind of SDN multi-controller dispositions methods for reducing management load overhead

Also Published As

Publication number Publication date
CN105577729A (en) 2016-05-11
WO2015131699A1 (en) 2015-09-11

Similar Documents

Publication Publication Date Title
CN105577729B (en) Load balancing method and device
CN106886603B (en) Hierarchical distributed system architecture and method for demand response resource combination optimization
US8364820B2 (en) Data center resource usage and cost determination
Wu et al. Power consumption and GoS tradeoff in cellular mobile networks with base station sleeping and related performance studies
CN109471705A (en) Method, equipment and system, the computer equipment of task schedule
Stolyar et al. Shadow-routing based control of flexible multiserver pools in overload
Gurvich et al. Overflow networks: Approximations and implications to call center outsourcing
CN106027288A (en) Communication traffic prediction method for distribution line information monitoring service
CN110149377A (en) A kind of video service node resource allocation methods, system, device and storage medium
CN105471755A (en) Network flow balancing method and super controller
CN109150756A (en) A kind of queue scheduling weight quantization method based on SDN power telecom network
US9178826B2 (en) Method and apparatus for scheduling communication traffic in ATCA-based equipment
Borst et al. Fluid limits for bandwidth-sharing networks in overload
Kryvinska Intelligent network analysis by closed queuing models
Polezhaev et al. Network resource control system for HPC based on SDN
CN106447302A (en) Intelligent order distributing method
Wong et al. A Century-Long Challenge in Teletraffic Theory: Blocking Probability Evaluation for Overflow Loss Systems with Mutual Overflow
Jung et al. Revisiting stochastic loss networks: Structures and algorithms
Schulz et al. End-to-end latency distribution in future mobile communication networks
Khojasteh et al. Prioritization of overflow tasks to improve performance of mobile cloud
Srikant et al. Variance reduction in simulations of loss models
Iversen Reversible fair scheduling: the teletraffic theory revisited
Tekin et al. Dynamic server allocation for unstable queueing networks with flexible servers
Yang et al. E2E delay optimization for smart grids mission-critical slices in core networks
Rubino On Kleinrock's power metric for queueing systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant