OpenStack Load Balancer LBaaS

2023-05-16

Load-Balancer-as-a-Service(LbaaS)

TheLBaaS extension enables OpenStack tenants to load-balance their VMtraffic.

Theextension enables you to:

Load-balanceclient traffic from one network to application services, such as VMs,on the

sameor a different network.

Load-balanceseveral protocols, such as TCP and HTTP.

Monitorthe health of application services.

Supportsession persistence.


1Concepts

Touse OpenStack LBaaS APIs effectively, you should understand severalkey concepts:

Concepts

Description

LoadBalancer

Theprimary load-balancing configuration object. Specifies the virtualIP address where client traffic is received.

Aload balancer is a logical device. It is used to distributeworkloads between multiple back-end systems or services callednodes, basedon the criteria defined as part of its configuration.

VIP


AVIP is the primary load balancing configuration object thatspecifies the virtual IP address and port on which client trafficis received, as well as other details such as the load balancingmethod to be use, protocol, etc. This entity is sometimes known inLB products under the name of a "virtual server", a"vserver" or a "listener".

#!wikicaution

Note

Inthe tradional load balancing vernacular, the term 'VIP' is usedto denote the IP address to which clients connect. As it isdefined in thisdocument, this IP address is only one attribute of the VIPobject.


Avirtual IP is an Internet Protocol (IP) address configured on theload balancer for use by clients connecting to a service that isload balanced. Incoming connections and requests are distributedto back-end nodes based on the configuration of the load balancer.


ListenerRepresents a single listening port. Defines the protocol and canoptionally provide TLS termination.

Pool

Aload balancing pool is a logical set of devices, such as webservers, that you group together to receive and process traffic.The load balancing function chooses a member of the pool accordingto the configured load balancing method to handle the new requestsor connections received on the VIP address. There is only one poolfor a VIP.

PoolMember

Theapplication that runs on the back-end server.

Apool member represents the application running on back-end server.

HealthMonitoring

Ahealth monitor is used to determine whether or not back-endmembers of the VIP's pool are usable for processing a request. Apool can have several health monitors associated with it.

Thereare different types of health monitors supported by the OpenStackLBaaS service:

PING

usedto ping the members using ICMP.

TCP

usedto connect to the members using TCP.

HTTP

usedto send an HTTP request to the member.

HTTPS

usedto send a secure HTTP request to the member.

Whena pool has several monitors associated with it, each member of thepool is monitored by all these monitors. If any monitor declaresthe member as unhealthy, then the member status is changed toINACTIVE and the member won't participate in its pool's loadbalancing. In other words, ALL monitors must declare the member tobe healthy for it to stay ACTIVE.

SessionPersistence

Sessionpersistence is a feature of the load balancing service. Itattempts to force connections or requests in the same session tobe processed by the same member as long as it is active.

TheOpenStack LBaaS service supports three types of persistence:

SOURCE_IP

Withthis persistence mode,all connectionsoriginating from the same source IP address, will be handled bythe same member of the pool.

HTTP_COOKIE

Withthis persistence mode, the load balancing function will createa cookie on the first request from a client. Subsequentrequests containing the same cookie value will be handled bythe same member of the pool.

APP_COOKIE

Withthis persistence mode, the load balancing function will rely ona cookie established by the back-end application. All requestscarrying the same cookie value will be handled by the samemember of the pool.

LBaaSsupports session persistence by ensuring incoming requests arerouted to the same instance within a pool of multiple instances.

ConnectionLimits

Tocontrol incoming traffic on the VIP address as well as traffic foreach member of a pool, you can set a connection limit on the VIPor on the pool, beyond which the load balancing function willrefuse client requests or connections. This can be used to thwartDoS attacks and to allow each member of the pool to continue towork within its limits.


ForHTTP and HTTPS protocols, since several HTTP requests can bemultiplexed on the same TCP connection, the connection limit valueis interpreted as the maximum number of requests allowed.

Ingresstraffic can be shaped with connection limits. This feature allowsworkload control, and can also assist with mitigating DoS (Denialof Service) attacks.



2High-Level Task Flow

Thehigh-level task flow for using LBaaS API to configure load balancingis as follows:

?The tenant creates a Pool, which is initially empty

?The tenant creates one or several Members in the Pool

?The tenant create one or several Health Monitors

?The tenant associates the Health Monitors with the Pool

?The tenant finally creates a VIP with the Pool


Touse the LBaaS extension to configure load balancing

1.Create a pool, which is initially empty.

2.Create one or more members in the pool.

3.Create a health monitor.

4.Associate the health monitor with the pool.

5.Create a load balancer object.

6.Create a listener.

7.Associate the listener with the load balancer.

8.Associate the pool with the listener.

9.Optional. If you use HTTPS termination, complete these tasks:

a.Add the TLS certificate, key, and optional chain to Barbican.

b.Associate the Barbican container with the listener.

10.Optional. If you use layer-7 HTTP switching, complete these tasks:

a.Create any additional pools, members, and health monitors that areused as nondefault pools.

b.Create a layer-7 policy that associates the listener with thenon-default pool.

c.Create rules for the layer-7 policy that describe the logic thatselects the nondefault pool for servicing some requests.



概念

描述

VIP

可以把一个VIP看做是具有一个虚拟IP地址和指定端口的负载均衡器,当然还有其他的属性,比如均衡算法,协议等。

Pool

一个pool代表一组逻辑设备(通常是同质设备),比如web服务器。负载均衡算法会选择pool中的某一member接收进入系统的流量或连接。目前一个VIP对应一个Pool

Poolmember

后端服务器上运行的application

Healthmonitor

检测poolmember的状态。一个pool可对应多个healthmonitor

有四种类型:PINGTCPHTTPHTTPS。每种类型就是使用相应的协议对member进行检测。

SessionPersistence

也就是一般我们听到的“Session粘滞”,是规定session相同的连接或请求转发的行为。目前支持三种类型:
SOURCE_IP
:指从同一个IP发来的连接请求被某个member接收处理;
HTTP_COOKIE
:该模式下,loadbalancer为客户端的第一次连接生成cookie,后续携带该cookie的请求会被某个member处理
APP_COOKIE
:该模式下,依靠后端应用服务器生成的cookie决定被某个member处理

ConnectionLimits

这个特性主要用来抵御DoS攻击


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

https://www.ustack.com/blog/neutron_loadbalance/


Grizzly中的LoadBalancer初步分析

blog欢迎转发,但请保留原作者信息:
新浪微博:@孔令贤HW 
Blog
地址:http://blog.csdn.net/lynn_kong
内容系本人学习、研究和总结,如有雷同,实属荣幸!  

