2,集群LVS的持久连接

持久性连接主要解决的是会话保持的问题

SSL or FTP 保证会话在的持久性

定义LVS的分发策略

[root@dr ~]# ipvsadm -C

[root@dr ~]# ipvsadm -A -t 192.168.46.100:80 -s rr -p 300

[root@dr ~]# ipvsadm -a -t 192.168.46.100:80 -r 192.168.46.132 -g //gatewaying (direct routing)

[root@dr ~]# ipvsadm -a -t 192.168.46.100:80 -r 192.168.46.133 -g

[root@dr ~]# service ipvsadm save

Saving IPVS table to /etc/sysconfig/ipvsadm: [ OK ]

[root@tdr ~]# ipvsadm -Ln

IP Virtual Server version 1.2.1 (size=4096)

Prot LocalAddress:Port Scheduler Flags

-> RemoteAddress:Port Forward Weight ActiveConn InActConn

TCP 192.168.46.100:80 rr persistent 300

-> 192.168.46.132:80 Route 1 0 0

-> 192.168.46.133:80 Route 1 0 0

[root@dr ~]# ipvsadm -Ln -c

你可能感兴趣的:(2,集群LVS的持久连接)