LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Re: lvs/tun+ha+ldirectord help

To: "LinuxVirtualServer.org users mai" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Re: lvs/tun+ha+ldirectord help
From: "wlx" <wlx@xxxxxxxxx>
Date: Tue, 14 Nov 2006 10:27:01 +0800




wlx
2006-11-14



发件人: Horms
发送时间: 2006-11-14 08:48:25
收件人: LinuxVirtualServer.org users mailing list.
抄送: 
主题: Re: lvs/tun+ha+ldirectord help

On Mon, Nov 13, 2006 at 06:13:26PM +0800, wlx wrote:
> hi,all
> all looks like ok,but when i  run tunl0 stop in 192.168.100.125,then in 
> director i run ipvsadm -ln ,display:
> 
> [root@backup ~]# ipvsadm -ln
> IP Virtual Server version 1.2.0 (size=1048576)
> Prot LocalAddress:Port Scheduler Flags
>   - > RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  192.168.100.203:80 wlc
>   - > 192.168.100.128:80            tunnel 1      0          0         
>   - > 192.168.100.120:80            tunnel   1      0          0         
>   - > 192.168.100.125:80           tunnel   1      0          0        
> the 192.168.100.120's weight not change to 0,if i run  telnet 192.168.100.203 
> 80 sequenctly in a client,ipvsadm -ln,display:
> [root@backup ~]# ipvsadm -lnc
> IPVS connection entries
> pro expire state source virtual destination
> TCP 00:39 SYN_RECV 192.168.100.1:32779 192.168.100.203:80 192.168.100.125:80
> TCP 00:42 SYN_RECV 192.168.100.1:32773 192.168.100.203:80 192.168.100.125:80
> TCP 00:42 SYN_RECV 192.168.100.1:32782 192.168.100.203:80 192.168.100.125:80
> TCP 00:30 SYN_RECV 192.168.100.1:32774 192.168.100.203:80 192.168.100.125:80
> TCP 00:36 SYN_RECV 192.168.100.1:32777 192.168.100.203:80 192.168.100.125:80
> TCP 00:40 SYN_RECV 192.168.100.1:32780 192.168.100.203:80 192.168.100.125:80
> TCP 00:44 SYN_RECV 192.168.100.1:32783 192.168.100.203:80 192.168.100.125:80
> TCP 00:33 SYN_RECV 192.168.100.1:32775 192.168.100.203:80 192.168.100.125:80
> TCP 00:45 SYN_RECV 192.168.100.1:32784 192.168.100.203:80 192.168.100.125:80
> TCP 00:37 SYN_RECV 192.168.100.1:32772 192.168.100.203:80 192.168.100.125:80
> TCP 14:56 ESTABLISHED 192.168.100.1:32785 192.168.100.203:80 
> 192.168.100.128:80
> TCP 01:56 FIN_WAIT 192.168.100.1:32770 192.168.100.203:80 192.168.100.128:80
> TCP 00:41 SYN_RECV 192.168.100.1:32781 192.168.100.203:80 192.168.100.125:80
> TCP 14:11 ESTABLISHED 192.168.100.1:32771 192.168.100.203:80 
> 192.168.100.120:80
> TCP 00:35 SYN_RECV 192.168.100.1:32776 192.168.100.203:80 192.168.100.125:80
> TCP 00:37 SYN_RECV 192.168.100.1:32778 192.168.100.203:80 192.168.100.125:80
> the connections are mostly sent to the realserver which tunnel is  stoped.

Is the host at the end of the tunnel that is down (192.168.100.120)
still accessable by ldirectord?  If so it will not remove the host from
the lvs table.  If not, how long did you wait for it to be removed?

thanks your repply!yes,the host still accesable by ldirectord,because its 
network and the service(http or squid)are work.
i hope when a host's  tunnel is down,it can be detected by the ldirectord,then 
its weight can change to 0,the new connection will not sent to it,and the lvs 
can keep balance(in present.i found when a host's tunnel is stopped,the   
cluster can't work normally,at this time if telnet $vip=192.168.100.203 :80 
will answer like this 
[root@loadbalancer ~]# telnet 192.168.100.203 80
Trying 192.168.100.203...
telnet: connect to address 192.168.100.203: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
> my ldirctord.cf
> # Global Directives
> checktimeout=3
> checkinterval=3
> 
> autoreload=yes
> logfile="/var/log/ldirectord.log"
> 
> virtual=192.168.100.203:80
>         real=192.168.100.120:80 gate
>         real=192.168.100.125:80 gate
>         real=192.168.100.128:80 gate
>         service=http
>         checkport=80
>         checktype=connect
>         protocol=tcp
> 
> hope your help,thanks in advance! 



-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users




<Prev in Thread] Current Thread [Next in Thread>