Grizzly版本中,Quantum组件引入了一个新的网络服务:LoadBalancerLBaaS),服务的架构遵从ServiceInsertion框架(也是G版引入)。LoadBalancer为租户提供到一组虚拟机的流量的负载均衡,类似于AmazonELB。昨天(2013.1.20Grizzly_2放出,实现10BP,修复82bug。大致过了下代码,目前我能识别到的更新如下:
1.
增加servicetype扩展(serviceinsertion实现的前提条件),表示一种网络服务类型(LBFWVPN等),为了向后兼容,载入时会创建默认的servicetype
2.
安全组功能从Nova移植到了Quantum
3.
增加portbinding扩展,给port增加了三个属性:binding:vif_typebinding:host_idbinding:profile(这个属性是Cisco专用)
4.Ryu
插件支持provider扩展
5.
增加loadbalancer扩展以实现负载均衡功能
6.
新增一个Quantum插件(BigSwitch

1.      基本流程

租户创建一个pool,初始时的member个数为0
租户在该pool内创建一个或多个member
租户创建一个或多个healthmonitor
租户将healthmonitorspool关联
租户使用pool创建vip

2.      概念

l  VIP
可以把一个VIP看做是具有一个虚拟IP地址和指定端口的负载均衡器,当然还有其他的属性,比如均衡算法,协议等。

l  Pool
一个pool代表一组逻辑设备(通常是同质设备),比如web服务器。负载均衡算法会选择pool中的某一member接收进入系统的流量或连接。目前一个VIP对应一个Pool

l  Poolmember
代表了后端的一个应用服务器。

l  Healthmonitor
一个healthmonitor用来检测poolmember的状态。一个pool可对应多个healthmonitor。有四种类型:
PING
TCPHTTPHTTPS。每种类型就是使用相应的协议对member进行检测。

l  SessionPersistence
也就是一般我们听到的“Session粘滞”,是规定session相同的连接或请求转发的行为。目前支持三种类型:
SOURCE_IP
:指从同一个IP发来的连接请求被某个member接收处理;
HTTP_COOKIE
:该模式下,loadbalancer为客户端的第一次连接生成cookie,后续携带该cookie的请求会被某个member处理
APP_COOKIE
:该模式下,依靠后端应用服务器生成的cookie决定被某个member处理

l  ConnectionLimits
这个特性主要用来抵御DoS攻击

对象关系模型:

 

3.      架构图


 
截止到2013.1.22号,Grizzly_2版本仅实现了LBaaSPlugin部分,LBaaSAgentScheduler/DeviceManagement正在开发。
如上图,可见LBaaSQuantumPlugin的架构基本一致,将上层的逻辑概念与底层的实现分离。主要模块如下:
1.LBaaS Quantum Extension
:处理RESTAPI调用
2.LBaaS Quantum AdvSvcPlugin
:核心Plugin之一。QuantumFolsom版本仅支持一个Plugin,但在实现了ServiceInsertion之后可以运行多个服务的不同Plugin共存。
3.LBaaS Agent
:同QuantumAgent一样,是部署在各个计算节点的独立进程
4.Driver
:与实际的设备打交道,实现逻辑模型

4.      Scheduler/DeviceManagement

Scheduler/DeviceManagement是一个单独的Quantum组件,其功能主要有两个方面:
1. 
实现服务的逻辑模型
2. 
为了实现高级服务(AdvancedService),比如loadbalancers, firewalls, vpngateways等而提供面向租户的扩展API

以创建Pool为例,流程图如下:

LBaaSPlugin
收到创建pool的请求;
LBaaSPlugin
DB中新增记录,返回pool_id
LBaaSPlugin
调用Scheduler,传递service_type,pool_id,pool等参数;
Scheduler
选择满足条件的device,保存devicepool的映射,将device_info返回;
Agent
调用DriverDriverdevice接入租户网络,实现逻辑模型;
Agent
LBaaS通知,更新PoolDB中的状态;

本博客欢迎转发,但请保留原作者(@孔令贤HW)信息!内容系本人学习、研究和总结,如有雷同,实属荣幸!

实例参考:http://blog.csdn.net/zhaihaifei/article/details/74732547

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

OpenStack Load Balancer LBaaS 的相关文章

  • .NET 可以加载和解析与 Java Properties 类等效的属性文件吗?

    C 中是否有一种简单的方法来读取属性文件 该文件的每个属性都位于单独的行上 后跟等号和值 如下所示 ServerName prod srv1 Port 8888 CustomProperty Any value 在 Java 中 Prope
  • 将页面加载设置为黑色而不是白色背景?

    网站链接 http www ideagang co home php http www ideagang co home php 从一页点击到另一页时是否可以将背景设置为黑色 现在 网站以黑色背景完美加载 只是当我从一个页面导航到另一个页面
  • 调用另一个 lisp 文件中的函数

    我必须用 Lisp 写一个游戏 为了清楚起见 我想将代码拆分到不同的 lisp 文件中 如何从另一个文件中的函数中调用函数 例如 file1 lisp 有一个名为 function1 的函数 file2 lisp 有一个名为 functio
  • 为什么 addEventListener 加载会阻止代码工作?

    Update 我原本有 document addEventListener DOMContentLoaded and链接到 HTML 文档头部的 JS 文件 结果是 另一个 js 脚本的某些部分无法正常工作 然后我将 DOMContentL
  • 如何在 jQuery .load() 之后更新 DOM?

    我想从模板文件 b xhtml 加载html内容 将其插入调用文件 a xhtml 然后更新插入的节点 例如添加 删除属性等 插入部分工作正常 但 DOM 似乎没有更新 这是测试用例 a xhtml 调用的html文件
  • 如何使用 bash 命令创建 CPU 峰值

    我想在 Linux 机器上创建接近 100 的负载 它是四核系统 我希望所有核心都全速运行 理想情况下 CPU 负载将持续指定的时间 然后停止 我希望 bash 有一些技巧 我在想某种无限循环 I use stress http linux
  • 在加载时应用选择背景颜色?

    请查看以下链接以查看我的代码的运行情况 http codepen io DigitalSquid pen mAkuC http codepen io DigitalSquid pen mAkuC 如何使背景颜色出现在页面加载时 on win
  • WPF负载控制问题

    我正在 WPF 中做一些事情 我有一个ComboBox与许多Types 选择具体类型后 我希望能够加载特定的用户控件 有许多文本框等 尊重我的 WPF 窗口上定义区域的类型 怎么做 有没有类似的东西LoadControl 并将其加载到Pla
  • Lua 中的“加载”有什么作用?

    我试图解决我的理解问题loadLua 脚本中的函数 但没有该命令的任何示例或指南 它在他自己的 Lua 网站上讲述https www lua org manual 5 2 manual html pdf load https www lua
  • Powershell v4 不自动导入模块

    我在用Microsoft PowerShell v4 PS C gt get host Name ConsoleHost Version 4 0 InstanceId 3b4b6b8d 70ec 46dd 942a bfecf5fb6f31
  • 如果 $(window).load() 已弃用,我应该使用什么?

    我需要一个在页面完全加载 文本 图像等 时调用的函数 我注意到 window load 现已弃用 那么 我应该使用什么 如果你想避免load函数 使用泛型on功能 window on load function insert code he
  • Jquery应用css加载div

    我在使用 css 将 css 动态应用到加载的 div 时遇到问题load 功能 找到正在加载的 html 并将其插入 我可以使用关闭命令 但是我尝试应用的 CSS 没有被注册 除去动态 CSS 之外 一切似乎都工作正常 我想我这里可能有问
  • Java:加载重构后保存在硬盘上的对象=>“找不到类”异常:/

    我正在用java开发一个应用程序 它使用这个简单的方法定期将对象保存到硬盘上 public void save String filename try FileOutputStream fos new FileOutputStream fi
  • 使用 eval 加载模块

    我在 Perl 和内置函数方面遇到了一些麻烦eval http perldoc perl org functions eval html 我浏览了网络 但找不到任何答案或示例代码 我想动态加载模块 在执行时间之前我不知道它们 module
  • 在后台从 url 加载一个大 plist

    我从 url 加载一个大的 plist 文件 我必须等待几秒钟才能使用该应用程序 有什么解决办法吗 如何在后台加载它 是GCD我需要的 如何实施 My code NSString urlStr NSString alloc initWith
  • 安装 openstack 时发生错误:./stack.sh:137:die

    我尝试使用以下命令通过 devstack 安装 openstack git 克隆https github com openstack dev devstack git https github com openstack dev devst
  • 如何使用 cloud-init 安装 docker?

    我想在 Openstack 中创建实例 在通过 ssh 连接之前 这些实例中已经安装了 Docker 所以我很自然地对 Cloud init 技术感兴趣 因为它允许我们在第一次启动时在虚拟机上安装软件包 所以现在我尝试在启动时在我的实例上安
  • 将网站加载到 DIV 中

    当我在文本框中写入 URL 然后单击提交按钮时 如何实际从网站检索数据 我希望将数据放入我拥有的 div 中 这可能吗 我已经尝试过这个 但它不起作用
  • jquery mobile loadPage 不工作

    好吧 我做了这个question https stackoverflow com questions 13404462 mobile changepage instead of ajax几天前就填了 但不知道我是否清楚 所以 我现在使用另一
  • 如何保存 UIButton 的属性并使用按钮加载? [复制]

    这个问题在这里已经有答案了 可能的重复 如何在应用程序中保存和加载 UIButton 的 alpha 值 https stackoverflow com questions 7336594 how can i save and load t

随机推荐

  • Tesseract OCR数码管数字的样本训练

    Tesseract默认情况下基本无法对LED数码管显示屏进行识别 但由于Tesseract具有样本机器学习训练的能力 xff0c 因此可利用该技术实现Tesseract对LED数码管的OCR识别 xff0c 这需要对图片进行预处理 一 图像
  • MYSQL基础之 视图

    概念 什么是视图 xff1f 视图是基于 SQL 语句的结果集的可视化的表 当然视图也是数据库中对象之一 xff0c 其它的对象包括 xff1a 表 xff0c 数据字典 xff0c 约束 索引 xff0c 触发器 xff0c 存储过程 x
  • shareSDK配置以及遇到的问题

    首先需要从cocoa pods导入 pod 39 ShareSDK3 39 pod 39 MOBFoundation 39 pod 39 ShareSDK3 ShareSDKUI 39 pod 39 ShareSDK3 ShareSDKPl
  • Uncaught TypeError: XXX is not a function解决

    后台没有错误 xff0c 前端一直显示 Uncaught TypeError withdraw is not a function 错误 xff0c 代码如下 xff1a lt span class hljs keyword div spa
  • 第9章 舵机控制

    有一种电机可以在程序的控制下 xff0c 在一定范围内连续改变输出轴角度 并且可以保持住 这种电机最早被用在航模和船模等遥控模型中 xff0c 控制各种舵面的转动 xff0c 这就是舵机 现在舵机除了运用在 遥控模型中 xff0c 也大量的
  • apt-get update GPG 错误:由于没有公钥,无法验证下列签名(两种解决办法)

    在添加aliyun的源之后update出现GPG错误 xff0c 找到两个解决办法 span class hljs variable sudo span apt span class hljs attribute get span upda
  • GD32F305单片机MDK烧写程序后不运行解决办法

    1 可能原因 程序编译后size大于或者接近MCU内部flash空间 xff0c 因为某种原因编译器没有报错 xff0c 程序恰好还能烧写进MCU xff0c 但是运行出错 2 解决办法 一 优化代码大小 xff0c 减小占用flash的大
  • 三、Qt下Dbus环境配置(windows)

    文章目录 windows环境配置1 下载2 如何使用 xff1f 3 测试 D Bus最主要的用途是在Linux桌面环境为进程提供通信 xff0c 同时能将Linux桌面环境和Linux内核事件作为消息传递到进程 DBUS是一种很方便的IP
  • ./configure 的用法

    亲身实验的configure用法 xff0c 如果对你有帮助的请点赞 关注和收藏三联哦 xff01 1 当交叉编译给ARM平台的库时 当编译器是arm linux gnueabihf时 xff0c host为编译器前两个词arm linux
  • LInux下的网络ioctl使用

    最近需要修改Linux下的网络参数 xff0c 遂将Linux下用于控制网路参数的 ioctl常用函数记录一下 xff0c 使用的时候注意使包裹对应的头文件 xff0c 其中sockios h文件包含所有的操作命令字 xff0c inclu
  • 如何获得memcpy的最佳效率

    当进行内存拷贝的时候 xff0c 我们一般都会使用memcpy函数 xff0c 尽管该函数经过不断的优化 xff0c 但是有时候我们会发现直接使用该函数的效率并不是最高的 下面以图片复制来进行效率测试 xff0c 图片共有5种分辨率 xff
  • codeblocks如何在打开多个工程下运行指定工程的main

    在使用codeblocks时 xff0c 有时候会遇到打开多个工程的main cpp后 xff0c codeblocks会默认使用后打开的工程 xff0c 无论是编译还是运行 那么就需要激活我们需要运行的工程 一开始打开一个工程是这样的 接
  • Ubuntu下的网络发包和抓包工具

    将最近在网络开发中用到的一些发包和抓包工具使用方法总结如下 xff0c 作者总结不易 xff0c 对你有帮助的请点赞 关注和收藏三联哦 xff01 1 packEth发包工具的使用方法 a 安装方法 sudo apt get install
  • 线匹配之LBD

    参考链接 xff1a 1 线特征 LineMatching代码运行 xff08 五 xff09
  • Mac电脑机器视觉开发环境配置

    1 Qt的安装 Qt的安装与win和ubuntu的安装大同小异 xff0c 都是下载安装包 xff0c 然后安装就可以了 xff0c 这个过程中可能会提示安装XCode xff0c 直接同意就可以了 之后的启动和运行类似于ubuntu xf
  • 程序运行时间的统计方法

    Windows和Linux下的运行时间统计方法有这一篇就够了 xff0c 如果对你有帮助 xff0c 记得点赞收藏哦 xff01 if cplusplus lt 201103L check c 43 43 11支持 ifndef WIN32
  • Qt正则表达式的常用类型

    要求输出全部为数字 d 要求输出全部为字母 a zA Z 要求输出结果前六位的数字 d 6 要求输出指定位置的结果 xff0c 如第7位和第10位 6 w 2 w 要求输出字符结果长度为6 10的结果 a zA Z0 9 6 10 可参考链
  • Halcon表面检测例程解析

    1 表面划伤检测 例程 xff1a suface scratch dev 描述 xff1a Detect scratches on a surface via local thresholding and morphology 通过使用局部
  • [C/C++/C#] error MSB8020: 无法找到 v142 的生成工具(平台工具集 =“v142”)。若要使用 v142 生成工具进行生成,请安装 v142 生成工具

    error MSB8020 无法找到 v142 的生成工具 平台工具集 61 v142 若要使用 v142 生成工具进行生成 xff0c 请安装 v142 生成工具 问题的原因 是由于没有安装v142工具集 xff0c 其实v142对应的是
  • OpenStack Load Balancer LBaaS

    Load Balancer as a Service LbaaS TheLBaaS extension enables OpenStack tenants to load balance their VMtraffic Theextensi