radware负载均衡管理进阶篇

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Page 10
Cookies 举例 (Cont.)
Intern et
• 3.用户的后续请求--- 用户的浏览器将在数据包中添加
www.radware.co m
Cookie
GET /styles/radware_main.css HTTP/1.1 Accept: */* Referer: http://65.217.163.224/ Accept-Language: en,zh-cn;q=0.7,zh-tw;q=0.3 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Host: 65.217.163.224 Connection: Keep-Alive
AppDirector 培训 第六部分:负载均衡进阶-Session ID对话保持
Page 1
L7 (Session ID)对话保持
开始配置 Yes
是否需要ClientNAT
配置ClientNAT
NO
基 本 配 置
添加Farm 配置高级健康检查
是否需要L7对话保持
Yes
配置L7对话保持
NO 添加Sever Yes
• Set-Cookie:NAME=VALUE;expires=DATE;path=PATH;
domain=DOMAIN_NAME
–Cookies
have size limitations
• Up to 300 cookies per client from all sources • Size of each cookie can be up to 4K
Page 4
L7 (Session ID)对话保持
• Session ID的会话保持可以在以下场景使用 HTTP 或HTTP-like (具有HTTP-like header) TCP protocols UDP protocols 普通的IP traffic (using pattern match) • 由于存在不同的Client会使用相同的Session ID场景,因此,
Cookie: campaign=ref=NotPPC; radware=232548618; ASPSESSIONIDCQBDDCDB=KAJGMNNAKHCFNAFNGPAKDGBL
Page 11
简便的Cookie插入
• 1. AD自动在服务器的响应中插入Cookie • 2. 用户的后续访问将携带该Cookie
Page 16
实验六:配置和观察2
Biblioteka Baidu
• Farm Nam:Farm3
• Persistency Identifier:
Host • Look Mode: Header • Learning Direction: Client Request
Page 17
实验六:配置和观察2
• 修改客户端得host文件,键入记录 – 192.168.2.X5 www.test.com
Text Match Session ID Persistency: 该方式下,AD对数据包中的任
意位置进行所定义text字串的搜寻; Pattern Match Session ID Persistency: AD 对数据包进行二进制格 式的session ID搜寻;二进制session ID通过pattern方式定义,也就 是OMPC方式;在该方式下,AD只能匹配数据包中的特定位置的 session ID。
• 20 cookies per server or domain per session
Page 8
Cookies 举例
Intern et
www.radware.co m
• 1. 用户请求--- 第一个请求 , 无Cookie
GET / HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en,zh-cn;q=0.7,zh-tw;q=0.3 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Host: 65.217.163.224 Connection: Keep-Alive
WEB 1 WEB 2
Web1
Web2
www.site.com www.site.com
Page 12
Farm扩展参数- Cookie插入
• AppDirector > Farm >Extended Parameters.
• Insert Cookie for
HTTP Persistency:源 选择Enable,可由AD 自动插入Cookie,实现 HTTP应用的对话保持
Page 9
Cookies 举例 (Cont.)
Intern et
www.radware.co m
• 2.服务器响应— 服务器向HTTP头中加入Cookies
HTTP/1.1 200 OK Transfer-Encoding: chunked Server: Microsoft-IIS/5.0 Date: Sat, 28 Oct 2006 03:15:23 GMT --------------: ----Content-Type: text/html Set-Cookie: campaign=ref=NotPPC; expires=Mon, 27-Nov-2006 04:15:22 GMT; path=/ Set-Cookie: radware=232548618; expires=Mon, 27-Nov-2006 04:15:22 GMT; path=/ Set-Cookie: ASPSESSIONIDCQBDDCDB=KAJGMNNAKHCFNAFNGPAKDGBL; path=/ Cache-control: private
• AppDirector > L7 Server Selection >Text Match >Create
• Farm Nam:Farm名称
• Persistency Identifier:
Session ID的标示符 • Look Mode: 查找 Session ID的位置 • Learning Direction: Server Reply或Client Request
10.1.1.41/24
10.1.1.51/24 192.168.2.61/24 192.168.2.51/24 192.168.2.41/24
10.1.1.61/24
Page 15
实验六:配置和观察1
• 使用浏览器访问VIP,并观察数据包中是否有Cookie
• Farm3中设定Cookie 插入 • 再次使用浏览器访问VIP,并观察数据包中是否有Cookie
是否需要L7策略
增 强 配 置
配置L7策略
NO 添加L4策略
Page 2
使用L7 (Session ID)对话保持的环境
• L4的Client Table不能实现对话保持:
– 大量用户在防火墙或Proxy后,因此需要ServerPerSessioin的
Client Table; – 每个用户的一次交易内包换多个TCP连接,即存在不同的源端 口 – 在用户的一个完整交易内,用户的IP发生变化
AD在Track session ID的同时,还会Track 数据包的Source IP • 通常情况下,AD都是采用动态方式学习Session ID;AD还 支持静态Session ID,在该方式下,用户直接指定特定的 session ID应该到达那台server。
Page 5
Text Match Session ID Persistency
式(类似掩码) • Offset Relative to: 开始计算Offset的数据 包位置 • Learning Direction: Server Reply或Client Request
Page 7
HTTP Cookies
–A
cookie is a small piece of information that is sent by a web server and stored on a web client browser so it can later be read back from that client. –Cookie information can be used to associate session state information with a specific user. –Cookies are transmitted in the HTTP header from the server in the form:
Page 13
• 实验六
Page 14
实验六:拓扑
10.1.1.11/24
192.168.2.11/24
192.168.2.21/24
192.168.2.31/24
10.1.1.21/24
10.1.1.31/24
10.1.1.254/24
192.168.2.254/24
192.168.2.101 192.168.2.102
• 使用浏览器访问域名www.test.com • 在CLI模式下,通过以下命令观察Session ID表

appdirector l7 persistency dynamic
Page 18
Page 6
Pattern Match Session ID Persistency
• AppDirector > L7 Server Selection >Pattern Match >Create
• Farm Nam:Farm名称 • Pattern Offset:位移 • Pattern Mask: 匹配模
Page 3
L7 (Session ID)对话保持
• AD可以对数据包中的任意 persistency identifier进行查找,
persistency identifier的格式可以是文本或二进制格式; Session ID被放在Session ID Table中; • AD以一下方式进行Session ID 的 搜寻:
相关文档
最新文档