LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Praise and Help Request

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Praise and Help Request
From: "Peter Mueller" <pmueller@xxxxxxxxxxxx>
Date: Fri, 11 Feb 2005 11:03:09 -0800
> If I run the ipvsadm command when load balancing is working correctly 
> and I'm running apache bench a computer from outside the 
> cluster, I'll 
> see something like this:
> ----------------------------------------------------------------------
> las1:~ # ipvsadm
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>    -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  las-cluster.mos.org:http wlc
>    -> las1.mos.org:http            Local   1      10         2700
>    -> las2.mos.org:http            Route   1      9          2616
> ----------------------------------------------------------------------

Looks good.  FYI I have found weighted round robin seems to be my favorite
scheduler.  I weight the servers by CPU, memory, or whatever the limiting
factors are.  Great for larger clusters with multiple types of servers.

> When load balancing is not working and I run the same apache bench 
> command again, I'll see this:
> ----------------------------------------------------------------------
> las1:~ # ipvsadm
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>    -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  las-cluster.mos.org:http wlc
>    -> las1.mos.org:http            Local   1      0          0
>    -> las2.mos.org:http            Route   1      0          0
> ----------------------------------------------------------------------
> 
> There'll be no active connections, even to node 2! But apache 
> bench will 
> be running and returning data just fine (but only from node 2).
> 
> If I restart heartbeat (thus restarting ldirectord), load 
> balancing will 
> work properly again, but only for a while.

If packets are traversing through LVS ipvsadm will show the connections.  A
reasonable guess is Apache is somehow listening on port 80 instead of LVS.
You can try using debug (http://www.linuxvirtualserver.org/docs/sysctl.html)
and/or tcpdump to help diagnose, or maybe a simple netstat -anp | grep LISTEN
will show apache on port 80.

Regards,

P

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