LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: LVS NAT seems working but it doesnt

To: massimiliano@xxxxxxxxxxxxx, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: LVS NAT seems working but it doesnt
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 27 Sep 2005 18:46:50 +0900
On Tue, Sep 27, 2005 at 01:03:44AM -0700, massimiliano conteduca wrote:
> hi all,
> i thought to setup correctly an LVS using 1 director
> and 2 real server.
> using ipvsadm -L :
> TCP 192.168.1.2: http rr
> -> 192.168.10.1:http  masq
> -> 192.168.10.2:http  masq
> 
> using ipvsadm -L -n --stats
> TCP 192.168.1.2:80 7468 54414 outpkts inbyte outbyte
> -> 192.168.10.2:80 3734 27207 outpkts inbyte outbyte
> -> 192.168.10.1:80 3734 27207 outpkts inbyte outbyte
> 
> ive value for outpkts inbyte and outbyte
> so LVS seems working .
> 
> using ipvsadm -L -n --connection
> i notice a strange behaviour
> all the connections redirected to 192.168.10.2 have
> the state=CLOSE and expire=00:05 or less
> 
> i unplugged the network cable from 192.168.10.1
> and nothing is working anymore, the webpage is not
> displayed. 
> 
> i removed the ipvsadm entry for 192.168.10.1
> and in this case i get error :connection refused
> 
> i checked with iptables -L -v all realservers and
> director, the only DROP policy has been applied to
> port 22
> 
> doing iptables -L -v on 192.168.10.2 it shows that
> only 6 packet are in INPUT!! (how it is possible if
> ipvsadm redirect thousand of them to this realserver?)
> 
> what ive to do? whats wrong ?

If you have problems with the way your packets are being load balanced
please:

1) Undersand what time of connections your clients are opening
2) Analyse where the connections are going using tcpdump
   and ipvsadm -L -c -n
3) Consider using lc instead of rr

-- 
Horms

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