负载均衡开源解决方案综述

上传人:最**** 文档编号:118161733 上传时间:2019-12-11 格式:PPT 页数:29 大小:3.15MB
返回 下载 相关 举报
负载均衡开源解决方案综述_第1页
第1页 / 共29页
负载均衡开源解决方案综述_第2页
第2页 / 共29页
负载均衡开源解决方案综述_第3页
第3页 / 共29页
负载均衡开源解决方案综述_第4页
第4页 / 共29页
负载均衡开源解决方案综述_第5页
第5页 / 共29页
点击查看更多>>
资源描述

《负载均衡开源解决方案综述》由会员分享,可在线阅读,更多相关《负载均衡开源解决方案综述(29页珍藏版)》请在金锄头文库上搜索。

1、负载均衡开源解决方案 Load Balancing Using Open Source Softwares MSN: finalbsd MAIL: finalbsd CUID: FinalBSD 2/29 Layer 4-7 Layer4-7 Switch 软件工作层 F54-7 NetSca ler 4-7 LVS4 HAPro xy 4-7 3/29 Schedule Basically Hardware/GUI/CLI (Configure method)/HA (Config Sync) Load balance related virtual server/node/pool/poo

2、l member Monitors Sorry server Maintenance Mode Load balance method Persistence SNAT/RNAT Server Protection ACL/Content Switch GSLB Performance 4/29 We are here Basically LB related Persistence SNAT/RNAT Server Protection ACL/CS GSLB 5/29 Hardware/GUI/CLI/HA CommercialOpen Source F5NetScale r LVS HA

3、Proxy Hardware GUI CLI HA 6/29 HAProxy Hot Reconfiguration mv /etc/haproxy/config /etc/haproxy/config.old mv /var/run/haproxy.pid /var/run/haproxy.pid.old mv /etc/haproxy/config.new /etc/haproxy/config kill -TTOU $(cat /var/run/haproxy.pid.old) if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/conf

4、ig; then echo New instance successfully loaded, stopping previous one. kill -USR1 $(cat /var/run/haproxy.pid.old) rm -f /var/run/haproxy.pid.old exit 1 else echo New instance failed to start, resuming previous one. kill -TTIN $(cat /var/run/haproxy.pid.old) rm -f /var/run/haproxy.pid mv /var/run/hap

5、roxy.pid.old /var/run/haproxy.pid mv /etc/haproxy/config /etc/haproxy/config.new mv /etc/haproxy/config.old /etc/haproxy/config exit 0 fi 保存之前状态 停止老的监听 成功,清理老的连接和pid 失败,恢复老的配置 7/29 We are here Basically LB related Persistence SNAT/RNAT Server Protection ACL/CS GSLB 8/29 Concepts virtual server 192.1

6、68.101.1:80 pool (name= cgi_boxes) member (server= 10.1.1.3:80) member (server= 10.1.1.2:80) member (server= 10.1.1.1:80) pool (name= asp_boxes) member (server= 10.1.1.6:80) member (server= 10.1.1.5:80) member (server= 10.1.1.4:80) VIP 192.168.101.1 virtual server 192.168.101.1:443 pool (name= ssl_b

7、oxes) member (server= 10.1.1.6:443) member (server= 10.1.1.2:443) member (server= 10.1.1.1:443) VIP 192.168.101.2 Load Balancing Intelligent Traffic Control (look at URL, client IP addr., etc.) Port-based Traffic Direction IP Addr.-based Traffic Direction Incoming request Monitor Availability requir

8、ement SNAT/NAT Priority-based member activation ACTION of service down Slow Ramp Time Pool/pool member statistics 9/29 Monitors Monitor类型 SimpleECVEAV ICMP/GW ICMP/TCP ECHO TCP/HTTP/ HTTPS 外部程序 /FTP下载一 个文件到 LTM系统上 ,看是否下 载成功 /IMAP/LDA P/MSSQL/N NTP/Oracle/ POP3/RADI US/Real Server/SIP/S MTP/SOAP/ WMI

9、 自定义monitor 10/29 HAProxy Monitor listen webfarm 192.168.1.1:80 mode http balance roundrobin cookie SERVERID insert indirect option httpchk HEAD /index.html HTTP/1.0 server webA 192.168.1.11:80 cookie A check server webB 192.168.1.12:80 cookie B check port 81 inter 2000 server webC 192.168.1.13:80 c

10、ookie C check server webD 192.168.1.14:80 cookie D check 11/29 HAProxy Sorry Server listen webfarm 192.168.1.1:80 mode http balance roundrobin cookie SERVERID insert indirect option httpchk HEAD /index.html HTTP/1.0 server webA 192.168.1.11:80 cookie A check server webB 192.168.1.12:80 cookie B chec

11、k port 81 inter 2000 server webC 192.168.1.13:80 cookie C check server webD 192.168.1.14:80 cookie D check server bkpA 192.168.1.15:80 cookie A check backup server bkpB 192.168.1.16:80 cookie B check backup 12/29 HAProxy Maintenance Mode Updating. 503 Service Unavailable No server is available to ha

12、ndle this request. 13/29 Load balancing algorithm Round Robin Wrr(Ratio(member), Ratio(Node) Dynamic Ratio:根据对服务器性能的观察来动态设置weight,观察点 包括连接数、响应时间等。 Fastest(node) & Fastest(application): 服务器/应用的最快响应时间 LC(Member) & LC(node) Observed(member) & Observed(node) Predictive(member) & Predictive(node) Source

13、URL HASH URL Param 14/29 We are here Basically LB related Persistence SNAT/RNAT Server Protection ACL/CS GSLB 15/29 Persistence ClientServer A GET /URI1 HTTP/1.1 HTTP request (no cookie) TCP handshake TCP handshake GET /URI1 HTTP/1.1 HTTP request (no cookie) HTTP/1.1 200 OK HTTP reply (no cookie) HT

14、TP/1.1 200 OK HTTP reply (with inserted cookie) pick server GET /URI2 HTTP/1.1 HTTP request (with same cookie) TCP handshake TCP handshake GET /URI2 HTTP/1.1 HTTP request (with same cookie) HTTP/1.1 200 OK HTTP reply (no cookie) HTTP/1.1 200 OK HTTP reply (updated cookie) cookie specifies server Fir

15、st HitSecond Hit Set-Cookie: SERVERID=A Cookie: SERVERID=A Cookie persistence 1.1 HTTP Cookie Insert 1.2 HTTP Cookie Rewrite 1.3 HTTP Cookie Passive 1.4 Cookie Hash Destination Address affinity persistence Hash persistence MSRDP persistence SIP persistence(session Initiation protocol) Souce address affnity persistence SSL persistence Universal persistence insert rewrite prefix listen webfarm 192.168.1.1:80 mode http balance roundrobin cookie SERVERID insert indirect option httpchk HEAD /index.html HTTP/1.0 server webA 192.168.1.11:80 cookie A check server webB 192.168.1.12

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号