LVS DR问题

最近搭建了一个LVS平台,可是在ipvsadm -L -n时结果:(DR模式)

[root@LVS ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 210.13.75.154:80 wrr
-> 10.4.0.8:80 Route 2 11 8074
-> 10.4.0.6:80 Route 2 489 8058

InActConn却居高不下,ActiveConn很少,访问网站非常的慢,有没有同学遇到类似的问题,分享下经验,非常感谢

ipvsadm -Lnc |grep -i FIN_WAIT

有N多的FIN_WAIT 状态

LVS DR模式是这样配置的

realserver上执行下面的脚本;
#!/bin/sh

VIP=210.13.75.154

#. /etc/rc.d/init.d/functions

case "$1" in
start)
echo "realserver port starting"
ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/route add -host $VIP dev lo:0
echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
sysctl -p

;;
stop)
echo "realserver port closing"
ifconfig lo:0 down
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/arp_announce
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

DR上的脚本;
#!/bin/sh
#create in 20060812 by ghb
# description: start LVS of Directorserver
VIP=10.13.75.154
RIP1=10.4.0.6
RIP2=10.4.0.8

. /etc/rc.d/init.d/functions

case "$1" in
start)
echo " start LVS of DirectorServer"
# set the Virtual IP Address
/sbin/ifconfig eth1:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/route add -host $VIP dev eth1:0
#Clear IPVS table
/sbin/ipvsadm -C
#set LVS
/sbin/ipvsadm -A -t $VIP:80 -s wrr
/sbin/ipvsadm -a -t $VIP:80 -r $RIP1:80 -g -w 2
/sbin/ipvsadm -a -t $VIP:80 -r $RIP2:80 -g -w 2
#Run LVS
/sbin/ipvsadm

;;
stop)
echo "close LVS Directorserver"
/sbin/ipvsadm -C
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

Forums: