0% found this document useful (0 votes)
57 views

Dynamic Load Balancing Strategy in Softw

Uploaded by

Javier
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Dynamic Load Balancing Strategy in Softw

Uploaded by

Javier
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

International Conference on Trends in Electronics and Informatics

ICEI 2017

Dynamic Load Balancing Strategy in Software-Defined Networking


Saket Bhelekar Mrdvika Iyer Gargee Mehta Sheetal Chaudhari
Department of Information Department of Information Department of Information Department of Information
Technology, Technology, Technology, Technology,
S.P.I.T, Mumbai S.P.I.T, Mumbai S.P.I.T, Mumbai S.P.I.T, Mumbai
[email protected] [email protected] [email protected] sheetal [email protected]

Abstract— This paper describes an SDN based dynamic load


balancing strategy that takes into consideration the current
number of active connections to the individual servers as well
as evaluating the shortest path between the client and server
to avoid congestion.
Keywords—Software Defined Networking (SDN); OpenFlow;
Mininet; Dynamic Load Balancing; OpenDaylight

N OMENCLATURE
Software-Defined Networking (SDN), OpenDaylight
(ODL), Representational State Transfer (REST),
OpenDaylight User Experience (DLUX), Hypertext Transfer
Protocol (HTTP), Application Programming Interface (API),
Transmission Control Protocol (TCP), JavaScript Object
Notation (JSON)
I. INTRODUCTION
Fig. 1. SDN architecture
Traditional network architectures are ill-suited to meet the
requirements of todays enterprises, carriers, and end users.
SDN aims at overcoming this issue faced by traditional through load balancing helps in increasing the throughput,
networks by disengaging the control plane from the data while reducing the response time [3]. This implementation
plane with the help of OpenFlow protocol [1]. The control of the load balancer allows to expand our network topology
plane is mainly concerned with where the traffic is sent, while trying to serve multiple client requests. The strategy
while the data plane deals with forwarding the traffic to implemented in this paper is such that the traffic is distributed
the destination and are usually unable to make decisions by based on the number of active connections to the individual
themselves. Essentially, the control plane acts as the ’brain’ servers [4]. The client sends a request, and the load balancer
of the SDN architecture. An SDN network also consists is responsible for forwarding this request to the server with
of two interfaces, Northbound and Southbound interface. the least number of active connections. This paper goes on
Northbound interface is responsible for the communication to describe in depth how this form of load balancing is
between the controller and applications whereas, Southbound implemented.
interface is required for communication between the for-
warding devices and the controller [2]. Both the interfaces II. LOAD BALANCING ARCHITECTURE
operate with the help of APIs like REST (Northbound) and The load balancing architecture’s primary components
OpenFlow (Southbound). Out of the variety of controllers are the OpenFlow switches, OpenDaylight controller and
available in the SDN domain, after careful consideration, we multiple hosts connected to the ports of the OpenFlow
have chosen OpenDaylight Controller for our paper. ODL switches. In this paper we have used a network topology
promotes standardization of SDN Northbound APIs so that similar to the fat-tree topology to test our load balancing
services can be written quickly and effectively. It exposes the strategy. The distinctive feature of a fat-tree is that for any
REST APIs which can be accessed with ease using URLs. switch, the number of links going down to its siblings is
SDN load balancers are convenient since they permit design equal to the number of links going up to its parent in the
and implementation of customized load balancing strategy. upper level.Therefore, the links get fatter towards the top of
Load balancing, as the name suggests, entails distributing the the tree. A similar topology is chosen for evaluation because
load evenly and dynamically managing the traffic. Load bal- it is a typical type of real data center network in which there
ancing plays an essential role in terms of applications, while are a large number of traffic flows and various traffic types
taking us a step closer in ensuring that the network becomes that enter the network [5]. The network architecture used is
fault tolerant. Optimally utilizing the available resources shown in Fig 2.

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 875


International Conference on Trends in Electronics and Informatics
ICEI 2017

The main purpose of using this algorithm as a part of the


strategy is to find the shortest route from the host to the
server selected based on least connections and additionally
avoid paths with congestion on them. The traffic statistics
such as the transmission rate and the receiving rate which
are provided by the controller act as the cost of each edge in
the network graph. The load balancer then goes on to push
the flow rules in the switches along the selected shortest path.
This process repeats itself for every request and the traffic
statistics are updated every minute to facilitate the proper
working of Dijkstra’s algorithm.
IV. IMPLEMENTATION SOFTWARE
The following softwares are used in order to implement
the functionalities of the load balancer:

