/
Load Balancer

Load Balancer

A simple load balancer module for ping, TCP, and UDP flows. This module is accessed via a REST API defined close to the OpenStack Quantum LBaaS (Load-balancer-as-a-Service) v1.0 API proposal. See http://wiki.openstack.org/Quantum/LBaaS. Since the proposal has not been final, no efforts have yet been made to confirm compatibility at this time.

The code is not considered complete at this time, but it supports basic creation and use of load balancer for ICMP, TCP, and UDP services.

Limitations:

  • client records and static flows not purged after use, will exhaust switch flow tables over time
  • round robin policy among servers based on connections, not traffic volume
  • health monitoring feature not implemented yet

Help from the floodlight community to improve the implementation is welcome.

To try out the basic features:
1. Obtain floodlight master (as of 12/12/2012) or v1.0 and up.
2. Confirm net.floodlightcontroller.loadbalancer.LoadBalancer is enabled in floodlight.defaultproperties.
3. Start floodlight.
4. Start mininet with at least 8 hosts, e.g:

sudo mn --controller=remote,ip=<controller ip>,port=6653 --switch ovsk,protocols=OpenFlow13 --mac --topo=tree,3


5. In mininet do 'pingall'
6. In any linux console set up the load balancer vips, pools, and members using a script such as the following:

#!/bin/sh

curl -X POST -d '{"id":"1","name":"vip1","protocol":"icmp","address":"10.0.0.100","port":"8"}' http://localhost:8080/quantum/v1.0/vips/
curl -X POST -d '{"id":"1","name":"pool1","protocol":"icmp","vip_id":"1"}' http://localhost:8080/quantum/v1.0/pools/
curl -X POST -d '{"id":"1","address":"10.0.0.3","port":"8","pool_id":"1"}' http://localhost:8080/quantum/v1.0/members/
curl -X POST -d '{"id":"2","address":"10.0.0.4","port":"8","pool_id":"1"}' http://localhost:8080/quantum/v1.0/members/

curl -X POST -d '{"id":"2","name":"vip2","protocol":"tcp","address":"10.0.0.200","port":"100"}' http://localhost:8080/quantum/v1.0/vips/
curl -X POST -d '{"id":"2","name":"pool2","protocol":"tcp","vip_id":"2"}' http://localhost:8080/quantum/v1.0/pools/
curl -X POST -d '{"id":"3","address":"10.0.0.5","port":"100","pool_id":"2"}' http://localhost:8080/quantum/v1.0/members/
curl -X POST -d '{"id":"4","address":"10.0.0.6","port":"100","pool_id":"2"}' http://localhost:8080/quantum/v1.0/members/

curl -X POST -d '{"id":"3","name":"vip3","protocol":"udp","address":"10.0.0.150","port":"200"}' http://localhost:8080/quantum/v1.0/vips/
curl -X POST -d '{"id":"3","name":"pool3","protocol":"udp","vip_id":"3"}' http://localhost:8080/quantum/v1.0/pools/
curl -X POST -d '{"id":"5","address":"10.0.0.7","port":"200","pool_id":"3"}' http://localhost:8080/quantum/v1.0/members/
curl -X POST -d '{"id":"6","address":"10.0.0.8","port":"200","pool_id":"3"}' http://localhost:8080/quantum/v1.0/members/

7. In mininet, do 'h1 ping -c1 10.0.0.100', then do 'h2 ping -c1 10.0.0.100'. Both pings should succeed while they should have been handled by two different real hosts (10.0.0.3 and 10.0.0.4) in turn.

Related content

How to implement Quality Of Service using Floodlight
How to implement Quality Of Service using Floodlight
More like this
Install Floodlight and OpenStack on Your Own Ubuntu VM
Install Floodlight and OpenStack on Your Own Ubuntu VM
More like this
How to Process a Packet-In Message
How to Process a Packet-In Message
Read with this
Module Applications
Module Applications
More like this
Firewall REST API
Firewall REST API
Read with this
Floodlight Projects
Floodlight Projects
More like this