Jump to: navigation, search

Difference between revisions of "Neutron/LBaaS/LVSDriver"

< Neutron‎ | LBaaS
(Overview)
(Implementation)
Line 46: Line 46:
 
Note that keepalived is used for our implementation to control LVS and members.
 
Note that keepalived is used for our implementation to control LVS and members.
  
Code: https://github.com/ntt-sic/neutron/tree/bp/lbaas-lvs-driver
+
Code: https://github.com/ntt-sic/neutron/tree/bp/lbaas-lvs-driver-2
  
note: this shows basic structure of the driver well, though WIP
+
(Dec 24, updated to a new branch name according to recent progress in BP lbaas-common-agent-driver.)

Revision as of 08:16, 24 December 2013

Overview

LVS is a popular load balancer implementatian. The Neutron LBaaS should support LVS.

One of the advantages of LVS over HAProxy is that LVS supports transparency of clients (ie. do not SNAT).

As an LVS loadbalancer looks like a router with an additional feature, it is simple and straightforward to implement an LVS loadbalancer in a router.

There is 'routed-service-insertion' extension which is intended to use for adding LBaaS to a router, but there is no implementation using this now. BP lbaas-support-routed-service-insertion adds the routed-service-insertion extension into the LBaaS plugin. LVS implemention (BP lbaas-lvs-driver) is done on top of this BP, and the implementation can be considered as a reference use of 'routed-service-insertion'.

Use case

1) make a router which handles LBaaS and connect two internal ports, one is pool's subnet and one is vip's subnet. note that the router is used as a normal router too.

LVS LBaaS Diagram1.jpg

2) create a pool and a vip with specifying the router id to 'router_id' attribute. note that 'router_id' attribute is added by 'routed-service-insertion' extension.

That's all.

Note that a floatingip can be attached to a vip.

LVS LBaaS Diagram2.jpg

Implementation

1. Add routed-service-insertion extension in LBaaS service plugin

BP: https://blueprints.launchpad.net/neutron/+spec/lbaas-support-routed-service-insertion

It is simple to add 'routed-service-insertion' the existing LBaaS plugin instead of making another plugin since the extension is no effect to existing functions.

2. Implement LBaaS using LVS

BP: https://blueprints.launchpad.net/neutron/+spec/lbaas-lvs-driver

The LVS driver is a provider driver like the HAProxy provider driver. Unlike HAProxy driver the LVS driver communicates with l3_agent.

Our proof of concept implementation is straight forward that L3NATAgent inherits LVSL3AgentRpcCallback which handles LBaaS related RPC and functions. Note that it is same method as FWaaS done the l3_agent. This will be changed according to the service chaining or the l3_agent abstraction discussion.

Note that keepalived is used for our implementation to control LVS and members.

Code: https://github.com/ntt-sic/neutron/tree/bp/lbaas-lvs-driver-2

(Dec 24, updated to a new branch name according to recent progress in BP lbaas-common-agent-driver.)