LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Using LVS for servers on same subnet with real serverslistening ondi

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Using LVS for servers on same subnet with real serverslistening ondifferent ports
From: Bruno Vincent <bruno.vincent@xxxxxxxxx>
Date: Fri, 07 Nov 2003 12:14:52 +0100
Joseph Mack wrote:
Bruno Vincent wrote:


I want to use a LVS-NAT director that load balances HTTP requests
between two web server instances that are hosted on the same physical
machine (which is a Solaris one). So i want to balance between RIP:80
and RIP:8080. As far as i can read, it just cannot work.


I haven't tried it and I can't see a problem, although John Barrett
sees one, but doesn't say what it is.
Set up the httpd to listen on RIP:80 and RIP:8080 and loadbalance
between those two services.

Joe


I implemented both methods yesterday.

As you mentionned there is absolutely no problem loadbalancing between RIP:80 and RIP:8080 in LVS-NAT. The only thing you have to care about is to precise the TCP port (80) of the director:

/sbin/ipvsadm -A -t $VIP:80 -s $LB

otherwise ipvsadm tells you that the destination host already exists when you add the second of these rules:

/sbin/ipvsadm -a -t $VIP -r $RIP:80 -m
/sbin/ipvsadm -a -t $VIP -r $RIP:8080 -m

Besides, i also managed to implement LVS-NAT with two virtual IP and the same port on the realservers.

Well, thanks for your help guys!

Bruno

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