LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] load balancing queries to localhost:port?

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] load balancing queries to localhost:port?
From: Michael Schhwartzkopff <misch@xxxxxxxxxxxxxx>
Date: Sun, 19 Sep 2010 17:49:35 +0200
On Sunday 19 September 2010 16:59:44 Tomasz Chmielewski wrote:
> Is it possible to load balance queries to localhost?
> 
> Say, I have two servers - I'd like them to be both directors and
> realservers.
> 
> 
> Application connecting to localhost:1111 should be connected to either one
> or the other server. Despite many tries, I'm not able to achieve this.
> 
> I had partial success with LVS-NAT rules:
> 
> -A -t 127.0.0.1:1111 -s lc
> -a -t 127.0.0.1:1111 -r 10.0.0.10:1111 -m -w 1 # same server as localhost,
> works -a -t 127.0.0.1:1111 -r 10.0.0.20:1111 -m -w 1 # remote server
> 
> 
> Where the remote realserver receives the packet:
> 
> 16:54:18.078365 IP (tos 0x10, ttl 64, id 52411, offset 0, flags [DF], proto
> TCP (6), length 60) 127.0.0.1.50427 > 10.0.0.20.1111: S, cksum 0xc03d
> (correct), 1282046761:1282046761(0) win 32792 <mss 16396,sackOK,timestamp
> 178066 0,nop,wscale 7>
> 
> 
> But I guess it's confused about what to do with it, since it appears to
> come from 127.0.0.1.

See:
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.localnode.html

-- 
Dr. Michael Schwartzkopff
Guardinistr. 63
81375 München

Tel: (0163) 172 50 98

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