LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

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

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Unable to load balance two tomcat servers
From: Adrian Chapela <achapela.rexistros@xxxxxxxxx>
Date: Fri, 13 Feb 2009 10:54:51 +0100
Praveen Sooryanarayana escribió:
> 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
>   
I think that is easier than using PREROUTING. See below.
> 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
>   
Have you tried to use this virtual=10.10.50.100:80 ?

And then the next lines of your configuration.  I use keepalive and I 
can define the virtual server on a different port of my real server. 
Could you try ?

>         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 ?
>
>   
Regards,
Adrian


_______________________________________________
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>