Lbass (iii) basic knowledge of neutron Lbaas service __openstack

Source: Internet
Author: User
Tags haproxy

In the OpenStack grizzly version, the quantum component introduces a new network service: LoadBalancer (Lbaas), and the architecture of the service complies with the Services insertion framework. LoadBalancer provides the tenant with a load balancing of traffic to a set of virtual machines, the basic implementation of which is to generate Haproxy configuration files in Neutron-lbaas-agent and then start Haproxy. Neutron Lbaas Service Architecture

Lbaas is mainly composed of several modules, as shown in the following figure LoadBalancer processing restful API Loadbalancerplugin,this class manages the workflow of Lbaas Ponse. Most DB related works are implemented in class loadbalancer_db. Loadbalancerplugindb Scheduler:loadbalancer_pool_scheduler_driver = Neutron.services.loadbalancer.agent_scheduler . Chancescheduler is responsible for assigning the appropriate agent lbaas-agent to the VIP to receive plugin messages and forwarding the request to Device_driver (haproxynsdriver) execution Haproxynsdriver Implement load-balanced device driver, generate Haproxy configuration file and start Haproxy

Lbaas Data Model

As shown in the figure above, the data model consists primarily of four objects, such as Pool,vip,member,healthmonitor. At the heart of it is pool (which I tend to name as Loadballancer), which represents a load balancer. A load balancer has a VIP, which is a virtual IP. Virtual IP is in fact relative to the latter, which means that the VIP is not fixed on any member. Users visit this VIP, sometimes by the members of the service, sometimes by that member. Member is a server that provides services in the background. HealthMonitor is used to monitor and check the connectivity of the backend servers. When you check that a server is unavailable, the load balancer does not use it to provide services to users. A pool can correspond to multiple Health monitor. There are four types: PING, TCP, HTTP, HTTPS. Each type uses the appropriate protocol to detect the member.

In addition to the above four objects, session persistence and connection limits These two features are also more important: Session persistence rules the same connection or request forwarding behavior. There are currently three types of support:

SOURCE_IP: Refers to a connection request from the same IP sent by a member to receive processing; Http_cookie: In this mode, LoadBalancer generates cookies for the first connection to the client. Subsequent requests to carry the cookie are processed by a member App_cookie: This mode relies on a COOKIE generated by the backend application server to be processed by a member

Connection Limits This feature is mainly used to protect against DDoS attacks

Lbaas Deployment Method

1. Devstack, add the Enabled_services+=,q-lbaas option;

2. RDO deployment: Packstack--allinone--neutron-lbaas-hosts=192.168.1.10 (Specific steps reference: Http://openstack.redhat.com/LBaaS)

3. You can also use the OpenStack heat to deploy Lbaas, specifically see http://blog.csdn.net/lin_victor/article/details/23060467

For Lbaas to is configured properly, various configuration files must have the following changes. The Service_provider parameter should is set In/usr/share/neutron/neutron-dist.conf:service_provider = Loadbalancer:ha Proxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver. Haproxyonhostplugindriver:default The Service_plugin should be set in/etc/neutron/neutron.conf:service_plugins = Neutr On.services.loadbalancer.plugin.LoadBalancerPlugin the Interface_driver and device_driver should be set In/etc/neutron /lbaas_agent.ini. Since the Load balancer'll be haproxy, set the Device_driver accordingly:device_driver = Neutron.services.loadbalancer . Drivers.haproxy.namespace_driver.

Haproxynsdriver the interface_driver would depend on the core L2 plugin being. For openvswitch:interface_driver = Neutron.agent.linux.interface.OVSInterfaceDriver for Linuxbridge:interface_ Driver = Neutron.agent.linux.interface.BridgeInterfaceDriver If The above configuration files WerE changed manually, restart the Neutron-server service and Neutron-lbaas-agent service. 

How to use Lbaas

The basic steps to use are:

The tenant creates a pool with an initial member number of 0; the tenant creates one or more member tenants within the pool create one or more Health Monitor tenants will health monitors and pool-affiliated tenants to create VIP with pool

Unitedstack Blog to organize a detailed use of the steps: https://www.ustack.com/2013/10/08/neutron_loadbalance/ reference

Https://wiki.openstack.org/wiki/Neutron_LBaaS_Arch

Https://wiki.openstack.org/wiki/Neutron/LBaaS/Architecture/Scheduler

Http://openstack.redhat.com/LBaaS

https://www.ustack.com/2013/10/08/neutron_loadbalance/

http://blog.csdn.net/matt_mao/article/details/12982963

http://blog.csdn.net/lynn_kong/article/details/8528512

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.