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

To: " users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] load balancing queries to localhost:port?
From: Tomasz Chmielewski <mangoo@xxxxxxxx>
Date: Sun, 19 Sep 2010 16:59:44 +0200
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 -s lc
-a -t -r -m -w 1 # same server as localhost, works
-a -t -r -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) > 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 

Tomasz Chmielewski

Please read the documentation before posting - it's available at: mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to

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