LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Unable to load balance two tomcat servers

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Unable to load balance two tomcat servers
From: Praveen Sooryanarayana <praveensnb@xxxxxxxxx>
Date: Thu, 12 Feb 2009 17:11:49 -0800
I have a setup created based on the Streamline High Availability and Load
Balancing configuration of Ultramonkey. I have tomcat running on port 8080
on the servers.
I'm using iptables to redirect the request on virtual ip from port 80 to
8080.

iptables -t nat -A PREROUTING -p tcp -d 10.10.50.100 --dport 80 -j DNAT --to
10.10.50.100:8080

When tomcat is up on both the servers, I don't see any load balancing. The
local server always responds to the requests. And when tomcat on the local
server goes down, the request is not handled by the other server.


ldirectord.cf :

checktimeout=10
checkinterval=2
autoreload=no
logfile="/var/log/ldirectord.log"
quiescent=yes

virtual=10.10.50.100:8080
        fallback=127.0.0.1:8080
        real=10.10.50.11:8080 gate
        real=10.10.50.12:8080 gate
        service=http
        request="test.html"
        receive="It works"
        scheduler=rr
        protocol=tcp
        checktype=negotiate

Output of ipvsadm -L -n:

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.10.50.100:8080 rr
  -> 10.10.50.11:8080            Route   1      0          0
  -> 10.10.50.12:8080            Local   1      0          0


What am I doing wrong ? And how can I fix the issue ?

-Praveen
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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