Fig. 2. Fat Tree A. VirtualBox


It can run several virtual machines simultaneously, thus
providing ease of use and concurrency.
There are 3 HTTP servers h1, h2 and h3 in the network,
each of which is assigned a static IP address. Hosts h4, h5, B. Mininet
h6, h7 and h8 act as clients and send requests to the servers. Mininet emulator is used for creating complex networks
Hosts and servers are connected to a network of 10 Open on the limited resources of a Virtual Machine. It is respon-
vSwitches which are further connected to the ODL controller. sible for prototyping a large network on a single machine.
The network is created in the Mininet emulator. Scalability is one of Mininet’s strong suits. For this paper, we
have installed Mininet on a virtual machine in VirtualBox.
III. STRATEGY
For this, the Open Virtualization Format (ovf) package for
In this paper, we have implemented a strategy that essen- Mininet is downloaded from the Mininet website and loaded
tially uses two concepts, one based on the number of least into VirtualBox. On following the installation steps, our end
connections and the other based on the shortest path from product is Mininet as a virtual machine on VirtualBox [9].
the host to the server (Dijkstra’s algorithm).
A. Least Connections
The job of a load balancer is to route the incoming requests
to the server having the least load. There are a number
of metrics to measure the load on a server. One of the
methods to gauge the load on a server is to look at the
number of active connections the server has at a point of
time and we use this metric in our load balancing strategy
[6]. The first step in implementing the load balancer is
to collect information about the existing network topology,
network devices and the links within the network. We gather Fig. 3. Mininet
this information by using the RESTCONF Northbound APIs
provided by the ODL controller which provide an additional
simplified interface that follows REST-like principles and is C. OpenDaylight controller
compatible with a resource-oriented device abstraction [7]. OpenDaylight controller is a Java based controller. Open-
After this step we establish the server which has the least Daylight supports technology such as OpenFlow. It is a
number of connections for the individual servers. When the highly scalable and modular controller infrastructure that is
next request comes in, the server with the least load at that primarily used for SDN deployments. OpenDaylight con-
point is chosen to serve the request. At this point, it also troller is installed on top of an Ubuntu Server. First, an ISO
takes into consideration the server that is serving the previous image of Ubuntu Server is installed on VirtualBox. The IP
requests. Hence it is ensured that the load balancing strategy address for the machine is obtained through DHCP. After
is considering the current load, i.e current active connections this, the ODL installation tar file is downloaded from the
on the server. OpenDaylight website and the controller. For this paper we
have installed the Beryllium release of ODL. The file is
B. Path Discovery extracted and installed. OpenDaylight is packaged in a karaf
The Dijkstra’s algorithm is employed to find out the container. Karaf is a container technology that allows the
shortest path between the selected server and the host [8]. developers to put all required software in a single distribution

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 876


International Conference on Trends in Electronics and Informatics
ICEI 2017

which is a necessary Southbound API for communication


between the switches and the controller. It is a multilayered
virtual switch, designed to enable massive network automa-
tion through programmatic extension, while still supporting
standard management interfaces and protocols. A switch
stores a flow table inside it that has flow entries in it which
are used to decide the route of an incoming packet. A
typical flow entry consists of three sections - rule, action
and statistics. The rule section consists of Switch Port,
Source MAC address, Destination MAC address, Ethernet
type, VLAN ID, Source IP address, Destination IP address,
Source IP port and Destination IP port. The action section
contains information about what to do with the packet when
it arrives. A switch can forward the packet to a port, forward
the packet to the controller, drop the packet or send it to
normal processing pipeline depending on what is mentioned
Fig. 4. OpenDaylight
in this section. The statistics part contains packet and byte
counters [12].
folder. The controller is started by running the ./bin/karaf V. IMPLEMENTATION
command inside the distribution folder [10]. Fig. 4 shows
the ODL console. After installing Mininet and ODL controller, we create
a Python file topology.py in which we create the network
D. DLUX interface topology and start the network using the Mininet Python
DLUX interface is an OpenFlow network management API. In a separate terminal we start the load balancer
application for ODL controller. DLUX uses the Service application in Python. The program first gathers and stores
Abstraction Layer (SAL) services to obtain network related information about the topology, links and devices with the
information and uses it to provide network management help of RESTCONF API. Fig. 6 shows the information about
capability. DLUX provides us with a graphical user interface topology and links obtained.
to view information pertaining to the topology, such as the
links between the hosts and switches, and the number of
hosts and switches. Another additional capability that DLUX
offers is pushing the flow rules in the switches, as well as
obtain the flow rules from the switches [11]. Fig. 5 shows
the topology in DLUX interface.

