ArrayAPV配置操作手册SLB功能配置_第1页
ArrayAPV配置操作手册SLB功能配置_第2页
ArrayAPV配置操作手册SLB功能配置_第3页
ArrayAPV配置操作手册SLB功能配置_第4页
ArrayAPV配置操作手册SLB功能配置_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ArrayAPV配置操作

手册SLB功能配置

文档仅供参考

ArrayAPV工程安装配置手册

服务器负载均衡功能配置

一、ArrayAPV服务器负载均衡架构介绍

ArrayAPV的服务器负载均衡功能由三部分组成,经过策略和

算法的应用将此三部分结合为统一的整理,从而实现服务器负载

均衡功能。

第一部分:RealSerivce

RealService是提供服务的服务器的IP地址和端口的集合。

RealService(“Real”)ArrayNetworks*

'TheApplicationNetwodungCocnpan

,Representsaphysicalsenicewhich

Internet

willhandleclientrequests

,RealSenice=RealSenerIP:Port

在进行APV服务器负载均衡功能实现时,首先需要定义Real

Serviceo在定义RealService的同时,不但需要指定后台提供服务

文档仅供参考

的服务器的IP地址和端口,还能够个性化的指定每个Real

Service能够处理的并发连接数、对RealService进行的健康检查

方式等。

第二部分:RealSerivceGroup(Group)

RealService组是提供相同服务的RealService的集合。同一台

服务器,由于其可能同时提供多个服务,能够同时属于多个Real

ServiceGroupo

RealServiceGroup("Group")ArrayNetworks*

/TheApplicationNetworkinQCompdny

,Representsagroupofrealseniceswhich

trafficwillbedistributedto

•Defineswhichloadbalancingalgorithmtouse

FTPGroupHTTPCroup

在创立Group的同时,就需要定义Group中的RealService处

理用户访问请求的方式(Method),且能够经过加权的方式来分担

不同比重的负载到相应的RealServiceJLo

第三部分:VirtualService(Virtual)

VirtualService是对外提供服务的IP地址和端口的集合。用户

经过向VirtualService发起访问就能够实现所需功能。

文档仅供参考

VirtualService(“Virtual”)ArrayNetworks"

/TheApplobonNetworkingCompany

同一个VirtualIP地址能够属于不同的VirtualServiceo

经过RealService、RealServiceGroup和VirtualService的定

义,和Policy(策略)、Method(算法)的应用,能够方便的实现服务

器负载均衡功能。

SLBTerminologyArrayNetworks*

,TheApplicationNetworkingCompany

,RealSenice(“Real”)

-RepresentsaphysicalseniceInternet

whichwillhandleclientrequests

