LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Our LVS/DR backends freezes

To: Joseph Mack NA3T <jmack@xxxxxxxx>
Subject: Re: Our LVS/DR backends freezes
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Olle Ö?stlund <olle@xxxxxxxxxxx>
Date: Fri, 01 Dec 2006 10:27:53 +0100
tor 2006-11-30 klockan 14:35 -0800 skrev Joseph Mack NA3T:
> On Thu, 30 Nov 2006, Olle ~Vstlund wrote:
> 
> >
> >> Didn't I see somewhere that you set the TCP timeout on the director to
> >> 30mins?
> >
> > Yes. We are running the SLES9 heartbeat/ldirectord where there is no
> > option of setting ipvsadm-attributes directly, so we are running the
> > default timouts (tcp 900 sec, tcpfin 120 seconds, udp 300 seconds).
> 
> I expect these are the timeouts for idle connections (eg for 
> interactive services), not the tcpip timeouts. For Tomcat 
> there should not be idle connections.

The figures listed is what I get when I run "ipvsadm -l --timeout" at
the director. I interpret these figures as the time ipvs will wait until
a connection is removed from the table (in ESTABLISHED-state it will
accept 900 seconds with no activity until removing the connection, in
FIN_WAIT it accepts 120 seconds, and so on).

Having the Tomcat setup to close a client-connection after 20 seconds of
inactivity, I see no point in having the ipvs-timeout at a much much
longer timespan? Sure, the Tomcat is closing at a completely different
protocol-layer, but it does propagate down the layers and become a
tcp-connection close, doesn't it? Am I misunderstanding something?


> I'm out of ideas. You have a very standard setup and no-one 
> else is having problems of this sort. 

Well, have a look at our configuration files. Maybe you will find
something odd.

Ta failed-over HA-resources:
/etc/ha.d/haresources -------------------------------------------
#
tower1 IPaddr::192.168.3.9  ldirectord::tomcat1
tower1 IPaddr::192.168.3.10 ldirectord::tomcat2
-----------------------------------------------------------------

The ldirectord-config for the "tomcat1" resource:
/etc/ha.d/conf/tomcat1 ------------------------------------------
# Global Directives
checktimeout=10
checkinterval=15
fallback=127.0.0.1:8081
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes

# Tomcat instance 1 HTTP virtual service
virtual=192.168.3.9:80
        protocol=tcp
        service=http
        scheduler=wrr
        real=192.168.3.5:80 gate 10     # Runway1, Tomcat instance 1
        real=192.168.3.7:80 gate 10     # Runway3, Tomcat instance 1
        request="/Status.html"
        receive="realserver responding"

# Tomcat instance 1 HTTPS virtual service
virtual=192.168.3.9:443
        protocol=tcp
        service=https
        scheduler=wrr
        real=192.168.3.5:443 gate 10    # Runway1, Tomcat instance 1
        real=192.168.3.7:443 gate 10    # Runway3, Tomcat instance 1
        virtualhost=www.seat24.com
        request="/status/Status.html"
        receive="realserver responding"
-----------------------------------------------------------------

The ldirectord-config for the "tomcat2" resource:
/etc/ha.d/conf/tomcat2 ------------------------------------------
# Global Directives
checktimeout=10
checkinterval=15
fallback=127.0.0.1:8081
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes

# Tomcat instance 2 HTTP virtual service
virtual=192.168.3.10:80
        protocol=tcp
        service=http
        scheduler=wrr
        real=192.168.3.105:80 gate 10   # Runway1, Tomcat instance 2
        real=192.168.3.107:80 gate 10   # Runway3, Tomcat instance 2
        request="/Status.html"
        receive="realserver responding"
-----------------------------------------------------------------

The realserver's ip 192.168.3.5 is a static ip assigned to the eth1
interface. The realserver's 192.168.3.105 is a pseudo-ip assigned to the
same eth1 interface. The LVS VIPs are assigned to the loopback
interface, nonarping.
-----------------------------------------------------------------

runway1:/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:7F:AF:20:46
          inet addr:192.168.4.3  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:7fff:feaf:2046/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8648742 errors:10256 dropped:0 overruns:0
frame:1116
          TX packets:7817145 errors:2 dropped:0 overruns:0 carrier:0
          collisions:49503 txqueuelen:1000
          RX bytes:2275373400 (2169.9 Mb)  TX bytes:2128478722 (2029.8
Mb)
          Interrupt:29 Memory:f7ef0000-f7f00000

eth1      Link encap:Ethernet  HWaddr 00:0E:7F:AF:20:45
          inet addr:192.168.3.5  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:7fff:feaf:2045/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:103344225 errors:0 dropped:0 overruns:0 frame:0
          TX packets:116639106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:26688447 (25.4 Mb)  TX bytes:2805706562 (2675.7 Mb)
          Interrupt:31 Memory:f7ee0000-f7ef0000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING NOARP  MTU:16436  Metric:1
          RX packets:267695 errors:0 dropped:0 overruns:0 frame:0
          TX packets:267695 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:71166657 (67.8 Mb)  TX bytes:71166657 (67.8 Mb)

lo:1      Link encap:Local Loopback
          inet addr:192.168.3.9  Mask:255.255.255.255
          UP LOOPBACK RUNNING NOARP  MTU:16436  Metric:1

lo:2      Link encap:Local Loopback
          inet addr:192.168.3.10  Mask:255.255.255.255
          UP LOOPBACK RUNNING NOARP  MTU:16436  Metric:1

runway1:/ # ip addr show
1: lo: <LOOPBACK,NOARP,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet 192.168.3.9/32 brd 192.168.3.9 scope global lo:1
    inet 192.168.3.10/32 brd 192.168.3.10 scope global lo:2
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast
qlen 1000
    link/ether 00:0e:7f:af:20:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.3/24 brd 192.168.4.255 scope global eth0
    inet6 fe80::20e:7fff:feaf:2046/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0e:7f:af:20:45 brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.5/24 brd 192.168.3.255 scope global eth1
    inet 192.168.3.105/24 brd 192.168.3.255 scope global secondary eth1
    inet6 fe80::20e:7fff:feaf:2045/64 scope link
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noqueue
    link/sit 0.0.0.0 brd 0.0.0.0




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