Jump to: navigation, search

Neutron/LBaaS/LVSDriver

< Neutron‎ | LBaaS
Revision as of 00:39, 31 October 2013 by Iwamoto (talk | contribs) (Use case)

Overview

LVS is widely used for load balancing. It is natural to use LVS for Neutron LBaaS implementation.

One of reason to use LVS instead of HAProxy is that it supports transparency of clients (ie. do not SNAT).

It is simple that load balancing service using LVS is handled 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. LVS implementation of this BP is considered as a reference implementation using '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 'routerd-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: coming soon