,RealSeniceGroup("Group”)

-Representsagroupofrealsenices

whichtrafficwillbedistributedtoVirtual1Virtual2

-Defineswhichloadbalancing

algorithmtousePoHcy•

,VirtualService("Virtual”)

-RepresentsavirtualsenicethatGroup1Group2

clientscanconnectto

Method

・SLBMethod("Policy”)

-AssociatesrealsenicegroupswithReadReal2Real3Real4Real5

virtualsenicesL工

service1service2service3service4seMoe5

文档仅供参考

其中Policy用来定义Virlual和Group之间的关系,Method

用来定义Real和Group之间的关系。

二、ArrayAPV服务器负载均衡功能配置

无论是串连连接方式还是旁路连接方式,服务器负载均衡功能

配置方式相同,唯一需要注意的是工作模式。ArrayAPV的服务

器负载均衡功能有两种工作模式,反向代理模式和透明模式(具

体说明见网络架构设计书)。

当选择应用串连连接方式时,某些较特殊的应用需要Real

Service能够得知客户端真实IP地址,需要使用透明模式

(transparentmode)。

系统默认工作模式为反向代理模式(reversemode)o

如需更改为透明模式,命令为:

AN(config)#systemmodetransparent

如需更改到反向代理模式,命令为:

AN(config)#systemmodereverse

查看当前系统运行模式,命令为:

AN(config)#systemmodereverse

在一般情况下,使用默认Reverse模式即可,特别在旁路连接

方式下,建议应用Reverse模式。

现以旁路接入方式(Reverse模式)为例讲解服务器负载均衡

的配置方式,下图为旁路接入方式拓扑结构图。

文档仅供参考

图中显示有4台Http服务器,分别为Appl,App2,App3和

App4o

假定4台服务器的IP地址和提供服务的端口如下表所示:

ApplApp2App3App4

IP地址10.1.1.1110.1.1.1210.1.1.1310.1.1.14

SerivePort80700800900

假定经过APV对这4台服务器实现负载均衡功能,对外提

供服务的1P地址和端口(VirtualService)为00,80端

口。

现以以上假定为例,进行配置说明。

配置服务器负载均衡功能总共分为以下4个步骤:

步骤一、定义RealService

步骤二、定义RealServiceGroup,并将RealService添加到

Group中

步骤三、定义VirtualService

步骤四、定义Policy,并经过policy将VirtualService和

文档仅供参考

Group绑定。

下面分别详细说明各个步骤的具体配置命令,其中应用的算法

为最小相应时间基础上的会话保持算法,会话保持算法的session

timeoute时间设置为1分钟。

注:所有设备配置命令,均需现登陆到配置模式下才能够执行。

配置符号说明:

<>符号表示是必须配置部分,否则配置提示襦年-

口符号表示是可选配置部分,如没有配置则使用默认值。

步骤一、定义RealService

命令:

sibreal〈protocol)<real_name><real_ip>[real_port][max_conn]

[hc_type][hc_up][hc_down][timeout]

protocol服务器提供服务的协议:dns,ftp,http,https,tcp,tcps,or

udp

real_nameRealservice的名称标注,可随意制定,但不可重名

rcal_ip服务器的IP地址

rcal_port服务器提供服务的端口(Http协议默认端口为80)

maxconn并发最大连接数,默认为1000。既每台服务器只允许并发处理1000

个连接

hc_type所应用的健康检查类型:tcp,http,icmp,dns,oroff

文档仅供参考

(可选配置,对http应用默认为tcp协议).

hc_up连续健康检查几次都经过才认为服务是健康的,默认为1

hc_down连续健康检查几次都没有经过才认为服务是不健康的,默认为1

timeout对UDP服务的timeout时间设置,默认为服秒

配置实例:创立4个RealService,命令如下。

AN(config)#slbrealhttpR_11

AN(config)#slbrealhttpR_210.1.1.12700

AN(config)#slbrealhttpR_33800

AN(config)#slbrealhttpR_44900

AN(config)#

查看命令:

AN(config)#showsiball

sibrealhttp"R_l"1801000tcp11

sibrealhttp"R_2”27001000tcp11

sibrealhttp"R_3”10.1.1.138001000tcp11

sibrealhttp"R_4”49001000tcp11

AN(config)#

需要注意的几个方面:

•一般情况下,需要注意的是对max_conn(最大并发连接数)

的调整和健康检查方式的调整。

max_conn表示每个RealService最大并发处理的

connection数,默认为1000,此设置目的是为了对Real

Service进行过载保护,有时需要对此数值进行调整。

•如需要对Http服务器在实现服务器负载均衡的基础上,实现

其它性能增强功能如(Cache功能,Http压缩功能,SSL加速功

能)则必须将RealService的协议定义为Http协议。

文档仅供参考

•VirtualService使用的协议必须和RealService使用的协议一

致。例如,VirtualService应用的是Http协议,则RealService

也必须应用Http协议。

步骤二、定义Group,并将RealService添加到Group中

配置命令:定义group,同时指定算法

sibgroupmethod<group_naine>[method[other_parms]]

groupname组名,能够随意定义,但不能够与其它组重名

method负载均衡算法,用来指定在同一组中的RealService的工作方

式。包括:rr(roundrobin),pc(persistentcookie),pi

(persistentIP),hi(hashIP),chi(consistenthash

IP),he(hashcookie),ph(persistenthostname),pu

(persistentURL),ic(insertcookie*),rc(rewrite

cookie*),1c(leastconnections*),hh(hashheader*),

sslsid(SSLsessionTD)

other_parms在method的基础上的扩展选项。

如选择method为基于原IP地址的保持性算法(PI),则同

时能够指定第一个数据包的负载分担方式为sr(最短相应时

间)。

则配置命令为:Sibgroupmethodggpi32si

配置命令:定义groupmember,将RealService力口入至Group

sibgroupmember<group_name><real_name>[<weight>

<param_string>]

文档仅供参考

groupname将RealService加入到group的groupname

realnameRealservice的名称

Weight权重,当method是rr,pi,ph,hh,he,ic,rc,orsslsid时

有效,默认为lo

paramstringCookie值,当method为pc.

URL值,当method为pu.

配置实例:创立一个组,组名为gg,将前面创立的4个real

Service添加到这个组中。

选用的算法为基于原IP的保持性算法,同时指定客户端发起

首次请求时采用服务器最小响应时间的算法。

Method为PI32sr

命令如下:

AN(config)#slbgroupmethodggpi32sr

AN(config)#slbgroupmemberggR_1

AN(config)#slbgroupmemberggR_2

AN(config)#slbgroupmemberggR_3

AN(config)#slbgroupmemberggR_4

查看命令:

AN(config)#showrun"sibgroup”

#slbconfiguration

sibgroupmethodggpi32sr

sibgroupmembergg1

sibgroupmembergg“R_2"1

sibgroupmembergg"R_3"1

文档仅供参考

sibgroupmember"gg'"R_4"1

如需要配置基于原IP地址的保持性算法的会话timeout时间。

命令为:

sibpersistencetimeout<时间)

:其中<时间>单位为分钟,是从1一50000的整数,

配置实例:设置sessiontimeout为1分钟

AN(config)#slbpersistencetimeout1

步骤三、定义VirtualService

配置命令:定义VirtualService,

sibvirtual<protocol><virtual_name><virtual_ip><virtual_port>

protocol应用协议类型:dns,ftp,http,https,tcp,tcps,orudp

virtualnameVirtualService的名称,不能与其它VirtualServer相同

virtual_ip对外提供服务的IP地址

virtual_portTCP/UDP对外提供服务的端口(如HTTP协议,则默认为80).

配置实例:

定义对外提供服务的协议为HTTP协议,IP地址为

00,端口为80端口。

命令如下:

AN(config)#slbvirtualhttpVip10.L1.100

查看命令:

AN(config)#showrun“sibvirtual*

文档仅供参考

#slbconfiguration

sibvirtualhttp"Vip”0080

步骤四、定义Policy,并将VirtualService和Group绑定

配置命令:

sibpolicy<policy_type><virtual_name><grouporrealname>

<param_args*><precedence>

Policy_type策略类型:default,backup,persistentcookie,

persistenturl,qoscookie,qoshostname,qosnetwork,

qosjrl,icookie,rcookie,regex,header,orstatic.

virtual_name某些Policy需要指定

realorgroupGroup名称,或者RealService名称

param_args附力口参数:persistentcookie(cookiename),persistent

url(urlname),qoscookie(cookiename=value),qos

hostname(hostname),qosurl(url),qosnetwork

(network,netmask),regex(regexpattern),header

(headername,headerpattern).

precedenceTheprecedenceofthispolicy;policiesarecheckedin

orderofincreasingprecedence.

一般情况下,仅使用default策略,结合method的应用就

能够满足需求。|

配置实例:

定义对外提供服务的协议为HTTP协议,IP地址为

00,端口为80端口,并将此VirtualServer和gg组进行绑

文档仅供参考

定。

命令如下:

AN(config)#slbpolicydefaultVipgg

查看命令:

AAN(config)#showrun"sibpolicy”

#slbconfiguration

sibpolicydefault"Vip""gg"

至此,针对4台HTTP服务器的服务器负载均衡功能配置完

毕。经过查看命令可显示所有服务器负载均衡配置:

AN(config)#showsiball

sibrealhttp〃R」〃10.1.1.11801000tcp11

sibrealhttp"R2”10.1.1.127001000tcp11

sibrealhttp〃R_3”10.1.1.138001000tcp11

sibrealhttp"R_4”10.1.1.149001000tcp11

〃〃•on

sibgroupmethodggpi32sr

sibgroupmemberggR」1

sibgroupmemberggR_2l

sibgroupmemberggR_31

sibgroupmemberggR_41

sibvirtualhttp“Vip”10.1.1.10080

#defaultpolicyorder:

#qos-clientport1

#qos-network2

#pu3

rc4

#ic5

pc6

#qos-cookie7

#qos-hostnamc8

#qos-url9

#regex10

#header11

sibpolicydefault"Vip""gg"

sibpersistencetimeout1

文档仅供参考

绝大多数情况下,如应用需求和此需求相同,在原有配置示

例的基础上能够直接更改RealService的IP地址和VirtualService

的IP地址,进行复制粘贴配置,即可。

三、ArrayAPV服务器负载均衡功能维护

1、RealService管理维护

在对应用实现服务器负载均衡功能时,一般会需要对Real

Service进行管理和维护,此时能够经过APV提供的停止某个

RealService的服务的方式来实现。APV在中止RealService的过

程中,不将新的访问请求分发到这台RealService上,仅允许Real

Service处理已经接收的访问请求,直至所有请求处理完毕。

中止服务命令:

sibrealdisable<real_name>

启动服务命令:

sibrealenable<real_naine>

确认RealService的服务状态命令:

Showsibrealall

AN(config)#slbrealdisabRI

AN(config)#showsibrealall

sibrealhttp〃R_1〃10.1.1.11801000tcp11

sibrealdisable〃R__r

sibrealhttp〃R_2〃10.1.1.127001000tcp11

sibrealhttp〃R_3〃10.1.1.138001000tcp11

sibrealhttp〃R4〃10.1.1.149001000tcp11

文档仅供参考

2、VirtualService管理维护

中止服务命令:

Sibvirtualdisable<virtual_name>

启动服务命令:

Sibvirtualenable<virtual_name>

确认RealService的服务状态命令:

showsibvirtualall

AN(config)#slbvirtualdisableVip

AN(config)#showsibvirtualall

sibvirtualhttp"Vip"10.1.1.10080

sibvirtualdisable〃Vip〃

3、服务器负载均衡功能状态查看

查看所有服务器负载均衡功能配置命令:

命令:Showsiball

查看当前服务器负载均衡功能运行详细状态命令:

|命令:Showstatisiball

示例:

RealserviceR1180UPACTIVE

Mainhealthcheck:10.1.1.1180tepUP

ConnectionCount:38

OutstandingRequestCount:12

TotalHits:1120

AverageResponsetime:0.010ms

RealserviceR_210.1.1.12700UPACTIVE

Mainhealthcheck:10.1.1.12700tepUP

ConnectionCount:100

OutstandingRequestCount:80

TotalHits:1230

AverageResponsetime:0.010ms

文档仅供参考

RealserviceR310.1.1.13800UPACTIVE

Mainhealthcheck:3800tcpUP

ConnectionCount:11

OutstandingRequestCount:2

TotalHits:1210

AverageResponsetime:0.010ms

RealserviceR_410.1.1.14900DOWNINACTIVE

Mainhealthchock:01.1.1.14900tcpDOWN

ConnectionCount:0

OutstandingRequestCount:0

TotalHits:1230

AverageResponsetime:0.010ms

GroupNameMethodHits

ggpi3560

httpvirtualservice“Vip〃(10.1.1.100:80)

qusclientporthiIs:0

qosnetworkhits:0

persistenturlhits:0

rcookiehits:0

icookiehits:0

persistentcookiehits:0

qoscookiehits:0

qoshostnamehits:0

qosurlhits:0

regexhits:0

headerhits:0

redirecthits:0

defaulthits:3560

statichits:0

backuphits:0

cachehits:0

defaultpolicyforhttpvirtualservice〃Vip〃hasbeenmatched

3560times

从中能够看到每个RealService当前的状态(UPorDOWN),

每个realservice总共处理的访问请求数(TolalHits:),当前正在处理

的情况(ConnectionCount:、OutstandingRequestCount:),健康

检查类型等信息。

文档仅供参考

四、ArrayAPV服务器负载均衡健康检查功能

在实现服务器负载均衡功能中,APV提供以下健康检查方

式:

•ICMP:

经过ping提供服务的IP来进行确认

・TCP:

经过与RealService进行TCP握手进行确认

•DNS:

经过发送DNS请求的方式进行确认

•HTTP:

经过发起标准HTTPGET请求方式进行确认

默认请求内容为:“HEAD/HTTP/1.0\r\n\r\n”.

默认比对响应内容为:“200OK”

・个性化HTTP:

经过预定制的Request和Response,经过检查比对进行

确认

个性化定制HTTP健康检查,包括定制Request和Response0

HttpRequest定制命令:

healthrequest<request_index><request_string>

HttpResponse定制命令:

healthresponse<response_index><response_string>

文档仅供参考

定制完成Request和Response后,将定制的内容与RealService绑

定:

healthserver<real_name><request_index><response_index>

request_indexRequesttableentrynumber(valuebetween0and999)

tostoretherequeststringin.

request_stringStringtouseintheHTTPrequestsenttothereal

service.

response_indexResponsetableentrynumber(valuebetween0and999)

tostoretheresponsestringin.

response_stringStringtosearchforintheHTTPresponsesentfrom

therealservice.

real_nameRealservicenametobindarequest/responsehealth

checkto.

示例:

假设需要经过定制HTTP健康检查方式,仅当检查到Real

ServiceHttp根目录下具有health.html文件时,才认为这个Real

Service能够正常提供服务。否则认为此RealService不能提供服

务。

首先,配置或修改健康检查方式为HTTP:

sibrealhttp〃R_1〃1801000http11

sibrealhttp〃R_2〃10.1.1.127001000http11

sibrealhttp〃R_3〃10.1.1.138001000http11

sibrealhttp〃R_4〃10.1.1.149001000http11

文档仅供参考

然后定制健康检查Request和Response:

AN(config)#healthrequest2"GET/health,htmlHTTP/1.0\r\n\r\n,,

AN(config)#healthresponse5"200OK”

:其中,requestnumber=2,表示一种定制的request方式,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论