Hi,
I am new to LVS and I am tring to configure a load balancing cluster that
does not match anything discribed in the documentation that I could find. I
also searched through the archives and could not find anything (maybe I
using the wrong search terms).
I have two networks that are physcally located in different locations (lets
say city X and city Y). In city X we have our web servers, run by our team
there. In city Y we have our load balancer that we are tring to set up as a
demo to show how LVS works. We can not set our default gateway of our web
servers to be the load balancer because we are trying to test LVS and can
not take our web servers out of production to test a new load balancer. And
we want to see the load balancing working with our present servers.
What is happening is our client makes a request to our load balancer, the
load balancer (ldirectord) sends the request to our web server and the web
server responses directly back to the client, who has no idea why that
server is sending the packet to it.
Below is my ldirectord.cf file:
# Global Directives
checktimeout=3
checkinterval=30
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes
virtual=YYY.YYY.YYY.1:80
real= XXX.XXX.XXX.1:Port masq
real= XXX.XXX.XXX.2:Port masq
service=http
request="test.html"
receive="I'm alive"
scheduler=rr
protocol=tcp
Basicly the real servers are responding directly back to the client (rather
then the load balancer) but I can not set my default gateway of the real
servers to the load balancer. Is there anyway to masquarade the request
coming from the load balancer (ldirectord) to the real server to make it
look like the request is coming from the load balancer rather then the
client.
My masquarading rules look like this:
$IPTABLES -t nat -A POSTROUTING -s YYY.YYY.YYY.0/24 -j
MASQUERADE
$IPTABLES -t nat -A POSTROUTING -d XXX.XXX.XXX.1 -j
MASQUERADE
$IPTABLES -t nat -A POSTROUTING -d XXX.XXX.XXX.2 -j
MASQUERADE
Thank you in advance for any help you can provide.
Jon Hoffman
|