Fig. 6. Topology information from RESTCONF

The information is obtained through HTTP GET method


in the form of JSON format which is interpreted by JSON
library in Python. The program then finds out the server that
has the least number of active connections. After that the
Fig. 5. Topology in DLUX load balancer detects the available paths between the client
and server. Fig. 7 shows the available paths and number of
connections.
E. Open vSwitch It also finds out the shortest path out of given paths from
Open vSwitch, also known as Open Virtual Switch is the client to the server using Dijkstra’s algorithm. This is done
switch used in the network topology. It supports OpenFlow by using the transmission rate and receiving rate available

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 877


International Conference on Trends in Electronics and Informatics
ICEI 2017

2 and 1:6:10:8:3 with cost 4. The load balancer selects first


path with lower cost and pushes the flows along that path.
VI. CONCLUSION
This paper proposes a strategy for load balancing in
Software-Defined Networks using OpenDaylight controller.
The strategy involves amalgamation of two concepts namely,
Fig. 7. Available paths and number of connections Dijkstra’s shortest path algorithm and least connections. The
TABLE I concept of least connections helps choose the server with the
least number of connections, while the concept of Dijkstra’s
Servers Number of Connections algorithm helps choose the shortest path from the host to the
t = 60s t = 120s t = 180s
h1 2 1 2 server and avoids the link with congestion, thus contributing
h2 1 5 6 in evenly distributing the load among multiple servers. This
h3 2 3 5 strategy has an upper hand over the already implemented
Server selected h2 h1 h1 random load balancing strategy since it not only attempts
to evenly distribute the load, but also considers the current
load on the servers. Our evaluation shows that our system
from the link statistics. The application then pushes flow
can indeed adapt to changes in target traffic distribution. One
rules into switches on the shortest path by using the PUT
limitation of this paper is that it has not been tested for server
HTTP method. Information such as In-port, Out-port, Source
failure. In our ongoing work, we are trying to overcome this
IP address, Destination IP address, Source MAC address and
limitation as well as use other controllers such as Floodlight
Destination MAC Address are pushed into the switch flow
to implement this strategy.
tables. Fig. 8 shows the load balancer console output. The
R EFERENCES
[1] https://www.opennetworking.org/sdn-resources/sdn-definition
[2] https://www.sdxcentral.com/sdn/definitions/inside-sdn-architecture/
[3] Sukhveer Kaur, Japinder Singh, Kishan Kumar and Navtej Singh
Ghumman, ”Round-Robin Based Load Balancing in Software Defined
Networking”, 22nd International Conference on Computing for Sus-
tainable Global Development (INDIACom), 2015
[4] https://sites.google.com/site/oracledb009/database-concepts/load-
balancing
Fig. 8. Cost computation and path selection [5] Nguyen Tien Hai, Dong-Seong Kim, Efficient Load Balancing for
Multi-Controller in SDN-based Mission-critical Networks, IEEE 14th
International Conference, Industrial Informatics, 2016
load balancer checks the connection status of the servers [6] http://sdntutorials.com/what-is-restconf/
and the traffic on the links every minute to find out the [7] https://docs.citrix.com/en-us/netscaler/11/traffic-management/load-
balancing/load-balancing-customizing-algorithms/leastconnection-
server with least connections and the least congested path method.html
from source to destination, respectively. This makes the load [8] E. Dijkstra, A note on two problems in connexion with
balancer dynamic in nature. graphs”,Numerische Mathematik, Volume 1 Issue 1, 1959, pp 269-
Table 1 shows the distribution of servers selected at t=60s, 271
[9] http://mininet.org/download/
t=120s and t=180s, given the number of connections. At [10] http://www.brianlinkletter.com/using-the-opendaylight-sdn-controller-
t=120s HTTP requests are made from the client h5 to the with-the-mininet-network-emulator/
servers. The load balancer chooses the server with the least [11] https://nexus.opendaylight.org/content/sites/site/org.opendaylight.docs
/master/userguide/manuals/userguide/bk-user-guide/content/
connections at that point of time which happens to be server [12] http://openvswitch.org/
h1. There are two paths from h1 to h5 - 1:5:9:7:3 with cost

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 878

You might also like