Neutron LBaaS Service(1)—— Neutron LBaaS Service基本知识
在OpenStack Grizzly版本中,Quantum组件引入了一个新的网络服务:LoadBalancer(LBaaS),服务的架构遵从Service Insertion框架。LoadBalancer为租户提供到一组虚拟机的流量的负载均衡,其基本实现为:在neutron-lbaas-agent中生成Haproxy的配置文件然后启动Haproxy。
Neutron LBaaS Service Architecture
LBaaS主要由以下几个模块构成,如下图所示
- Loadbalancer 处理Restful API
- LoadBalancerPlugin,This class manages the workflow of LBaaS request/response. Most DB related works are implemented in class loadbalancer_db.LoadBalancerPluginDb
- Scheduler: loadbalancer_pool_scheduler_driver = neutron.services.loadbalancer.agent_scheduler.ChanceScheduler 负责为vip分配相应的agent
- lbaas-agent 接收plugin消息,并将请求转发给device_driver(HaproxyNSDriver)执行
- HaproxyNSDriver 实现负载均衡的device driver,生成Haproxy的配置文件然后启动Haproxy
LBaaS数据模型
如上图所示,数据模型主要由Pool,VIP,Member,HealthMonitor等四个对象组成。
- 处在核心位置的是Pool(我倾向于把它命名成loadballancer), 它代表一个负载均衡器。
- 一个负载均衡器拥有一个VIP,也就是虚拟IP。虚拟IP中的虚拟其实是相对后面的Member而言,也就是说这个VIP不固定在任何一个Member上。用户访问这个VIP,有时由这个成员提供服务,有时由那个成员提供服务。
- Member是后台提供服务的服务器。
- HealthMonitor用来监控和检查后台服务器的联通情况。当检查到某个服务器不能使用时,负载均衡器就不会用它来向用户提供服务。一个pool可对应多个health monitor。有四种类型:PING、TCP、HTTP、HTTPS。每种类型就是使用相应的协议对member进行检测。
除了以上四个对象,Session Persistence和Connection Limits这两个特性也比较重要:
- Session Persistence规定session相同的连接或请求转发的行为。目前支持三种类型:
- SOURCE_IP:指从同一个IP发来的连接请求被某个member接收处理;
- HTTP_COOKIE:该模式下,loadbalancer为客户端的第一次连接生成cookie,后续携带该cookie的请求会被某个member处理
- APP_COOKIE:该模式下,依靠后端应用服务器生成的cookie决定被某个member处理
- Connection Limits 这个特性主要用来抵御DDoS攻击
LBaaS部署方法
1. DevStack中,增加 ENABLED_SERVICES+=,q-lbaas 选项即可;
2. RDO部署: packstack --allinone --neutron-lbaas-hosts=192.168.1.10 (具体步骤参考:http://openstack.redhat.com/LBaaS)
3. 也可以使用Openstack Heat来部署LBaaS,具体见http://blog.csdn.net/lin_victor/article/details/23060467
For LBaaS to be configured properly, various configuration files must have the following changes. The service_provider parameter should be set in /usr/share/neutron/neutron-dist.conf: service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default The service_plugin should be set in /etc/neutron/neutron.conf: service_plugins = neutron.services.loadbalancer.plugin.LoadBalancerPlugin The interface_driver and device_driver should be set in /etc/neutron/lbaas_agent.ini. Since the load balancer will be haproxy, set the device_driver accordingly: device_driver = neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver The interface_driver will depend on the core L2 plugin being used. 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.
LBaaS使用方法
基本的使用步骤为:
- 租户创建一个pool,初始时的member个数为0;
- 租户在该pool内创建一个或多个member
- 租户创建一个或多个health monitor
- 租户将health monitors与pool关联
- 租户使用pool创建vip
UnitedStack博客中整理一个详细的使用步骤:https://www.ustack.com/2013/10/08/neutron_loadbalance/
参考文献
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
Neutron LBaaS Service(1)—— Neutron LBaaS Service基本知识的更多相关文章
- WCF Failed to invoke the service. Possible causes: The service is offline or inaccessible
今天写WCf 时遇到如下报错: 调试过程发现,各个过程都无异常,但是返回给调用端数据时出现如下错误. Failed to invoke the service. Possible causes: Th ...
- 服务链(Service Chaining,or Service Function Chaining,SFC,功能服务链)
Software-configured service chaining provides the capability to dynamically include best-of-b ...
- Android Service、IntentService,Service和组件间通信
Service组件 Service 和Activity 一样同为Android 的四大组件之一,并且他们都有各自的生命周期,要想掌握Service 的用法,那就要了解Service 的生命周期有哪些方 ...
- Service Fabric —— Actor / Stateless Service 概念
作者:潘罡 (Van Pan) @ Microsoft 上一节我们谈到了Stateful Service.在Service Fabric中,Stateful Service是理解Micro Servi ...
- How to Remove A Service Entry From Win10 Service List
Warning Please do this operation CAREFULLY, otherwise you may get something wrong with your system. ...
- 【起航计划 033】2015 起航计划 Android APIDemo的魔鬼步伐 32 App->Service->Foreground Service Controller service使用,共享service,前台服务,onStartCommand
Android系统也提供了一种称为“Service”的组件通常在后台运行.Activity 可以用来启动一个Service,Service启动后可以保持在后台一直运行,即使启动它的Activity退出 ...
- svcs (service status) 和 svcadm (service administration) 使用
1. svcs 显示服务实例的状态信息 svcs - report service status 显示服务状态命令 DESCRIPTION The svcs command displays in ...
- AttributeError: module 'selenium.webdriver.common.service' has no attribute 'Service'
今天爬虫时需要使用到selenium, 使用pip install selenium进行安装. 可是一开始写程序就遇到了AttributeError: module 'selenium.webdriv ...
- Service Started!!!-end In Service while
将原先的win7换成了xp,用体验换来更好的兼容 问题如下: 在虚拟机器中运行了DebugView后,就一直重复出现Service Started!!!-end In Service while, 虽 ...
- Android中Service通信(二)——绑定Service进行通信
一.把输入文本的数据同步到服务的实例(如何执行服务的内部代码) 绑定服务比启动服务更加方便高效,绑定服务中的直接方法调用比Intent作为载体传输更为快捷得多. 1.activity_main.xml ...
随机推荐
- What are the 10 algorithms one must know in order to solve most algorithm challenges/puzzles?
QUESTION : What are the 10 algorithms one must know in order to solve most algorithm challenges/puzz ...
- 在Linux上使用web2py_uwsgi_nginx搭建web服务器
本文介绍在Linux使用Python+Nginx+web2py+uWSGI搭建一个web服务器的过程. Python 2.7.11 解压安装包 tar -zxvf Python-2.7.11.tgz ...
- 权限分配界面 纯手工 仅用到bootstrap的架构 以及 c标签
<div class="form-group"> <div class="row"> <label ...
- Web端文件打包.zip下载
使用ant.jar包的API进行文件夹打包.直接上代码: String zipfilename = "test.zip"; File zipfile = new File(zipf ...
- centos rm 回收站
桌面版本的linux就默认有,非桌面版本貌似没(反正我没找到) linux rm删除文件之后,恢复就比较麻烦了,即使恢复了,文件名格式都变成一串数字了. 修改root用户的环境变量 vi ~/.bas ...
- 控制文本和外观------Style Binding(Style属性绑定)
目的 style绑定是添加或删除一个或多个DOM元素上的style值.比如当数字变成负数时高亮显示,或者根据数字显示对应宽度的Bar.(注:如果你不是应用style值而是应用CSS class的话,请 ...
- 【NOIP2010】【P1317】乌龟棋
似乎很像搜索的DP(应该也可以用搜索写) 原题: 小明过生日的时候,爸爸送给他一副乌龟棋当作礼物.乌龟棋的棋盘是一行N 个格子,每个格子上一个分数(非负整数).棋盘第1格是唯一的起点,第N 格是终点, ...
- (转)8 Tactics to Combat Imbalanced Classes in Your Machine Learning Dataset
8 Tactics to Combat Imbalanced Classes in Your Machine Learning Dataset by Jason Brownlee on August ...
- POI读取excel
HSSF是Horrible Spread Sheet Format的缩写 读取2007版本前 XSSF是XML Spread Sheet Format的缩写 读取2007版本后(包含2007)
- vs2010 无法创建 *.edmx(Entity Frame Work) 文件的问题
当你安装了VS2010或者已经安装了EntityFramework41RC.exe之后发现依然在Add New Item时无法找到ADO.NET Entity Model,有可能是你创建的不是netf ...