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'.
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.
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.
Note that a floatingip can be attached to a vip.
1. Add routed-service-insertion extension in LBaaS service plugin
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
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 (OUTDATED, just look at gerrit)